CMS 3D CMS Logo

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
DTHVStatusHandler::recoverSnapshot
int recoverSnapshot()
Definition: DTHVStatusHandler.cc:599
DTHVStatusHandler::lastStatus
DTHVStatus * lastStatus
Definition: DTHVStatusHandler.h:93
DTHVStatusHandler::timeLimit
cond::Time_t timeLimit
Definition: DTHVStatusHandler.h:120
PopConSourceHandler.h
DTHVStatusHandler::getLayerSplit
void getLayerSplit()
Definition: DTHVStatusHandler.cc:258
DTHVStatusHandler::pSince
int pSince
Definition: DTHVStatusHandler.h:99
DTHVStatusHandler::splitVersion
std::string splitVersion
Definition: DTHVStatusHandler.h:129
DTHVStatusHandler::snapshotValues
std::map< int, timedMeasurement > snapshotValues
Definition: DTHVStatusHandler.h:113
DTHVStatusHandler::getLayerValues
void getLayerValues(int rawId, int type, float &valueL, float &valueR, float &valueS, float &valueC)
Definition: DTHVStatusHandler.cc:943
DTHVStatusHandler::mapVersion
std::string mapVersion
Definition: DTHVStatusHandler.h:128
DTHVStatusHandler::channelSplit
std::map< int, std::vector< int > * > channelSplit
Definition: DTHVStatusHandler.h:133
DTHVStatus.h
DTHVStatusHandler::dSince
int dSince
Definition: DTHVStatusHandler.h:97
DTHVStatusHandler::dumpAtEnd
bool dumpAtEnd
Definition: DTHVStatusHandler.h:108
protons_cff.time
time
Definition: protons_cff.py:39
DTHVStatusHandler::coralTime
static coral::TimeStamp coralTime(const cond::Time_t &time)
Definition: DTHVStatusHandler.cc:1181
DTHVStatusHandler::getChannelSplit
void getChannelSplit()
Definition: DTHVStatusHandler.cc:300
DTHVStatusHandler::ySince
int ySince
Definition: DTHVStatusHandler.h:95
DTHVStatusHandler::onlineConnect
std::string onlineConnect
Definition: DTHVStatusHandler.h:89
DTHVStatusHandler::createSnapshot
void createSnapshot()
Definition: DTHVStatusHandler.cc:487
DTHVAbstractCheck.h
DTHVStatusHandler::laySplit
std::map< int, int > laySplit
Definition: DTHVStatusHandler.h:132
DTHVStatusHandler::omds_session
cond::persistency::Session omds_session
Definition: DTHVStatusHandler.h:124
DTHVStatusHandler::tmpContainer
std::vector< std::pair< DTHVStatus *, cond::Time_t > > tmpContainer
Definition: DTHVStatusHandler.h:134
DTHVStatusHandler::procUntil
cond::Time_t procUntil
Definition: DTHVStatusHandler.h:117
DTHVStatusHandler
Definition: DTHVStatusHandler.h:40
DTHVStatusHandler::condTime
static cond::Time_t condTime(const coral::TimeStamp &time)
Definition: DTHVStatusHandler.cc:1187
DTHVAbstractCheck
Definition: DTHVAbstractCheck.h:31
DTHVStatusHandler::layerMap
std::map< int, int > layerMap
Definition: DTHVStatusHandler.h:131
DTHVStatusHandler::DTHVStatusHandler
DTHVStatusHandler(const edm::ParameterSet &ps)
Definition: DTHVStatusHandler.cc:49
DTHVStatusHandler::mUntil
int mUntil
Definition: DTHVStatusHandler.h:102
DTHVStatusHandler::buff_session
cond::persistency::Session buff_session
Definition: DTHVStatusHandler.h:126
DTHVAbstractCheck::flag
Definition: DTHVAbstractCheck.h:48
DTHVStatusHandler::getNewObjects
void getNewObjects() override
Definition: DTHVStatusHandler.cc:90
coral
Definition: Binary.h:9
DTWireId
Definition: DTWireId.h:12
DTHVStatusHandler::layerId
static DTWireId layerId(int rawId, int l_p)
Definition: DTHVStatusHandler.cc:1170
DTHVStatusHandler::dUntil
int dUntil
Definition: DTHVStatusHandler.h:103
DTHVStatusHandler::dataTag
std::string dataTag
Definition: DTHVStatusHandler.h:88
DTHVStatusHandler::offlineList
DTHVStatus * offlineList()
Definition: DTHVStatusHandler.cc:871
DTHVStatusHandler::util_session
cond::persistency::Session util_session
Definition: DTHVStatusHandler.h:125
DTHVStatusHandler::hUntil
int hUntil
Definition: DTHVStatusHandler.h:104
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTHVStatusHandler::dumpAtStart
bool dumpAtStart
Definition: DTHVStatusHandler.h:107
DTHVStatusHandler::pUntil
int pUntil
Definition: DTHVStatusHandler.h:105
DTHVStatusHandler::recoverLastTime
cond::Time_t recoverLastTime()
Definition: DTHVStatusHandler.cc:640
DTHVStatusHandler::dumpSnapshot
void dumpSnapshot(const coral::TimeStamp &time)
Definition: DTHVStatusHandler.cc:666
DTHVStatusHandler::checkStatusChange
int checkStatusChange(int type, float oldValue, float newValue)
Definition: DTHVStatusHandler.cc:1030
edm::ParameterSet
Definition: ParameterSet.h:47
DTHVStatusHandler::checkForPeriod
int checkForPeriod(cond::Time_t condSince, cond::Time_t condUntil, int &missingChannels, bool copyOffline)
Definition: DTHVStatusHandler.cc:735
DTHVStatusHandler::aliasMap
std::map< int, int > aliasMap
Definition: DTHVStatusHandler.h:130
DTHVStatusHandler::nextFound
cond::Time_t nextFound
Definition: DTHVStatusHandler.h:119
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
DTHVStatusHandler::setChannelFlag
void setChannelFlag(DTHVStatus *hv, int whe, int sta, int sec, int qua, int lay, int l_p, const DTHVAbstractCheck::flag &flag)
Definition: DTHVStatusHandler.cc:1005
cond::persistency::Session
Definition: Session.h:63
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
DTHVStatusHandler::procSince
cond::Time_t procSince
Definition: DTHVStatusHandler.h:116
DTHVStatusHandler::bwdTime
long long int bwdTime
Definition: DTHVStatusHandler.h:109
DTHVStatusHandler::fwdTime
long long int fwdTime
Definition: DTHVStatusHandler.h:110
DTHVStatusHandler::hSince
int hSince
Definition: DTHVStatusHandler.h:98
DTHVStatusHandler::dumpHVAliases
void dumpHVAliases()
Definition: DTHVStatusHandler.cc:365
DTHVStatusHandler::onlineAuthentication
std::string onlineAuthentication
Definition: DTHVStatusHandler.h:91
DTHVStatusHandler::copyHVData
void copyHVData()
Definition: DTHVStatusHandler.cc:841
DTHVStatusHandler::utilConnect
std::string utilConnect
Definition: DTHVStatusHandler.h:90
popcon::PopConSourceHandler
Definition: PopConSourceHandler.h:30
DTHVStatusHandler::id
std::string id() const override
Definition: DTHVStatusHandler.cc:233
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
DTHVAbstractCheck::timedMeasurement
std::pair< long long int, float > timedMeasurement
check HV status
Definition: DTHVAbstractCheck.h:47
DTHVStatusHandler::yUntil
int yUntil
Definition: DTHVStatusHandler.h:101
DTHVStatusHandler::getChannelMap
void getChannelMap()
Definition: DTHVStatusHandler.cc:235
DTHVStatus
Definition: DTHVStatus.h:70
DTHVStatusHandler::channelValue
std::pair< int, float > channelValue
Definition: DTHVStatusHandler.h:58
DTHVStatusHandler::switchOff
bool switchOff
Definition: DTHVStatusHandler.h:135
DTHVStatusHandler::~DTHVStatusHandler
~DTHVStatusHandler() override
Definition: DTHVStatusHandler.cc:85
DTHVStatusHandler::checkNewData
void checkNewData()
Definition: DTHVStatusHandler.cc:188
DTHVStatusHandler::updateHVStatus
void updateHVStatus()
Definition: DTHVStatusHandler.cc:556
DTHVStatusHandler::filterData
void filterData()
Definition: DTHVStatusHandler.cc:1092
ParameterSet.h
DTHVStatusHandler::maxPayload
int maxPayload
Definition: DTHVStatusHandler.h:122
DTHVStatusHandler::bufferConnect
std::string bufferConnect
Definition: DTHVStatusHandler.h:92
DTHVStatusHandler::lastStamp
long long int lastStamp
Definition: DTHVStatusHandler.h:121
DTHVStatusHandler::sUntil
int sUntil
Definition: DTHVStatusHandler.h:106
Session.h
DTHVStatusHandler::mSince
int mSince
Definition: DTHVStatusHandler.h:96
DTHVStatusHandler::timedMeasurement
DTHVAbstractCheck::timedMeasurement timedMeasurement
Definition: DTHVStatusHandler.h:57
DTHVStatusHandler::lastFound
cond::Time_t lastFound
Definition: DTHVStatusHandler.h:118
DTHVStatusHandler::sSince
int sSince
Definition: DTHVStatusHandler.h:100
DTHVStatusHandler::minTime
long long int minTime
Definition: DTHVStatusHandler.h:111
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
DTHVStatusHandler::hvChecker
DTHVAbstractCheck * hvChecker
Definition: DTHVStatusHandler.h:114