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  private:
44  void setStatusForBarrel(RunDCSHVDat&, const Tm&);
45  void setStatusForEndcaps(RunDCSHVDat&, const Tm&);
46  ResultSet* getBarrelRset();
47  ResultSet* getBarrelRset(const Tm& timeStart) ;
48 
49  ResultSet* getEndcapAnodeRset();
50  ResultSet* getEndcapDynodeRset();
51 
52  ResultSet* getEndcapAnodeRset(const Tm& timestart);
53  ResultSet* getEndcapDynodeRset(const Tm& timestart);
54  int nowMicroseconds();
55  void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSHVDat >* );
56  // void fillTheMapByTime(ResultSet *, std::list< std::pair< Tm, std::map< EcalLogicID, RunDCSHVDat > > >* ) ;
57  void fillTheMapByTime(ResultSet *rset, std::list< DataReducer<RunDCSHVDat>::MyData<RunDCSHVDat> >* my_data_list ) ;
58 
59 
60  void prepareWrite()
61  noexcept(false) override;
62 
63  void writeDB(const EcalLogicID* ecid, const RunDCSHVDat* item, RunIOV* iov )
64  noexcept(false);
65 
66  void fetchData(std::map< EcalLogicID, RunDCSHVDat >* fillMap, RunIOV* iov)
67  noexcept(false);
68 
69  void fetchLastData(std::map< EcalLogicID, RunDCSHVDat >* fillMap)
70  noexcept(false);
71 
72  void fetchHistoricalData(std::list< std::pair<Tm, std::map< EcalLogicID, RunDCSHVDat > > >* fillMap, const Tm& timeStart )
73  noexcept(false);
74 
75 
76  // User data
77  float m_hv;
78  float m_hvnom;
79  int m_status;
80  int m_tstatus;
81 };
82 
83 #endif
static const int maxHVDifferenceEB
Definition: RunDCSHVDat.h:20
oracle::occi::ResultSet ResultSet
Definition: RunDCSHVDat.h:17
float getHVNominal() const
Definition: RunDCSHVDat.h:39
void setStatusForEndcaps(RunDCSHVDat &, const Tm &)
Definition: RunDCSHVDat.cc:396
ResultSet * getEndcapDynodeRset()
Definition: RunDCSHVDat.cc:208
std::string getEEAccount()
Definition: RunDCSHVDat.h:34
void writeDB(const EcalLogicID *ecid, const RunDCSHVDat *item, RunIOV *iov) noexcept(false)
Definition: RunDCSHVDat.cc:46
ResultSet * getEndcapAnodeRset()
Definition: RunDCSHVDat.cc:187
#define noexcept
float m_hv
Definition: RunDCSHVDat.h:77
ResultSet * getBarrelRset()
Definition: RunDCSHVDat.cc:166
void fetchHistoricalData(std::list< std::pair< Tm, std::map< EcalLogicID, RunDCSHVDat > > > *fillMap, const Tm &timeStart) noexcept(false)
Definition: RunDCSHVDat.cc:444
static const int HVNOTNOMINAL
Definition: RunDCSHVDat.h:24
void fetchData(std::map< EcalLogicID, RunDCSHVDat > *fillMap, RunIOV *iov) noexcept(false)
Definition: RunDCSHVDat.cc:53
~RunDCSHVDat() override
Definition: RunDCSHVDat.cc:31
std::string getEBAccount()
Definition: RunDCSHVDat.h:33
void setStatusForBarrel(RunDCSHVDat &, const Tm &)
Definition: RunDCSHVDat.cc:374
int getStatus() const
Definition: RunDCSHVDat.h:40
static const int minHV
Definition: RunDCSHVDat.h:22
static const int maxHVDifferenceEE
Definition: RunDCSHVDat.h:21
float m_hvnom
Definition: RunDCSHVDat.h:78
void fetchLastData(std::map< EcalLogicID, RunDCSHVDat > *fillMap) noexcept(false)
Definition: RunDCSHVDat.cc:414
void prepareWrite() noexcept(false) override
Definition: RunDCSHVDat.cc:37
void setTimeStatus(int t)
Definition: RunDCSHVDat.h:42
void setStatus(int t)
Definition: RunDCSHVDat.h:36
void setHVNominal(float t)
Definition: RunDCSHVDat.h:37
static const int HVOFF
Definition: RunDCSHVDat.h:25
void fillTheMapByTime(ResultSet *rset, std::list< DataReducer< RunDCSHVDat >::MyData< RunDCSHVDat > > *my_data_list)
Definition: RunDCSHVDat.cc:273
std::string getTable() override
Definition: RunDCSHVDat.h:32
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSHVDat > *)
Definition: RunDCSHVDat.cc:229
int nowMicroseconds()
Definition: RunDCSHVDat.cc:364
void setHV(float t)
Definition: RunDCSHVDat.h:35
Definition: RunIOV.h:13
Definition: Tm.h:13
float getHV() const
Definition: RunDCSHVDat.h:38
int getTimeStatus()
Definition: RunDCSHVDat.h:41
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
static const int maxDifference
Definition: RunDCSHVDat.h:19