CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21 
22  inline std::string getTable() { 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() throw(std::runtime_error); // fetches the sequence by the ecal_config_id and seq_num
59  int fetchIDLast() throw(std::runtime_error); // fetches the sequence by the ecal_config_id and seq_num
60  void setByID(int id) throw(std::runtime_error);
61 
62  void writeDB()throw(std::runtime_error);
63 
64  void prepareWrite() throw(std::runtime_error);
65 
66  void fetchData(ODRunConfigSeqInfo * result) throw(std::runtime_error);
67  void clear();
68 
69 
70 };
71 
72 
73 
74 #endif
int getNumberOfCycles() const
int getSequenceNumber() const
int run_t
Definition: CaliIOV.h:11
bool operator==(const ODRunConfigSeqInfo &r) const
int getEcalConfigId() const
void setRunSeqDef(const RunSeqDef &runSeqDef)
void setSequenceNumber(int x)
void setDescription(std::string x)
bool operator!=(const ODRunConfigSeqInfo &r) const
int getSequenceId() const
RunSeqDef getRunSeqDef() const
std::string getTable()
std::string getDescription() const
tuple result
Definition: query.py:137
void setNumberOfCycles(int x)
void setEcalConfigId(int x)
void fetchData(ODRunConfigSeqInfo *result)
Definition: DDAxes.h:10