CMS 3D CMS Logo

ODRunConfigInfo.h
Go to the documentation of this file.
1 #ifndef ODRUNCONFIGINFO_H
2 #define ODRUNCONFIGINFO_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
11 
12 class ODRunConfigInfo : public IODConfig {
13 public:
14  friend class EcalCondDBInterface;
15 
17  ~ODRunConfigInfo() override;
18  inline std::string getTable() override { return "ECAL_RUN_CONFIGURATION_DAT"; }
19 
20  inline void setId(int id) { m_ID = id; }
21  inline int getId() const { return m_ID; }
22 
23  void setDBTime(const Tm& x) { m_db_time = x; }
24  inline Tm getDBTime() const { return m_db_time; }
25  //
26  inline void setTag(std::string x) { m_tag = x; }
27  std::string getTag() const { return m_tag; }
28  //
31  //
32  void setVersion(int x) { m_version = x; }
33  int getVersion() const { return m_version; }
34  //
35  void setNumberOfSequences(int n) { m_num_seq = n; }
36  int getNumberOfSequences() const { return m_num_seq; }
37  //
38  void setDefaults(int x) { m_defaults = x; }
39  int getDefaults() const { return m_defaults; }
40  //
43  //
44  void setNumberOfEvents(int x) { m_num_events = x; }
45  int getNumberOfEvents() const { return m_num_events; }
46  //
49  //
50 
51  RunTypeDef getRunTypeDef() const;
52  void setRunTypeDef(const RunTypeDef& runTypeDef);
53  RunModeDef getRunModeDef() const;
54  void setRunModeDef(const RunModeDef& runModeDef);
55 
56  // operators
57  inline bool operator==(const ODRunConfigInfo& r) const { return (m_ID == r.m_ID); }
58  inline bool operator!=(const ODRunConfigInfo& r) const { return !(*this == r); }
59 
60 private:
61  // User data for this IOV
62  int m_ID;
65  int m_version;
68  int m_num_seq;
74 
75  // Methods from IUniqueDBObject
76  int fetchNextId() noexcept(false);
77  int fetchID() noexcept(false);
78  int fetchIDFromTagAndVersion() noexcept(false);
79  int fetchIDLast() noexcept(false);
80  void setByID(int id) noexcept(false);
81 
82  void prepareWrite() noexcept(false) override;
83  void writeDB() noexcept(false);
84  void fetchData(ODRunConfigInfo* result) noexcept(false);
85  int updateDefaultCycle() noexcept(false);
86  void clear();
87 };
88 
89 #endif
bool operator!=(const ODRunConfigInfo &r) const
std::string m_trigger_mode
bool operator==(const ODRunConfigInfo &r) const
RunTypeDef getRunTypeDef() const
int fetchIDLast() noexcept(false)
std::string getTable() override
void setDefaults(int x)
int fetchIDFromTagAndVersion() noexcept(false)
void writeDB() noexcept(false)
std::string getDescription() const
RunModeDef m_runModeDef
std::string m_tag
int fetchID() noexcept(false)
std::string getUsageStatus() const
std::string m_description
void setRunModeDef(const RunModeDef &runModeDef)
std::string getTriggerMode() const
void setRunTypeDef(const RunTypeDef &runTypeDef)
RunModeDef getRunModeDef() const
void setUsageStatus(std::string x)
int getId() const
int fetchNextId() noexcept(false)
int getDefaults() const
RunTypeDef m_runTypeDef
void setDescription(std::string x)
int getNumberOfEvents() const
std::string m_usage_status
~ODRunConfigInfo() override
void setVersion(int x)
int updateDefaultCycle() noexcept(false)
std::string getTag() const
void setByID(int id) noexcept(false)
int getVersion() const
void fetchData(ODRunConfigInfo *result) noexcept(false)
void setId(int id)
void setNumberOfSequences(int n)
void setTriggerMode(std::string x)
void setTag(std::string x)
void prepareWrite() noexcept(false) override
void setDBTime(const Tm &x)
Tm getDBTime() const
Definition: Tm.h:13
void setNumberOfEvents(int x)
int getNumberOfSequences() const