1 #ifndef _rdet_RChannelSQLManager_h_
2 #define _rdet_RChannelSQLManager_h_
8 #include <det/VManager.h>
9 #include <utl/ErrorLogger.h>
10 #include <utl/config.h>
11 #include <utl/ResponseMap.h>
12 #include <boost/lexical_cast.hpp>
14 #include <det/Detector.h>
15 #include <rdet/RDetector.h>
16 #include <rdet/Station.h>
17 #include <rdet/RSimulationStationListManager.h>
19 #ifdef AUGER_SQLITE_ENABLED
20 # include <det/VSQLManager_SQLite.h>
22 # include <det/VSQLManager_MySQL.h>
27 class TabulatedFunction;
28 class TabulatedFunctionComplexLgAmpPhase;
65 void Init(
const std::string& configLink);
86 Status GetChannelListFromBuffer(std::vector<
int>& returnData,
87 const std::
string& componentProperty,
88 const std::
string& componentName,
91 Status GetTFCLAPData(utl::TabulatedFunctionComplexLgAmpPhase& returnData,
92 const std::
string& componentProperty,
93 const std::
string& componentName,
94 const
IndexMap& componentIndex) const;
96 Status GetDataMap(std::map<std::
string,
double>& returnData,
97 const std::
string& componentProperty,
98 const std::
string& componentName,
99 const
IndexMap& componentIndex) const;
105 typedef std::pair<std::
string, std::
string>
Index;
109 InternalGetData(T& returnData,
110 const std::
string& componentProperty,
111 const std::
string& componentName,
115 if (componentProperty ==
"addSStationList") {
116 returnData = boost::lexical_cast<T>(0);
120 if (componentName !=
"RChannel" && componentName !=
"RADC" && componentName !=
"RResponseMapList")
124 Index currentComponent(componentIndex.find(
"station")->second,
125 componentIndex.find(
"channel")->second);
133 std::string temp =
"";
135 if (resultStatus ==
eFound) {
136 returnData = boost::lexical_cast<T>(temp);
147 const Index& componentIndex,
148 const std::string& componentProperty)
const;
154 mutable std::map<Index, ComponentMap>
fBuffer;
std::pair< std::string, std::string > Index
ComponentMap fComponentMap
Status const
Fetch first item from first row and optionally free query result.
Status GetDataMap(std::map< std::string, double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< Index, ComponentMap > fBuffer
locally store IndexMap for which the ComponentMap is filled
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Interface for detector managers that use MySQL.
Status
Return code for seek operation.
void BufferComponentMap() const
VManager::Status GetComponentFromBuffer(std::string &returnData, const Index &componentIndex, const std::string &componentProperty) const
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
Status GetTFCLAPData(utl::TabulatedFunctionComplexLgAmpPhase &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_HANDLE_DENIED
std::map< int, ChannelIdList > fBufferChannelIdLists
std::map< std::string, std::string > ComponentMap
std::vector< int > fChannelIds
void FillComponentMap(const IndexMap &componentIndex) const
unsigned long int fGpsSecondComission
Status InternalGetData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< std::string, std::string > IndexMap
void BufferChannelList() const
IndexMap fIndexMap
map to store internally the sql-result
Status GetChannelListFromBuffer(std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Manager for RD description of Station-Channels in SQL DB.
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
virtual ~RChannelSQLManager()
Status
Specifies success or (eventually) various possible failure modes.
unsigned long int fGpsSecondDecomission
static std::string GetSourceType(const std::string stationIdstring)