CMS 3D CMS Logo

RunDCSLVDat.h
Go to the documentation of this file.
1 #ifndef RUNDCSLVEBDAT_H
2 #define RUNDCSLVEBDAT_H
3 
4 #include <vector>
5 #include <stdexcept>
6 
13 
14 class RunDCSLVDat : public IDataItem {
15 public:
16  typedef oracle::occi::ResultSet ResultSet;
17 
18  static const int maxDifference = 30 * 60 * 1000000; // 30 minutes
19  static const int maxLVDifferenceEB = 1000; // max LV tolerance in mV for EB
20  static const int maxLVDifferenceEE = 1000; // max LV tolerance in mV for EE
21  static const int minLV = 2000; // if LV less than this value (in mV) LV is off
22 
23  static const int LVNOTNOMINAL = 1;
24  static const int LVOFF = 2;
25 
26  friend class EcalCondDBInterface;
27  RunDCSLVDat();
28  ~RunDCSLVDat() override;
29 
30  // User data methods
31  inline std::string getTable() override { return ""; }
32  inline std::string getEBAccount() { return "CMS_ECAL_LV_PVSS_COND"; }
33  inline std::string getEEAccount() { return "CMS_ECAL_LV_PVSS_COND"; }
34  inline void setLV(float t) { m_lv = t; }
35  inline void setStatus(int t) { m_status = t; }
36  inline void setLVNominal(float t) { m_lvnom = t; }
37  inline float getLV() const { return m_lv; }
38  inline float getLVNominal() const { return m_lvnom; }
39  inline int getStatus() const { return m_status; }
40  int getTimeStatus() { return m_tstatus; }
41  void setTimeStatus(int t) { m_tstatus = t; }
42 
43 private:
44  void setStatusForBarrel(RunDCSLVDat&, const Tm&);
45  void setStatusForEndcaps(RunDCSLVDat&, const Tm&);
48  int nowMicroseconds();
49  void fillTheMap(ResultSet*, std::map<EcalLogicID, RunDCSLVDat>*);
50  void prepareWrite() noexcept(false) override;
51 
52  void writeDB(const EcalLogicID* ecid, const RunDCSLVDat* item, RunIOV* iov) noexcept(false);
53 
54  void fetchData(std::map<EcalLogicID, RunDCSLVDat>* fillMap, RunIOV* iov) noexcept(false);
55 
56  void fetchLastData(std::map<EcalLogicID, RunDCSLVDat>* fillMap) noexcept(false);
57 
58  // User data
59  float m_lv;
60  float m_lvnom;
61  int m_status;
62  int m_tstatus;
63 };
64 
65 #endif
RunDCSLVDat::getEndcapRset
ResultSet * getEndcapRset()
Definition: RunDCSLVDat.cc:60
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
RunDCSLVDat::fillTheMap
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat > *)
Definition: RunDCSLVDat.cc:87
IDataItem.h
RunIOV
Definition: RunIOV.h:13
RunDCSLVDat::getTable
std::string getTable() override
Definition: RunDCSLVDat.h:31
funct::false
false
Definition: Factorize.h:34
RunDCSLVDat::nowMicroseconds
int nowMicroseconds()
Definition: RunDCSLVDat.cc:123
RunDCSLVDat::setLVNominal
void setLVNominal(float t)
Definition: RunDCSLVDat.h:36
RunDCSLVDat::getEBAccount
std::string getEBAccount()
Definition: RunDCSLVDat.h:32
RunDCSLVDat
Definition: RunDCSLVDat.h:14
RunDCSLVDat::getTimeStatus
int getTimeStatus()
Definition: RunDCSLVDat.h:40
RunDCSLVDat::~RunDCSLVDat
~RunDCSLVDat() override
Definition: RunDCSLVDat.cc:23
RunIOV.h
RunDCSLVDat::m_tstatus
int m_tstatus
Definition: RunDCSLVDat.h:62
RunDCSLVDat::maxLVDifferenceEB
static const int maxLVDifferenceEB
Definition: RunDCSLVDat.h:19
RunDCSLVDat::getLV
float getLV() const
Definition: RunDCSLVDat.h:37
RunDCSLVDat::m_status
int m_status
Definition: RunDCSLVDat.h:61
watchdog.const
const
Definition: watchdog.py:83
RunDCSLVDat::m_lvnom
float m_lvnom
Definition: RunDCSLVDat.h:60
RunDCSLVDat::m_lv
float m_lv
Definition: RunDCSLVDat.h:59
RunDCSLVDat::maxDifference
static const int maxDifference
Definition: RunDCSLVDat.h:18
RunDCSLVDat::minLV
static const int minLV
Definition: RunDCSLVDat.h:21
RunDCSLVDat::setTimeStatus
void setTimeStatus(int t)
Definition: RunDCSLVDat.h:41
IDataItem
Definition: IDataItem.h:16
EcalLogicID
Definition: EcalLogicID.h:7
RunDCSLVDat::getBarrelRset
ResultSet * getBarrelRset()
Definition: RunDCSLVDat.cc:33
OrderedSet.t
t
Definition: OrderedSet.py:90
Tm
Definition: Tm.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunDCSLVDat::LVNOTNOMINAL
static const int LVNOTNOMINAL
Definition: RunDCSLVDat.h:23
RunDCSLVDat::getEEAccount
std::string getEEAccount()
Definition: RunDCSLVDat.h:33
RunDCSLVDat::getStatus
int getStatus() const
Definition: RunDCSLVDat.h:39
RunDCSLVDat::setLV
void setLV(float t)
Definition: RunDCSLVDat.h:34
RunDCSLVDat::setStatusForEndcaps
void setStatusForEndcaps(RunDCSLVDat &, const Tm &)
Definition: RunDCSLVDat.cc:149
Tm.h
RunDCSLVDat::setStatusForBarrel
void setStatusForBarrel(RunDCSLVDat &, const Tm &)
Definition: RunDCSLVDat.cc:131
RunDCSLVDat::prepareWrite
void prepareWrite() noexcept(false) override
Definition: RunDCSLVDat.cc:25
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
RunDCSLVDat::setStatus
void setStatus(int t)
Definition: RunDCSLVDat.h:35
RunDCSLVDat::getLVNominal
float getLVNominal() const
Definition: RunDCSLVDat.h:38
EcalLogicID.h
RunDCSLVDat::writeDB
void writeDB(const EcalLogicID *ecid, const RunDCSLVDat *item, RunIOV *iov) noexcept(false)
Definition: RunDCSLVDat.cc:27
RunDCSLVDat::ResultSet
oracle::occi::ResultSet ResultSet
Definition: RunDCSLVDat.h:16
std
Definition: JetResolutionObject.h:76
RunDCSLVDat::fetchLastData
void fetchLastData(std::map< EcalLogicID, RunDCSLVDat > *fillMap) noexcept(false)
Definition: RunDCSLVDat.cc:167
Oracle.h
DateHandler.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
RunDCSLVDat::fetchData
void fetchData(std::map< EcalLogicID, RunDCSLVDat > *fillMap, RunIOV *iov) noexcept(false)
Definition: RunDCSLVDat.cc:29
RunDCSLVDat::maxLVDifferenceEE
static const int maxLVDifferenceEE
Definition: RunDCSLVDat.h:20
RunDCSLVDat::RunDCSLVDat
RunDCSLVDat()
Definition: RunDCSLVDat.cc:11
RunDCSLVDat::LVOFF
static const int LVOFF
Definition: RunDCSLVDat.h:24