CMS 3D CMS Logo

MonRunIOV.h
Go to the documentation of this file.
1 #ifndef MONRUNIOV_H
2 #define MONRUNIOV_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
11 
12 typedef int subrun_t;
13 
14 class MonRunIOV : public IIOV {
15  public:
16  friend class EcalCondDBInterface;
17 
18  MonRunIOV();
19  ~MonRunIOV() override;
20 
21  void setID(int id);
22  int getID(){ return m_ID;} ;
23 
24  // Methods for user data
25  void setMonRunTag(const MonRunTag& tag);
26  MonRunTag getMonRunTag() const;
27  void setRunIOV(const RunIOV& iov);
28  RunIOV getRunIOV();
29  void setSubRunNumber(subrun_t subrun);
30  run_t getSubRunNumber() const;
31  void setSubRunStart(const Tm& start);
32  Tm getSubRunStart() const;
33  void setSubRunEnd(const Tm& end);
34  Tm getSubRunEnd() const;
35 
36  // Methods from IUniqueDBObject
37  int fetchID() noexcept(false) override;
38  void setByID(int id) noexcept(false) override;
39 
40  // Operators
41  inline bool operator==(const MonRunIOV &m) const
42  {
43  return ( m_monRunTag == m.m_monRunTag &&
44  m_runIOV == m.m_runIOV &&
45  m_subRunNum == m.m_subRunNum &&
47  m_subRunEnd == m.m_subRunEnd );
48  }
49 
50  inline bool operator!=(const MonRunIOV &m) const { return !(*this == m); }
51 
52  private:
53  // User data for this IOV
59 
60  int writeDB() noexcept(false);
61  void fetchParentIDs(int* monRunTagID, int* runIOVID) noexcept(false);
62 
63  void setByRun(MonRunTag* montag, RunIOV* runiov, subrun_t subrun) noexcept(false);
64 };
65 
66 #endif
Definition: IIOV.h:11
Definition: start.py:1
int subrun_t
Definition: MonRunIOV.h:12
int run_t
Definition: CaliIOV.h:11
void setByID(int id) noexcept(false) override
Definition: MonRunIOV.cc:173
RunIOV m_runIOV
Definition: MonRunIOV.h:55
void fetchParentIDs(int *monRunTagID, int *runIOVID) noexcept(false)
Definition: MonRunIOV.cc:273
RunIOV getRunIOV()
Definition: MonRunIOV.cc:61
int writeDB() noexcept(false)
Definition: MonRunIOV.cc:216
~MonRunIOV() override
Definition: MonRunIOV.cc:26
void setRunIOV(const RunIOV &iov)
Definition: MonRunIOV.cc:53
Tm m_subRunStart
Definition: MonRunIOV.h:57
bool operator!=(const MonRunIOV &m) const
Definition: MonRunIOV.h:50
run_t getSubRunNumber() const
Definition: MonRunIOV.cc:77
int fetchID() noexcept(false) override
Definition: MonRunIOV.cc:118
int getID()
Definition: MonRunIOV.h:22
Tm getSubRunStart() const
Definition: MonRunIOV.cc:94
MonRunTag getMonRunTag() const
Definition: MonRunIOV.cc:46
int subrun_t
Definition: MODRunIOV.h:11
void setSubRunEnd(const Tm &end)
Definition: MonRunIOV.cc:101
void setSubRunNumber(subrun_t subrun)
Definition: MonRunIOV.cc:67
#define end
Definition: vmac.h:39
void setSubRunStart(const Tm &start)
Definition: MonRunIOV.cc:84
MonRunTag m_monRunTag
Definition: MonRunIOV.h:54
#define noexcept
Tm getSubRunEnd() const
Definition: MonRunIOV.cc:111
subrun_t m_subRunNum
Definition: MonRunIOV.h:56
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunIOV.cc:36
void setByRun(MonRunTag *montag, RunIOV *runiov, subrun_t subrun) noexcept(false)
Definition: MonRunIOV.cc:292
Tm m_subRunEnd
Definition: MonRunIOV.h:58
Definition: RunIOV.h:13
Definition: Tm.h:13
bool operator==(const MonRunIOV &m) const
Definition: MonRunIOV.h:41
void setID(int id)
Definition: MonRunIOV.cc:31