CMS 3D CMS Logo

RunDCSHVDat.h
Go to the documentation of this file.
1 #ifndef RUNDCSHVEBDAT_H
2 #define RUNDCSHVEBDAT_H
3 
4 #include <vector>
5 #include <stdexcept>
6 
14 
15 class RunDCSHVDat : public IDataItem {
16 public:
17  typedef oracle::occi::ResultSet ResultSet;
18 
19  static const int maxDifference = 30 * 60 * 1000000; // 30 minutes
20  static const int maxHVDifferenceEB = 300; // max HV tolerance in mV for EB
21  static const int maxHVDifferenceEE = 5000; // max HV tolerance in mV for EE
22  static const int minHV = 10000; // if HV less than this value (in mV) HV is off
23 
24  static const int HVNOTNOMINAL = 1;
25  static const int HVOFF = 2;
26 
27  friend class EcalCondDBInterface;
28  RunDCSHVDat();
29  ~RunDCSHVDat() override;
30 
31  // User data methods
32  inline std::string getTable() override { return ""; }
33  inline std::string getEBAccount() { return "CMS_ECAL_HV_PVSS_COND"; }
34  inline std::string getEEAccount() { return "CMS_EE_HV_PVSS_COND"; }
35  inline void setHV(float t) { m_hv = t; }
36  inline void setStatus(int t) { m_status = t; }
37  inline void setHVNominal(float t) { m_hvnom = t; }
38  inline float getHV() const { return m_hv; }
39  inline float getHVNominal() const { return m_hvnom; }
40  inline int getStatus() const { return m_status; }
41  int getTimeStatus() { return m_tstatus; }
42  void setTimeStatus(int t) { m_tstatus = t; }
43 
44 private:
45  void setStatusForBarrel(RunDCSHVDat&, const Tm&);
46  void setStatusForEndcaps(RunDCSHVDat&, const Tm&);
48  ResultSet* getBarrelRset(const Tm& timeStart);
49 
52 
53  ResultSet* getEndcapAnodeRset(const Tm& timestart);
54  ResultSet* getEndcapDynodeRset(const Tm& timestart);
55  int nowMicroseconds();
56  void fillTheMap(ResultSet*, std::map<EcalLogicID, RunDCSHVDat>*);
57  // void fillTheMapByTime(ResultSet *, std::list< std::pair< Tm, std::map< EcalLogicID, RunDCSHVDat > > >* ) ;
59 
60  void prepareWrite() noexcept(false) override;
61 
62  void writeDB(const EcalLogicID* ecid, const RunDCSHVDat* item, RunIOV* iov) noexcept(false);
63 
64  void fetchData(std::map<EcalLogicID, RunDCSHVDat>* fillMap, RunIOV* iov) noexcept(false);
65 
66  void fetchLastData(std::map<EcalLogicID, RunDCSHVDat>* fillMap) noexcept(false);
67 
68  void fetchHistoricalData(std::list<std::pair<Tm, std::map<EcalLogicID, RunDCSHVDat> > >* fillMap,
69  const Tm& timeStart) noexcept(false);
70 
71  // User data
72  float m_hv;
73  float m_hvnom;
74  int m_status;
75  int m_tstatus;
76 };
77 
78 #endif
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
IDataItem.h
RunIOV
Definition: RunIOV.h:13
funct::false
false
Definition: Factorize.h:34
RunDCSHVDat::m_hv
float m_hv
Definition: RunDCSHVDat.h:72
RunDCSHVDat::HVNOTNOMINAL
static const int HVNOTNOMINAL
Definition: RunDCSHVDat.h:24
RunIOV.h
RunDCSHVDat::fetchData
void fetchData(std::map< EcalLogicID, RunDCSHVDat > *fillMap, RunIOV *iov) noexcept(false)
Definition: RunDCSHVDat.cc:34
RunDCSHVDat::getEndcapAnodeRset
ResultSet * getEndcapAnodeRset()
Definition: RunDCSHVDat.cc:186
RunDCSHVDat::fetchHistoricalData
void fetchHistoricalData(std::list< std::pair< Tm, std::map< EcalLogicID, RunDCSHVDat > > > *fillMap, const Tm &timeStart) noexcept(false)
Definition: RunDCSHVDat.cc:443
RunDCSHVDat::writeDB
void writeDB(const EcalLogicID *ecid, const RunDCSHVDat *item, RunIOV *iov) noexcept(false)
Definition: RunDCSHVDat.cc:32
RunDCSHVDat::getStatus
int getStatus() const
Definition: RunDCSHVDat.h:40
watchdog.const
const
Definition: watchdog.py:83
DataReducer.h
IDataItem
Definition: IDataItem.h:16
RunDCSHVDat
Definition: RunDCSHVDat.h:15
RunDCSHVDat::setStatusForBarrel
void setStatusForBarrel(RunDCSHVDat &, const Tm &)
Definition: RunDCSHVDat.cc:377
RunDCSHVDat::getBarrelRset
ResultSet * getBarrelRset()
Definition: RunDCSHVDat.cc:159
EcalLogicID
Definition: EcalLogicID.h:7
OrderedSet.t
t
Definition: OrderedSet.py:90
RunDCSHVDat::~RunDCSHVDat
~RunDCSHVDat() override
Definition: RunDCSHVDat.cc:28
Tm
Definition: Tm.h:13
RunDCSHVDat::getEBAccount
std::string getEBAccount()
Definition: RunDCSHVDat.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunDCSHVDat::maxHVDifferenceEE
static const int maxHVDifferenceEE
Definition: RunDCSHVDat.h:21
RunDCSHVDat::m_status
int m_status
Definition: RunDCSHVDat.h:74
RunDCSHVDat::getHV
float getHV() const
Definition: RunDCSHVDat.h:38
RunDCSHVDat::prepareWrite
void prepareWrite() noexcept(false) override
Definition: RunDCSHVDat.cc:30
RunDCSHVDat::minHV
static const int minHV
Definition: RunDCSHVDat.h:22
RunDCSHVDat::m_hvnom
float m_hvnom
Definition: RunDCSHVDat.h:73
RunDCSHVDat::HVOFF
static const int HVOFF
Definition: RunDCSHVDat.h:25
Tm.h
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
RunDCSHVDat::RunDCSHVDat
RunDCSHVDat()
Definition: RunDCSHVDat.cc:16
RunDCSHVDat::fillTheMap
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSHVDat > *)
Definition: RunDCSHVDat.cc:240
EcalLogicID.h
RunDCSHVDat::nowMicroseconds
int nowMicroseconds()
Definition: RunDCSHVDat.cc:369
RunDCSHVDat::fetchLastData
void fetchLastData(std::map< EcalLogicID, RunDCSHVDat > *fillMap) noexcept(false)
Definition: RunDCSHVDat.cc:416
std
Definition: JetResolutionObject.h:76
RunDCSHVDat::setTimeStatus
void setTimeStatus(int t)
Definition: RunDCSHVDat.h:42
RunDCSHVDat::m_tstatus
int m_tstatus
Definition: RunDCSHVDat.h:75
DataReducer
Definition: DataReducer.h:20
RunDCSHVDat::setStatus
void setStatus(int t)
Definition: RunDCSHVDat.h:36
RunDCSHVDat::getTable
std::string getTable() override
Definition: RunDCSHVDat.h:32
Oracle.h
DateHandler.h
RunDCSHVDat::ResultSet
oracle::occi::ResultSet ResultSet
Definition: RunDCSHVDat.h:17
RunDCSHVDat::setHVNominal
void setHVNominal(float t)
Definition: RunDCSHVDat.h:37
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
genParticles_cff.map
map
Definition: genParticles_cff.py:11
RunDCSHVDat::getHVNominal
float getHVNominal() const
Definition: RunDCSHVDat.h:39
RunDCSHVDat::getEndcapDynodeRset
ResultSet * getEndcapDynodeRset()
Definition: RunDCSHVDat.cc:213
RunDCSHVDat::getEEAccount
std::string getEEAccount()
Definition: RunDCSHVDat.h:34
RunDCSHVDat::fillTheMapByTime
void fillTheMapByTime(ResultSet *rset, std::list< DataReducer< RunDCSHVDat >::MyData< RunDCSHVDat > > *my_data_list)
Definition: RunDCSHVDat.cc:278
RunDCSHVDat::setHV
void setHV(float t)
Definition: RunDCSHVDat.h:35
RunDCSHVDat::maxDifference
static const int maxDifference
Definition: RunDCSHVDat.h:19
RunDCSHVDat::maxHVDifferenceEB
static const int maxHVDifferenceEB
Definition: RunDCSHVDat.h:20
RunDCSHVDat::setStatusForEndcaps
void setStatusForEndcaps(RunDCSHVDat &, const Tm &)
Definition: RunDCSHVDat.cc:398
RunDCSHVDat::getTimeStatus
int getTimeStatus()
Definition: RunDCSHVDat.h:41