RStationListSQLManager.h
Go to the documentation of this file.
1 #ifndef _rdet_RStationListSQLManager_h_
2 #define _rdet_RStationListSQLManager_h_
3 
4 #include <utl/ErrorLogger.h>
5 #include <utl/config.h>
6 
7 #ifdef AUGER_SQLITE_ENABLED
8 # include <det/VSQLManager_SQLite.h>
9 #else
10 # include <det/VSQLManager_MySQL.h>
11 #endif
12 #include <rdet/RStationListManager.h>
13 
14 
15 namespace rdet {
16 
36 
37  public:
39 
40  virtual void Init(const std::string& configLink);
41 
43  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
45  VMANAGER_GETDATA_CALL(GetStationListData, std::string)
46  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<int>)
47  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<std::vector<int>>)
48 
49  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
50  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
51  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
52  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
53  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
54  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
55  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
56  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
57  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
58  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
59  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
60 
62  { return fStationManager; }
63 
64  void Update() const;
65 
66  private:
67  template<typename T>
68  Status
69  GetStationListData(T& returnData,
70  const std::string& componentProperty,
71  const std::string& componentName,
72  const IndexMap& componentIndex)
73  const
74  {
75  if (componentName != "stationList")
76  return eNotFound;
77 
78  Update();
79 
80  return fStationManager.GetData(returnData, componentProperty, componentIndex);
81  }
82 
84 
87 
88  };
89 
90 }
91 
92 
93 #endif
94 
95 // Configure (x)emacs for this file ...
96 // Local Variables:
97 // mode: c++
98 // End:
Time interval defined by two TimeStamps.
Definition: TimeRange.h:23
virtual void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
Status const
Fetch first item from first row and optionally free query result.
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
det::VManager::Status GetData(T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Status GetStationListData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Interface for detector managers that use MySQL.
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
Manager for SD description in SQL station lists.
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
Common implementation of the station list manager.
VMANAGER_GETDATA_HANDLE_DENIED RStationListManager fStationManager
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
const RStationListManager & GetStationListManager() const

, generated on Tue Sep 26 2023.