1 #ifndef _rdet_RSimulationStationListManager_h_
2 #define _rdet_RSimulationStationListManager_h_
4 #include <utl/ErrorLogger.h>
5 #include <utl/config.h>
7 #include <det/VManager.h>
8 #include <det/Detector.h>
9 #include <rdet/RDetector.h>
11 #include <rdet/RStationListManager.h>
13 #ifdef AUGER_SQLITE_ENABLED
14 # include <det/VSQLManager_SQLite.h>
16 # include <det/VSQLManager_MySQL.h>
47 virtual void Init(
const std::string& configLink);
84 det::Detector::GetInstance().GetRManagerRegister();
87 indexMap[
"stationId"] = stationIdstring;
94 if (boost::lexical_cast<int>(stationIdstring) > det::Detector::GetInstance().GetRDetector().GetRdSdStationIdLink())
97 std::string source_string;
98 manager.
GetData(source_string,
"source",
"stationList", indexMap);
100 if (source_string !=
"SQL" && source_string !=
"XML")
101 ERROR(
"Station description source is set to an invalid value!");
103 return source_string;
107 std::string
Utf8To7Bit(
const std::string& str)
const;
112 const std::string& componentProperty,
118 const std::string& componentProperty,
119 const std::string& componentName,
123 if (componentName !=
"stationList")
134 const std::string& componentName,
const IndexMap& componentIndex)
138 if (componentName ==
"RChannel" && componentProperty ==
"listOfChannelIds") {
140 if (
GetSourceType(componentIndex.find(
"station")->second) ==
"XML")
145 if (componentName !=
"stationList")
156 const std::string& componentProperty,
Time interval defined by two TimeStamps.
Status GetStationListDataVectorInt(std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Status const
Fetch first item from first row and optionally free query result.
det::VManager::Status GetListOfChannelIds(std::vector< int > &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Interface for detector managers.
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
const RStationListManager & GetStationListManager() const
virtual void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
det::VManager::Status GetData(T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Interface for detector managers that use MySQL.
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
void AddVirtualStation(RStationListManager::StationData &station)
#define VMANAGER_GETDATA_HANDLE_DENIED
det::VManager::Status GetData(T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
bool fReadInAdditionalStationViaSQL
virtual ~RSimulationStationListManager()
bool fReadInAdditionalStationViaXML
Manager for RD description in SQL or XML station lists.
utl::TimeRange Commissioned
Status GetStationListData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< std::string, std::string > IndexMap
Common implementation of the station list manager.
std::string Utf8To7Bit(const std::string &str) const
VMANAGER_GETDATA_HANDLE_DENIED RStationListManager fStationManager
bool HasStationData(const int id) const
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Status
Specifies success or (eventually) various possible failure modes.
static std::string GetSourceType(const std::string stationIdstring)