CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTHVStatusHandler.h
Go to the documentation of this file.
1 #ifndef DTHVStatusHandler_H
2 #define DTHVStatusHandler_H
3 
14 //----------------------
15 // Base Class Headers --
16 //----------------------
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
25 #include <string>
26 
27 namespace coral {
28  class TimeStamp;
29 }
31 
32 //---------------
33 // C++ Headers --
34 //---------------
35 
36 // ---------------------
37 // -- Class Interface --
38 // ---------------------
39 
40 class DTHVStatusHandler : public popcon::PopConSourceHandler<DTHVStatus> {
41 public:
45 
48  ~DTHVStatusHandler() override;
49 
52  void getNewObjects() override;
54  std::string id() const override;
55 
56 private:
58  typedef std::pair<int, float> channelValue;
59 
60  void checkNewData();
61 
62  void getChannelMap();
63  void getLayerSplit();
64  void getChannelSplit();
65  void dumpHVAliases();
66 
67  void createSnapshot();
68  int recoverSnapshot();
70  void dumpSnapshot(const coral::TimeStamp& time);
71  void updateHVStatus();
72  int checkForPeriod(cond::Time_t condSince, cond::Time_t condUntil, int& missingChannels, bool copyOffline);
73 
74  void copyHVData();
76  void getLayerValues(int rawId, int type, float& valueL, float& valueR, float& valueS, float& valueC);
77  void setChannelFlag(
78  DTHVStatus* hv, int whe, int sta, int sec, int qua, int lay, int l_p, const DTHVAbstractCheck::flag& flag);
79 
80  int checkStatusChange(int type, float oldValue, float newValue);
81  void filterData();
82 
83  static DTWireId layerId(int rawId, int l_p);
84  static coral::TimeStamp coralTime(const cond::Time_t& time);
85  static cond::Time_t condTime(const coral::TimeStamp& time);
86  static cond::Time_t condTime(long long int time);
87 
94 
95  int ySince;
96  int mSince;
97  int dSince;
98  int hSince;
99  int pSince;
100  int sSince;
101  int yUntil;
102  int mUntil;
103  int dUntil;
104  int hUntil;
105  int pUntil;
106  int sUntil;
108  bool dumpAtEnd;
109  long long int bwdTime;
110  long long int fwdTime;
111  long long int minTime;
112 
113  std::map<int, timedMeasurement> snapshotValues;
115 
121  long long int lastStamp;
123 
127 
130  std::map<int, int> aliasMap;
131  std::map<int, int> layerMap;
132  std::map<int, int> laySplit;
133  std::map<int, std::vector<int>*> channelSplit;
134  std::vector<std::pair<DTHVStatus*, cond::Time_t> > tmpContainer;
135  bool switchOff;
136 };
137 
138 #endif // DTHVStatusHandler_H
DTHVStatus * lastStatus
long long int lastStamp
DTHVAbstractCheck::timedMeasurement timedMeasurement
cond::Time_t lastFound
long long int minTime
cond::persistency::Session omds_session
cond::Time_t procUntil
void getLayerValues(int rawId, int type, float &valueL, float &valueR, float &valueS, float &valueC)
cond::persistency::Session buff_session
std::string onlineConnect
std::map< int, int > laySplit
static DTWireId layerId(int rawId, int l_p)
DTHVStatusHandler(const edm::ParameterSet &ps)
cond::persistency::Session util_session
DTHVStatus * offlineList()
cond::Time_t recoverLastTime()
static coral::TimeStamp coralTime(const cond::Time_t &time)
std::vector< std::pair< DTHVStatus *, cond::Time_t > > tmpContainer
int checkStatusChange(int type, float oldValue, float newValue)
std::map< int, int > layerMap
cond::Time_t nextFound
unsigned long long Time_t
Definition: Time.h:14
cond::Time_t procSince
long long int fwdTime
void dumpSnapshot(const coral::TimeStamp &time)
static cond::Time_t condTime(const coral::TimeStamp &time)
std::string utilConnect
void getNewObjects() override
int checkForPeriod(cond::Time_t condSince, cond::Time_t condUntil, int &missingChannels, bool copyOffline)
void setChannelFlag(DTHVStatus *hv, int whe, int sta, int sec, int qua, int lay, int l_p, const DTHVAbstractCheck::flag &flag)
long long int bwdTime
std::string onlineAuthentication
std::map< int, int > aliasMap
std::pair< int, float > channelValue
std::pair< long long int, float > timedMeasurement
check HV status
~DTHVStatusHandler() override
DTHVAbstractCheck * hvChecker
std::string id() const override
std::string bufferConnect
std::map< int, timedMeasurement > snapshotValues
cond::Time_t timeLimit
std::map< int, std::vector< int > * > channelSplit
std::string splitVersion