1 #ifndef _fwk_CStationListManager_h_
2 #define _fwk_CStationListManager_h_
7 #include <det/VManager.h>
8 #include <cdet/CDetectorConstants.h>
9 #include <boost/multi_index_container.hpp>
10 #include <boost/multi_index/member.hpp>
11 #include <boost/multi_index/ordered_index.hpp>
12 #include <boost/multi_index/composite_key.hpp>
13 #include <utl/TimeRange.h>
18 using ::boost::multi_index_container;
19 using ::boost::multi_index::index;
20 using namespace ::boost::multi_index;
88 const std::string& componentProperty,
96 bool DumpXML(std::ostream& output,
const std::string& indent =
"")
const;
100 {
return det::VManager::FindComponent<int>(
"stationId", componentIndex); }
110 GetGroup(std::vector<int>& returnData,
const int groupId)
const;
126 typedef multi_index_container<
130 tag<ByStationId>, BOOST_MULTI_INDEX_MEMBER(
StationData,
int, fId)
133 tag<ByGroupId>, BOOST_MULTI_INDEX_MEMBER(
StationData,
int, fGroupId)
139 BOOST_MULTI_INDEX_MEMBER(
StationData,
double, fAxis1),
140 BOOST_MULTI_INDEX_MEMBER(
StationData,
double, fAxis2)
148 typedef index<StationContainer, ByAxes>::type
AxesIndex;
std::string fCommissionTime
index< StationContainer, ByGroupId >::type GroupIdIndex
bool DumpXML(std::ostream &output, const std::string &indent="") const
det::VManager::Status GetGroupIds(std::vector< int > &returnData) const
Time interval defined by two TimeStamps.
static int GetStationId(const det::VManager::IndexMap &componentIndex)
bool ConditionalAddStationData(StationData &station)
adds station record only if it does not already exist
int crown(double x1, double x2, double y1, double y2)
bool HasStationData(const int id) const
StationContainer fStations
det::VManager::Status GetData(T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Common implementation of the station list manager.
utl::TimeRange fCommissionTimeRange
void GetFullStationGroups(std::vector< std::vector< int > > &returnList) const
det::VManager::Status GetStationGroup(std::vector< int > &returnData, const int id) const
std::string fDecommissionTime
det::VManager::Status GetStationCrown(std::vector< int > &crown, const int id, const int nCrown, CDetectorConstants::GridIndex index=CDetectorConstants::eStandard) const
Get crown accoding to detector time and station commission time range.
index< StationContainer, ByAxes >::type AxesIndex
std::vector< bool > fInGrid
std::map< std::string, std::string > IndexMap
void GetFullStationList(std::vector< int > &returnList) const
multi_index_container< StationData, indexed_by< ordered_unique< tag< ByStationId >, BOOST_MULTI_INDEX_MEMBER(StationData, int, fId) >, ordered_non_unique< tag< ByGroupId >, BOOST_MULTI_INDEX_MEMBER(StationData, int, fGroupId) >, ordered_non_unique< tag< ByAxes >, composite_key< StationData, BOOST_MULTI_INDEX_MEMBER(StationData, double, fAxis1), > > > > StationContainer
det::VManager::Status GetGroup(std::vector< int > &returnData, const int groupId) const
index< StationContainer, ByStationId >::type StationIdIndex
Status
Specifies success or (eventually) various possible failure modes.