CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
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:
48  int nowMicroseconds();
49  void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat >* );
50  void prepareWrite()
51  throw(std::runtime_error);
52 
53  void writeDB(const EcalLogicID* ecid, const RunDCSLVDat* item, RunIOV* iov )
54  throw(std::runtime_error);
55 
57  throw(std::runtime_error);
58 
59  void fetchLastData(std::map< EcalLogicID, RunDCSLVDat >* fillMap)
60  throw(std::runtime_error);
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:123
std::string getEBAccount()
Definition: RunDCSLVDat.h:32
static const int maxLVDifferenceEE
Definition: RunDCSLVDat.h:20
int getStatus() const
Definition: RunDCSLVDat.h:39
float getLV() const
Definition: RunDCSLVDat.h:37
void setLV(float t)
Definition: RunDCSLVDat.h:34
void setStatusForBarrel(RunDCSLVDat &, Tm)
Definition: RunDCSLVDat.cc:132
dictionary map
Definition: Association.py:205
float m_lvnom
Definition: RunDCSLVDat.h:64
void writeDB(const EcalLogicID *ecid, const RunDCSLVDat *item, RunIOV *iov)
Definition: RunDCSLVDat.cc:41
tuple iov
Definition: o2o.py:307
float getLVNominal() const
Definition: RunDCSLVDat.h:38
void fetchLastData(std::map< EcalLogicID, RunDCSLVDat > *fillMap)
Definition: RunDCSLVDat.cc:172
std::string getTable()
Definition: RunDCSLVDat.h:31
static const int maxLVDifferenceEB
Definition: RunDCSLVDat.h:19
void fetchData(std::map< EcalLogicID, RunDCSLVDat > *fillMap, RunIOV *iov)
Definition: RunDCSLVDat.cc:48
oracle::occi::ResultSet ResultSet
Definition: RunDCSLVDat.h:16
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat > *)
Definition: RunDCSLVDat.cc:89
int getTimeStatus()
Definition: RunDCSLVDat.h:40
static const int LVOFF
Definition: RunDCSLVDat.h:24
void setStatus(int t)
Definition: RunDCSLVDat.h:35
string const
Definition: compareJSON.py:14
oracle::occi::ResultSet ResultSet
Definition: HcalDbOmds.cc:21
ResultSet * getBarrelRset()
Definition: RunDCSLVDat.cc:55
ResultSet * getEndcapRset()
Definition: RunDCSLVDat.cc:72
void prepareWrite()
Definition: RunDCSLVDat.cc:32
static const int maxDifference
Definition: RunDCSLVDat.h:18
static const int LVNOTNOMINAL
Definition: RunDCSLVDat.h:23
void setLVNominal(float t)
Definition: RunDCSLVDat.h:36
void setStatusForEndcaps(RunDCSLVDat &, Tm)
Definition: RunDCSLVDat.cc:152
void fillMap(Registry *reg, regmap_type &fillme)
Definition: Registry.cc:24
static const int minLV
Definition: RunDCSLVDat.h:21
Definition: RunIOV.h:13
float m_lv
Definition: RunDCSLVDat.h:63
Definition: Tm.h:14
void setTimeStatus(int t)
Definition: RunDCSLVDat.h:41