RBadStationSQLManager.h
Go to the documentation of this file.
1 #ifndef _rdet_RBadStationSQLManager_h_
2 #define _rdet_RBadStationSQLManager_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/ResponseMap.h>
12 #include <utl/LeapSeconds.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 
29  struct BadPeriod {
30  unsigned long long int reason;
31  unsigned long startGPSSecond;
32  unsigned long stopGPSSecond;
33  std::string comment;
34  std::string reporter;
35 
37  };
38 
39 
51 
52  public:
54 
55  virtual ~RBadStationSQLManager() { }
56 
57  void Init(const std::string& configLink);
58 
60  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<int>)
61  VMANAGER_GETDATA_NOTFOUND(std::string)
63  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
64  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
65  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
66  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
67  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
68  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
69  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
70  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
71  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
72  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
73  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
74  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
75 
76  private:
77  Status InternalGetData(std::vector<int>& returnData, const std::string& componentProperty,
78  const std::string& componentName, const IndexMap& /*componentIndex*/) const;
79 
80  //VMANAGER_GETDATA_HANDLE_DENIED
81 
82  virtual
83  Status
84  GenericGetData(Handle& returnData,
85  const std::string& component,
86  const std::string& property,
87  const IndexMap& index) const;
88 
89  int GetBadPeriod(const int stationId) const;
90 
91  unsigned long long int GetBadPeriodFromBuffer(const int stationId) const;
92 
93  bool BufferBadPeriodTable() const;
94 
95  // stores all bad periods for all station, the station id (e.g. "110" for AERA_10) is the key
96  mutable std::map<int, std::vector<BadPeriod> > fBadPeriodList;
97 
98  };
99 
100 }
101 
102 
103 #endif
int GetBadPeriod(const int stationId) const
virtual Status GenericGetData(Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index) const
Status InternalGetData(std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &) const
Status const
Fetch first item from first row and optionally free query result.
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
Interface for detector managers that use MySQL.
unsigned long long int reason
Manager for RD Bad Stations.
unsigned long long int GetBadPeriodFromBuffer(const int stationId) const
unsigned long startGPSSecond
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
std::map< int, std::vector< BadPeriod > > fBadPeriodList
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
unsigned long stopGPSSecond
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...

, generated on Tue Sep 26 2023.