CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MODRunIOV.h
Go to the documentation of this file.
1 #ifndef MODRUNIOV_H
2 #define MODRUNIOV_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
10 
11 typedef int subrun_t;
12 
13 class MODRunIOV : public IIOV {
14 public:
15  friend class EcalCondDBInterface;
16 
17  MODRunIOV();
18  ~MODRunIOV() override;
19 
20  void setID(int id);
21  int getID() { return m_ID; };
22 
23  // Methods for user data
24  void setRunIOV(const RunIOV& iov);
25  RunIOV getRunIOV();
26  void setSubRunNumber(subrun_t subrun);
27  run_t getSubRunNumber() const;
28  void setSubRunStart(const Tm& start);
29  Tm getSubRunStart() const;
30  void setSubRunEnd(const Tm& end);
31  Tm getSubRunEnd() const;
32 
33  // Methods from IUniqueDBObject
34  int fetchID() noexcept(false) override;
35  void setByID(int id) noexcept(false) override;
36 
37  // Operators
38  inline bool operator==(const MODRunIOV& m) const {
39  return (m_runIOV == m.m_runIOV && m_subRunNum == m.m_subRunNum && m_subRunStart == m.m_subRunStart &&
40  m_subRunEnd == m.m_subRunEnd);
41  }
42 
43  inline bool operator!=(const MODRunIOV& m) const { return !(*this == m); }
44 
45 private:
46  // User data for this IOV
51 
52  int writeDB() noexcept(false);
53  void fetchParentIDs(int* runIOVID) noexcept(false);
54 
55  void setByRun(RunIOV* runiov, subrun_t subrun) noexcept(false);
56 };
57 
58 #endif
Definition: IIOV.h:11
int getID()
Definition: MODRunIOV.h:21
int run_t
Definition: CaliIOV.h:11
void setRunIOV(const RunIOV &iov)
Definition: MODRunIOV.cc:25
int writeDB() noexcept(false)
Definition: MODRunIOV.cc:148
subrun_t m_subRunNum
Definition: MODRunIOV.h:48
Tm getSubRunStart() const
Definition: MODRunIOV.cc:50
Tm m_subRunStart
Definition: MODRunIOV.h:49
~MODRunIOV() override
Definition: MODRunIOV.cc:21
void setSubRunEnd(const Tm &end)
Definition: MODRunIOV.cc:52
run_t getSubRunNumber() const
Definition: MODRunIOV.cc:41
int subrun_t
Definition: MODRunIOV.h:11
int fetchID() noexcept(false) override
Definition: MODRunIOV.cc:61
Tm m_subRunEnd
Definition: MODRunIOV.h:50
void setSubRunStart(const Tm &start)
Definition: MODRunIOV.cc:43
Tm getSubRunEnd() const
Definition: MODRunIOV.cc:59
void fetchParentIDs(int *runIOVID) noexcept(false)
Definition: MODRunIOV.cc:197
void setByID(int id) noexcept(false) override
Definition: MODRunIOV.cc:113
void setSubRunNumber(subrun_t subrun)
Definition: MODRunIOV.cc:34
string end
Definition: dataset.py:937
void setByRun(RunIOV *runiov, subrun_t subrun) noexcept(false)
Definition: MODRunIOV.cc:207
RunIOV getRunIOV()
Definition: MODRunIOV.cc:32
void setID(int id)
Definition: MODRunIOV.cc:23
Definition: RunIOV.h:13
bool operator!=(const MODRunIOV &m) const
Definition: MODRunIOV.h:43
Definition: Tm.h:13
RunIOV m_runIOV
Definition: MODRunIOV.h:47