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();
29 
30  // User data methods
31  inline std::string getTable() { 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&);
46  ResultSet* getBarrelRset();
47  ResultSet* getEndcapRset();
48  int nowMicroseconds();
49  void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat >* );
50  void prepareWrite()
51  noexcept(false);
52 
53  void writeDB(const EcalLogicID* ecid, const RunDCSLVDat* item, RunIOV* iov )
54  noexcept(false);
55 
56  void fetchData(std::map< EcalLogicID, RunDCSLVDat >* fillMap, RunIOV* iov)
57  noexcept(false);
58 
59  void fetchLastData(std::map< EcalLogicID, RunDCSLVDat >* fillMap)
60  noexcept(false);
61 
62  // User data
63  float m_lv;
64  float m_lvnom;
65  int m_status;
66  int m_tstatus;
67 };
68 
69 #endif
std::string getEEAccount()
Definition: RunDCSLVDat.h:33
int nowMicroseconds()
Definition: RunDCSLVDat.cc:135
std::string getEBAccount()
Definition: RunDCSLVDat.h:32
static const int maxLVDifferenceEE
Definition: RunDCSLVDat.h:20
int getStatus() const
Definition: RunDCSLVDat.h:39
#define noexcept
float getLV() const
Definition: RunDCSLVDat.h:37
void setLV(float t)
Definition: RunDCSLVDat.h:34
void fetchData(std::map< EcalLogicID, RunDCSLVDat > *fillMap, RunIOV *iov) noexcept(false)
Definition: RunDCSLVDat.cc:48
float m_lvnom
Definition: RunDCSLVDat.h:64
float getLVNominal() const
Definition: RunDCSLVDat.h:38
std::string getTable()
Definition: RunDCSLVDat.h:31
static const int maxLVDifferenceEB
Definition: RunDCSLVDat.h:19
oracle::occi::ResultSet ResultSet
Definition: RunDCSLVDat.h:16
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat > *)
Definition: RunDCSLVDat.cc:97
int getTimeStatus()
Definition: RunDCSLVDat.h:40
static const int LVOFF
Definition: RunDCSLVDat.h:24
void setStatus(int t)
Definition: RunDCSLVDat.h:35
void setStatusForEndcaps(RunDCSLVDat &, const Tm &)
Definition: RunDCSLVDat.cc:164
void writeDB(const EcalLogicID *ecid, const RunDCSLVDat *item, RunIOV *iov) noexcept(false)
Definition: RunDCSLVDat.cc:41
ResultSet * getBarrelRset()
Definition: RunDCSLVDat.cc:55
ResultSet * getEndcapRset()
Definition: RunDCSLVDat.cc:76
static const int maxDifference
Definition: RunDCSLVDat.h:18
void prepareWrite() noexcept(false)
Definition: RunDCSLVDat.cc:32
static const int LVNOTNOMINAL
Definition: RunDCSLVDat.h:23
void fetchLastData(std::map< EcalLogicID, RunDCSLVDat > *fillMap) noexcept(false)
Definition: RunDCSLVDat.cc:184
void setLVNominal(float t)
Definition: RunDCSLVDat.h:36
static const int minLV
Definition: RunDCSLVDat.h:21
Definition: RunIOV.h:13
float m_lv
Definition: RunDCSLVDat.h:63
Definition: Tm.h:13
void setTimeStatus(int t)
Definition: RunDCSLVDat.h:41
void setStatusForBarrel(RunDCSLVDat &, const Tm &)
Definition: RunDCSLVDat.cc:144