CMS 3D CMS Logo

ODRunConfigSeqInfo.h
Go to the documentation of this file.
1 #ifndef ODRUNCONFIGSEQINFO_H
2 #define ODRUNCONFIGSEQINFO_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
12 
13 typedef int run_t;
14 
15 class ODRunConfigSeqInfo : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18 
20  ~ODRunConfigSeqInfo() override;
21 
22  inline std::string getTable() override { return "ECAL_SEQUENCE_DAT"; }
23 
24  // Methods for user data
25 
26  inline void setId(int id) { m_ID = id; }
27  inline int getId() const { return m_ID; }
28 
30  inline std::string getDescription() const { return m_description; }
31  inline void setEcalConfigId(int x) { m_ecal_config_id = x; }
32  inline int getEcalConfigId() const { return m_ecal_config_id; }
33  inline void setNumberOfCycles(int x) { m_cycles = x; }
34  inline void setSequenceId(int x) { m_ID = x; }
35  inline int getSequenceId() const { return m_ID; }
36  inline int getNumberOfCycles() const { return m_cycles; }
37  inline void setSequenceNumber(int x) { m_seq_num = x; }
38  inline int getSequenceNumber() const { return m_seq_num; }
39  //
40  RunSeqDef getRunSeqDef() const;
41  void setRunSeqDef(const RunSeqDef &runSeqDef);
42 
43  // operators
44  inline bool operator==(const ODRunConfigSeqInfo &r) const { return (m_ID == r.m_ID); }
45  inline bool operator!=(const ODRunConfigSeqInfo &r) const { return !(*this == r); }
46 
47 private:
48  int m_ID;
50  int m_seq_num;
52  int m_cycles;
55 
56  // Methods from IUniqueDBObject
57  int fetchID() noexcept(false); // fetches the sequence by the ecal_config_id and seq_num
58  int fetchIDLast() noexcept(false); // fetches the sequence by the ecal_config_id and seq_num
59  void setByID(int id) noexcept(false);
60 
61  void writeDB() noexcept(false);
62 
63  void prepareWrite() noexcept(false) override;
64 
65  void fetchData(ODRunConfigSeqInfo *result) noexcept(false);
66  void clear();
67 };
68 
69 #endif
void fetchData(ODRunConfigSeqInfo *result) noexcept(false)
void setRunSeqDef(const RunSeqDef &runSeqDef)
void prepareWrite() noexcept(false) override
void setSequenceNumber(int x)
void setDescription(std::string x)
int getNumberOfCycles() const
void writeDB() noexcept(false)
std::string getDescription() const
int getEcalConfigId() const
int fetchID() noexcept(false)
int getSequenceNumber() const
void setNumberOfCycles(int x)
bool operator!=(const ODRunConfigSeqInfo &r) const
void setEcalConfigId(int x)
RunSeqDef getRunSeqDef() const
std::string getTable() override
bool operator==(const ODRunConfigSeqInfo &r) const
int run_t
~ODRunConfigSeqInfo() override
int fetchIDLast() noexcept(false)
void setByID(int id) noexcept(false)