CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ODRunConfigCycleInfo.h
Go to the documentation of this file.
1 #ifndef ODRUNCONFIGCYCLEINFO_H
2 #define ODRUNCONFIGCYCLEINFO_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
7 
12 
13 
15  public:
16  friend class EcalCondDBInterface;
17  friend class ODEcalCycle;
18 
21 
22  inline std::string getTable() { return "ECAL_CYCLE_DAT"; }
23 
24  // Methods for user data
25  inline void setId(int id) { m_ID = id; }
26  inline int getId() const { return m_ID; }
27 
28 
29 
30 void setDescription(std::string x) { m_description = x;}
31 std::string getDescription() const{ return m_description;}
32 //
33 void setTag(std::string x) { m_tag = x;}
34 std::string getTag() const{ return m_tag;}
35 //
36 void setSequenceID(int x) { m_sequence_id = x;}
37 int getSequenceID() const{ return m_sequence_id;}
38 //
39 void setCycleNumber(int n){ m_cycle_num = n; }
40 int getCycleNumber()const {return m_cycle_num; }
41 //
42 
43 
44 
45  // operators
46  inline bool operator==(const ODRunConfigCycleInfo &r) const { return (m_ID == r.m_ID ); }
47  inline bool operator!=(const ODRunConfigCycleInfo &r) const { return !(*this == r); }
48 
49  private:
50  // User data for this IOV
51  int m_ID;
54  std::string m_tag;
55  std::string m_description;
56 
57  void prepareWrite() throw(std::runtime_error);
58  void writeDB() throw(std::runtime_error);
59  void clear();
60  void fetchData(ODRunConfigCycleInfo * result) throw(std::runtime_error);
61  void insertConfig() throw(std::runtime_error);
62 
63 
64  // Methods from IUniqueDBObject
65  int fetchID() throw(std::runtime_error); // fetches the Cycle by the seq_id and cycle_num
66  int fetchIDLast() throw(std::runtime_error); // fetches the Cycle by the seq_id and cycle_num
67  void setByID(int id) throw(std::runtime_error);
68 
69 };
70 
71 
72 
73 #endif
bool operator==(const ODRunConfigCycleInfo &r) const
void fetchData(ODRunConfigCycleInfo *result)
void setDescription(std::string x)
std::string getDescription() const
tuple result
Definition: query.py:137
bool operator!=(const ODRunConfigCycleInfo &r) const
void setTag(std::string x)
std::string getTag() const
x
Definition: VDTMath.h:216