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  return (m_monRunTag == m.m_monRunTag && m_runIOV == m.m_runIOV && m_subRunNum == m.m_subRunNum &&
44  }
45 
46  inline bool operator!=(const MonRunIOV& m) const { return !(*this == m); }
47 
48 private:
49  // User data for this IOV
55 
56  int writeDB() noexcept(false);
57  void fetchParentIDs(int* monRunTagID, int* runIOVID) noexcept(false);
58 
59  void setByRun(MonRunTag* montag, RunIOV* runiov, subrun_t subrun) noexcept(false);
60 };
61 
62 #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:124
RunIOV m_runIOV
Definition: MonRunIOV.h:51
void fetchParentIDs(int *monRunTagID, int *runIOVID) noexcept(false)
Definition: MonRunIOV.cc:217
RunIOV getRunIOV()
Definition: MonRunIOV.cc:43
int writeDB() noexcept(false)
Definition: MonRunIOV.cc:163
~MonRunIOV() override
Definition: MonRunIOV.cc:23
void setRunIOV(const RunIOV &iov)
Definition: MonRunIOV.cc:36
Tm m_subRunStart
Definition: MonRunIOV.h:53
bool operator!=(const MonRunIOV &m) const
Definition: MonRunIOV.h:46
run_t getSubRunNumber() const
Definition: MonRunIOV.cc:52
int fetchID() noexcept(false) override
Definition: MonRunIOV.cc:72
int getID()
Definition: MonRunIOV.h:22
Tm getSubRunStart() const
Definition: MonRunIOV.cc:61
MonRunTag getMonRunTag() const
Definition: MonRunIOV.cc:34
int subrun_t
Definition: MODRunIOV.h:11
void setSubRunEnd(const Tm &end)
Definition: MonRunIOV.cc:63
void setSubRunNumber(subrun_t subrun)
Definition: MonRunIOV.cc:45
#define end
Definition: vmac.h:39
void setSubRunStart(const Tm &start)
Definition: MonRunIOV.cc:54
MonRunTag m_monRunTag
Definition: MonRunIOV.h:50
#define noexcept
Tm getSubRunEnd() const
Definition: MonRunIOV.cc:70
subrun_t m_subRunNum
Definition: MonRunIOV.h:52
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunIOV.cc:27
void setByRun(MonRunTag *montag, RunIOV *runiov, subrun_t subrun) noexcept(false)
Definition: MonRunIOV.cc:231
Tm m_subRunEnd
Definition: MonRunIOV.h:54
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:25