CMS 3D CMS Logo

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  {
40  return ( m_runIOV == m.m_runIOV &&
41  m_subRunNum == m.m_subRunNum &&
43  m_subRunEnd == m.m_subRunEnd );
44  }
45 
46  inline bool operator!=(const MODRunIOV &m) const { return !(*this == m); }
47 
48  private:
49  // User data for this IOV
54 
55  int writeDB() noexcept(false);
56  void fetchParentIDs(int* runIOVID) noexcept(false);
57 
58  void setByRun(RunIOV* runiov, subrun_t subrun) noexcept(false);
59 };
60 
61 #endif
Definition: IIOV.h:11
Definition: start.py:1
int getID()
Definition: MODRunIOV.h:21
int run_t
Definition: CaliIOV.h:11
void setRunIOV(const RunIOV &iov)
Definition: MODRunIOV.cc:36
int writeDB() noexcept(false)
Definition: MODRunIOV.cc:195
subrun_t m_subRunNum
Definition: MODRunIOV.h:51
Tm getSubRunStart() const
Definition: MODRunIOV.cc:77
#define noexcept
Tm m_subRunStart
Definition: MODRunIOV.h:52
~MODRunIOV() override
Definition: MODRunIOV.cc:24
bool operator==(const MODRunIOV &m) const
Definition: MODRunIOV.h:38
void setSubRunEnd(const Tm &end)
Definition: MODRunIOV.cc:84
run_t getSubRunNumber() const
Definition: MODRunIOV.cc:60
int subrun_t
Definition: MODRunIOV.h:11
int fetchID() noexcept(false) override
Definition: MODRunIOV.cc:101
Tm m_subRunEnd
Definition: MODRunIOV.h:53
#define end
Definition: vmac.h:39
void setSubRunStart(const Tm &start)
Definition: MODRunIOV.cc:67
Tm getSubRunEnd() const
Definition: MODRunIOV.cc:94
void fetchParentIDs(int *runIOVID) noexcept(false)
Definition: MODRunIOV.cc:247
void setByID(int id) noexcept(false) override
Definition: MODRunIOV.cc:156
void setSubRunNumber(subrun_t subrun)
Definition: MODRunIOV.cc:50
void setByRun(RunIOV *runiov, subrun_t subrun) noexcept(false)
Definition: MODRunIOV.cc:262
RunIOV getRunIOV()
Definition: MODRunIOV.cc:44
void setID(int id)
Definition: MODRunIOV.cc:29
Definition: RunIOV.h:13
bool operator!=(const MODRunIOV &m) const
Definition: MODRunIOV.h:46
Definition: Tm.h:13
RunIOV m_runIOV
Definition: MODRunIOV.h:50