CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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();
19 
20  void setID(int id);
21  int getID(){ return m_ID;} ;
22 
23  // Methods for user data
24  void setRunIOV(RunIOV iov);
25  RunIOV getRunIOV();
26  void setSubRunNumber(subrun_t subrun);
27  run_t getSubRunNumber() const;
28  void setSubRunStart(Tm start);
29  Tm getSubRunStart() const;
30  void setSubRunEnd(Tm end);
31  Tm getSubRunEnd() const;
32 
33  // Methods from IUniqueDBObject
34  int fetchID() throw(std::runtime_error);
35  void setByID(int id) throw(std::runtime_error);
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 &&
42  m_subRunStart == m.m_subRunStart &&
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() throw(std::runtime_error);
56  void fetchParentIDs(int* runIOVID) throw(std::runtime_error);
57 
58  void setByRun(RunIOV* runiov, subrun_t subrun) throw(std::runtime_error);
59 };
60 
61 #endif
Definition: IIOV.h:11
int getID()
Definition: MODRunIOV.h:21
int run_t
Definition: CaliIOV.h:11
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
subrun_t m_subRunNum
Definition: MODRunIOV.h:51
void setByID(int id)
Definition: MODRunIOV.cc:156
Tm getSubRunStart() const
Definition: MODRunIOV.cc:77
Tm m_subRunStart
Definition: MODRunIOV.h:52
~MODRunIOV()
Definition: MODRunIOV.cc:24
int fetchID()
Definition: MODRunIOV.cc:101
void setRunIOV(RunIOV iov)
Definition: MODRunIOV.cc:36
run_t getSubRunNumber() const
Definition: MODRunIOV.cc:60
void setByRun(RunIOV *runiov, subrun_t subrun)
Definition: MODRunIOV.cc:262
tuple iov
Definition: o2o.py:307
int writeDB()
Definition: MODRunIOV.cc:195
int subrun_t
Definition: MODRunIOV.h:11
void setSubRunEnd(Tm end)
Definition: MODRunIOV.cc:84
Tm m_subRunEnd
Definition: MODRunIOV.h:53
#define end
Definition: vmac.h:38
void setSubRunStart(Tm start)
Definition: MODRunIOV.cc:67
Tm getSubRunEnd() const
Definition: MODRunIOV.cc:94
void setSubRunNumber(subrun_t subrun)
Definition: MODRunIOV.cc:50
string const
Definition: compareJSON.py:14
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:14
RunIOV m_runIOV
Definition: MODRunIOV.h:50
void fetchParentIDs(int *runIOVID)
Definition: MODRunIOV.cc:247