Common implementation of the station list manager. More...
#include "rdet/RStationListManager.h"
Classes | |
struct | ByStationId |
struct | StationData |
Public Member Functions | |
void | AddOrReplaceStationData (StationData &station) |
adds station record and might overright old entry More... | |
void | ClearStationList () |
void | ClearStations (const std::string source_type) |
Removes all stations from fStations with fSource == source_type. More... | |
bool | ConditionalAddStationData (StationData &station) |
adds station record only if it does not already exist More... | |
bool | DumpXML (std::ostream &output, const std::string &indent="") const |
template<> | |
VManager::Status | GetData (int &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const |
template<> | |
VManager::Status | GetData (double &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const |
template<> | |
VManager::Status | GetData (string &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const |
template<typename T > | |
det::VManager::Status | GetData (T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const |
template<> | |
VManager::Status | GetData (vector< int > &returnData, const string &componentProperty, const VManager::IndexMap &) const |
template<> | |
VManager::Status | GetData (vector< vector< int > > &, const string &, const VManager::IndexMap &) const |
bool | HasStationData (const int id) const |
bool | RemoveStationData (StationData &station) |
Removes station data if manager has station. More... | |
Static Public Member Functions | |
static int | GetStationId (const det::VManager::IndexMap &componentIndex) |
Private Types | |
typedef multi_index_container < StationData,::boost::multi_index::indexed_by < ::boost::multi_index::ordered_unique < ::boost::multi_index::tag < ByStationId > , BOOST_MULTI_INDEX_MEMBER(StationData, int, fId) > > > | StationContainer |
typedef index < StationContainer, ByStationId >::type | StationIdIndex |
Private Member Functions | |
void | GetFullStationList (std::vector< int > &returnList) const |
Private Attributes | |
StationContainer | fStations |
Common implementation of the station list manager.
This class is used by both, RStationListXMLManager and RStationListSQLManager. Adaption from SStstionManager.
Definition at line 39 of file RStationListManager.h.
|
private |
Definition at line 153 of file RStationListManager.h.
|
private |
Definition at line 155 of file RStationListManager.h.
void rdet::RStationListManager::AddOrReplaceStationData | ( | RStationListManager::StationData & | station | ) |
adds station record and might overright old entry
Definition at line 172 of file RStationListManager.cc.
References rdet::RStationListManager::StationData::fCommissionTime, rdet::RStationListManager::StationData::fCommissionTimeRange, rdet::RStationListManager::StationData::fDecommissionTime, and rdet::RStationListManager::StationData::fId.
|
inline |
Definition at line 132 of file RStationListManager.h.
References fStations.
void rdet::RStationListManager::ClearStations | ( | const std::string | source_type | ) |
Removes all stations from fStations with fSource == source_type.
Definition at line 192 of file RStationListManager.cc.
bool rdet::RStationListManager::ConditionalAddStationData | ( | RStationListManager::StationData & | station | ) |
adds station record only if it does not already exist
Definition at line 156 of file RStationListManager.cc.
References rdet::RStationListManager::StationData::fCommissionTime, rdet::RStationListManager::StationData::fCommissionTimeRange, rdet::RStationListManager::StationData::fDecommissionTime, and rdet::RStationListManager::StationData::fId.
bool rdet::RStationListManager::DumpXML | ( | std::ostream & | output, |
const std::string & | indent = "" |
||
) | const |
Definition at line 262 of file RStationListManager.cc.
References rdet::StringToXMLString().
VManager::Status rdet::RStationListManager::GetData | ( | int & | returnData, |
const string & | componentProperty, | ||
const VManager::IndexMap & | componentIndex | ||
) | const |
Definition at line 23 of file RStationListManager.cc.
VManager::Status rdet::RStationListManager::GetData | ( | double & | returnData, |
const string & | componentProperty, | ||
const VManager::IndexMap & | componentIndex | ||
) | const |
Definition at line 57 of file RStationListManager.cc.
VManager::Status rdet::RStationListManager::GetData | ( | string & | returnData, |
const string & | componentProperty, | ||
const VManager::IndexMap & | componentIndex | ||
) | const |
Definition at line 85 of file RStationListManager.cc.
det::VManager::Status rdet::RStationListManager::GetData | ( | T & | returnData, |
const std::string & | componentProperty, | ||
const det::VManager::IndexMap & | componentIndex | ||
) | const |
This will be specialized for "int", "double", "string", "vector<int>", and "vector<vector<int>>".
The following queries are implemented:
type and valid component properties:
int: inGrid
double: northing, easting, altitude
string: name, commission, decommission
vector<int>: fullStationList
vector<vector<int>>: fullStationGroups
Referenced by rdet::RStationListSQLManager::GetStationListData(), rdet::RStationListXMLManager::GetStationListData(), rdet::RSimulationStationListManager::GetStationListData(), rdet::RStationListXMLManager::GetStationListDataVectorInt(), and rdet::RSimulationStationListManager::GetStationListDataVectorInt().
VManager::Status rdet::RStationListManager::GetData | ( | vector< int > & | returnData, |
const string & | componentProperty, | ||
const VManager::IndexMap & | |||
) | const |
Definition at line 119 of file RStationListManager.cc.
VManager::Status rdet::RStationListManager::GetData | ( | vector< vector< int > > & | , |
const string & | , | ||
const VManager::IndexMap & | |||
) | const |
Definition at line 143 of file RStationListManager.cc.
|
private |
Definition at line 231 of file RStationListManager.cc.
|
inlinestatic |
Definition at line 137 of file RStationListManager.h.
bool rdet::RStationListManager::HasStationData | ( | const int | id | ) | const |
Definition at line 222 of file RStationListManager.cc.
bool rdet::RStationListManager::RemoveStationData | ( | RStationListManager::StationData & | station | ) |
Removes station data if manager has station.
Definition at line 207 of file RStationListManager.cc.
References rdet::RStationListManager::StationData::fId.
|
mutableprivate |
Definition at line 157 of file RStationListManager.h.
Referenced by ClearStationList().