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
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
ODRunConfigInfo::updateDefaultCycle
int updateDefaultCycle() noexcept(false)
Definition: ODRunConfigInfo.cc:234
ODRunConfigInfo::getTag
std::string getTag() const
Definition: ODRunConfigInfo.h:27
ODRunConfigInfo::getNumberOfSequences
int getNumberOfSequences() const
Definition: ODRunConfigInfo.h:36
ODRunConfigInfo::m_defaults
int m_defaults
Definition: ODRunConfigInfo.h:70
funct::false
false
Definition: Factorize.h:34
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ODRunConfigInfo::getId
int getId() const
Definition: ODRunConfigInfo.h:21
RunModeDef
Definition: RunModeDef.h:12
ODRunConfigInfo::getVersion
int getVersion() const
Definition: ODRunConfigInfo.h:33
ODRunConfigInfo::getRunTypeDef
RunTypeDef getRunTypeDef() const
Definition: ODRunConfigInfo.cc:29
IODConfig.h
ODRunConfigInfo::setDBTime
void setDBTime(const Tm &x)
Definition: ODRunConfigInfo.h:23
ODRunConfigInfo::~ODRunConfigInfo
~ODRunConfigInfo() override
Definition: ODRunConfigInfo.cc:26
ODRunConfigInfo::fetchData
void fetchData(ODRunConfigInfo *result) noexcept(false)
Definition: ODRunConfigInfo.cc:269
ODRunConfigInfo::clear
void clear()
Definition: ODRunConfigInfo.cc:260
ODRunConfigInfo::getRunModeDef
RunModeDef getRunModeDef() const
Definition: ODRunConfigInfo.cc:37
DDAxes::x
RunTypeDef.h
ODRunConfigInfo::setByID
void setByID(int id) noexcept(false)
Definition: ODRunConfigInfo.cc:128
ODRunConfigInfo::fetchNextId
int fetchNextId() noexcept(false)
Definition: ODRunConfigInfo.cc:46
ODRunConfigInfo::getUsageStatus
std::string getUsageStatus() const
Definition: ODRunConfigInfo.h:48
ODRunConfigInfo::m_num_seq
int m_num_seq
Definition: ODRunConfigInfo.h:68
ODRunConfigInfo::ODRunConfigInfo
ODRunConfigInfo()
Definition: ODRunConfigInfo.cc:11
ODRunConfigInfo::getTable
std::string getTable() override
Definition: ODRunConfigInfo.h:18
ODRunConfigInfo::setDefaults
void setDefaults(int x)
Definition: ODRunConfigInfo.h:38
ODRunConfigInfo::writeDB
void writeDB() noexcept(false)
Definition: ODRunConfigInfo.cc:190
ODRunConfigInfo::setNumberOfSequences
void setNumberOfSequences(int n)
Definition: ODRunConfigInfo.h:35
RunModeDef.h
ODRunConfigInfo::setId
void setId(int id)
Definition: ODRunConfigInfo.h:20
Tm
Definition: Tm.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunTypeDef
Definition: RunTypeDef.h:12
ODRunConfigInfo::prepareWrite
void prepareWrite() noexcept(false) override
Definition: ODRunConfigInfo.cc:170
ODRunConfigInfo::setVersion
void setVersion(int x)
Definition: ODRunConfigInfo.h:32
ODRunConfigInfo::getDBTime
Tm getDBTime() const
Definition: ODRunConfigInfo.h:24
ODRunConfigInfo::fetchIDLast
int fetchIDLast() noexcept(false)
Definition: ODRunConfigInfo.cc:98
Tm.h
IODConfig
Definition: IODConfig.h:18
ODRunConfigInfo::m_num_events
int m_num_events
Definition: ODRunConfigInfo.h:72
ODRunConfigInfo::getDescription
std::string getDescription() const
Definition: ODRunConfigInfo.h:30
ODRunConfigInfo::setTriggerMode
void setTriggerMode(std::string x)
Definition: ODRunConfigInfo.h:41
ODRunConfigInfo
Definition: ODRunConfigInfo.h:12
ODRunConfigInfo::setNumberOfEvents
void setNumberOfEvents(int x)
Definition: ODRunConfigInfo.h:44
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ODRunConfigInfo::m_tag
std::string m_tag
Definition: ODRunConfigInfo.h:64
ODRunConfigInfo::m_ID
int m_ID
Definition: ODRunConfigInfo.h:62
ODRunConfigInfo::fetchID
int fetchID() noexcept(false)
Definition: ODRunConfigInfo.cc:65
ODRunConfigInfo::getNumberOfEvents
int getNumberOfEvents() const
Definition: ODRunConfigInfo.h:45
ODRunConfigInfo::m_runTypeDef
RunTypeDef m_runTypeDef
Definition: ODRunConfigInfo.h:67
ODRunConfigInfo::operator==
bool operator==(const ODRunConfigInfo &r) const
Definition: ODRunConfigInfo.h:57
ODRunConfigInfo::operator!=
bool operator!=(const ODRunConfigInfo &r) const
Definition: ODRunConfigInfo.h:58
ODRunConfigInfo::setTag
void setTag(std::string x)
Definition: ODRunConfigInfo.h:26
ODRunConfigInfo::m_usage_status
std::string m_usage_status
Definition: ODRunConfigInfo.h:73
ODRunConfigInfo::m_db_time
Tm m_db_time
Definition: ODRunConfigInfo.h:63
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ODRunConfigInfo::getTriggerMode
std::string getTriggerMode() const
Definition: ODRunConfigInfo.h:42
ODRunConfigInfo::setRunTypeDef
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: ODRunConfigInfo.cc:30
ODRunConfigInfo::setUsageStatus
void setUsageStatus(std::string x)
Definition: ODRunConfigInfo.h:47
ODRunConfigInfo::fetchIDFromTagAndVersion
int fetchIDFromTagAndVersion() noexcept(false)
Definition: ODRunConfigInfo.cc:123
mps_fire.result
result
Definition: mps_fire.py:303
ODRunConfigInfo::m_runModeDef
RunModeDef m_runModeDef
Definition: ODRunConfigInfo.h:66
ODRunConfigInfo::getDefaults
int getDefaults() const
Definition: ODRunConfigInfo.h:39
ODRunConfigInfo::setDescription
void setDescription(std::string x)
Definition: ODRunConfigInfo.h:29
ODRunConfigInfo::m_description
std::string m_description
Definition: ODRunConfigInfo.h:69
ODRunConfigInfo::m_version
int m_version
Definition: ODRunConfigInfo.h:65
ODRunConfigInfo::m_trigger_mode
std::string m_trigger_mode
Definition: ODRunConfigInfo.h:71
ODRunConfigInfo::setRunModeDef
void setRunModeDef(const RunModeDef &runModeDef)
Definition: ODRunConfigInfo.cc:38