RBeaconSQLManager.h
Go to the documentation of this file.
1 #ifndef _rdet_RBeaconSQLManager_h_
2 #define _rdet_RBeaconSQLManager_h_
3 
4 #include <map>
5 #include <string>
6 #include <algorithm>
7 
8 #include <det/VManager.h>
9 #include <utl/ErrorLogger.h>
10 #include <utl/config.h>
11 #include <utl/TimeStamp.h>
12 #include <utl/ResponseMap.h>
13 #include <boost/lexical_cast.hpp>
14 
15 #ifdef AUGER_SQLITE_ENABLED
16 # include <det/VSQLManager_SQLite.h>
17 #else
18 # include <det/VSQLManager_MySQL.h>
19 #endif
20 
21 
22 namespace utl {
23  class TabulatedFunction;
24  class TabulatedFunctionComplexLgAmpPhase;
25 }
26 
27 namespace rdet {
28 
42 
44  double refPhase;
47  };
48 
49  public:
50  virtual ~RBeaconSQLManager() { }
51 
52  void Init(const std::string& configLink);
53 
56  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
57  VMANAGER_GETDATA_NOTFOUND(std::string)
59  VMANAGER_GETDATA_NOTFOUND(std::vector<int>)
60  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
61  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
62  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
63  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
64  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
65  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
66  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
67  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
68  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
69  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
70  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
71 
72  private:
73  Status InternalGetDataVecDouble(std::vector<double>& returnData,
74  const std::string& /*componentProperty*/,
75  const std::string& componentName,
76  const IndexMap& /*componentIndex*/) const;
77 
78  Status InternalGetDataDouble(double& returnData,
79  const std::string& /*componentProperty*/,
80  const std::string& componentName,
81  const IndexMap& componentIndex) const;
82 
83 
84  std::vector<double> GetBeaconFrequencies() const;
85 
86  double GetBeaconRefPhase(const int& stationId,
87  const double& beaconFreq) const;
88 
90 
91  // variables for buffering
92  mutable std::vector<double> fBeaconFreqs;
93  mutable utl::TimeStamp fBeaconFreqsBufferedStartDate;
94  mutable utl::TimeStamp fBeaconFreqsBufferedStopDate;
95  mutable std::map<int, std::map <double, beaconRefPhaseOfStation> > fBufferBeaconRefPhases;
96 
97  };
98 
99 }
100 
101 
102 #endif
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
double GetBeaconRefPhase(const int &stationId, const double &beaconFreq) const
Status InternalGetDataDouble(double &returnData, const std::string &, const std::string &componentName, const IndexMap &componentIndex) const
Manager for RD description of Station-Channels in SQL DB.
Status const
Fetch first item from first row and optionally free query result.
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
std::map< int, std::map< double, beaconRefPhaseOfStation > > fBufferBeaconRefPhases
Interface for detector managers that use MySQL.
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
VMANAGER_GETDATA_HANDLE_DENIED std::vector< double > fBeaconFreqs
Status InternalGetDataVecDouble(std::vector< double > &returnData, const std::string &, const std::string &componentName, const IndexMap &) const
utl::TimeStamp fBeaconFreqsBufferedStopDate
std::vector< double > GetBeaconFrequencies() const
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
utl::TimeStamp fBeaconFreqsBufferedStartDate
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127

, generated on Tue Sep 26 2023.