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 
25  // Methods for user data
26 
27  inline void setId(int id) { m_ID = id; }
28  inline int getId() const { return m_ID; }
29 
31  inline std::string getDescription() const{ return m_description;}
32  inline void setEcalConfigId(int x){ m_ecal_config_id = x; }
33  inline int getEcalConfigId()const{ return m_ecal_config_id;}
34  inline void setNumberOfCycles(int x){ m_cycles = x; }
35  inline void setSequenceId(int x){ m_ID = x; }
36  inline int getSequenceId()const{ return m_ID;}
37  inline int getNumberOfCycles() const{return m_cycles;}
38  inline void setSequenceNumber(int x){m_seq_num=x;}
39  inline int getSequenceNumber() const{return m_seq_num;}
40  //
41  RunSeqDef getRunSeqDef() const;
42  void setRunSeqDef(const RunSeqDef& runSeqDef);
43 
44  // operators
45  inline bool operator==(const ODRunConfigSeqInfo &r) const { return (m_ID == r.m_ID ); }
46  inline bool operator!=(const ODRunConfigSeqInfo &r) const { return !(*this == r); }
47 
48  private:
49  int m_ID;
51  int m_seq_num;
53  int m_cycles;
56 
57  // Methods from IUniqueDBObject
58  int fetchID() noexcept(false); // fetches the sequence by the ecal_config_id and seq_num
59  int fetchIDLast() noexcept(false); // fetches the sequence by the ecal_config_id and seq_num
60  void setByID(int id) noexcept(false);
61 
62  void writeDB()noexcept(false);
63 
64  void prepareWrite() noexcept(false) override;
65 
67  void clear();
68 
69 
70 };
71 
72 
73 
74 #endif
int getNumberOfCycles() const
int getSequenceNumber() const
bool operator==(const ODRunConfigSeqInfo &r) const
int getEcalConfigId() const
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)
void writeDB() noexcept(false)
bool operator!=(const ODRunConfigSeqInfo &r) const
int getSequenceId() const
RunSeqDef getRunSeqDef() const
std::string getDescription() const
int fetchID() noexcept(false)
#define noexcept
void setNumberOfCycles(int x)
void setEcalConfigId(int x)
std::string getTable() override
int run_t
~ODRunConfigSeqInfo() override
int fetchIDLast() noexcept(false)
void setByID(int id) noexcept(false)