CMS 3D CMS Logo

ODSRPCycle.h
Go to the documentation of this file.
1 #ifndef ODSRPCYCLE_H
2 #define ODSRPCYCLE_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
8 
9 class ODSRPCycle : public IODConfig {
10 public:
11  friend class EcalCondDBInterface;
12  friend class ODEcalCycle;
13 
14  ODSRPCycle();
15  ~ODSRPCycle() override;
16 
17  inline std::string getTable() override { return "ECAL_SRP_CYCLE"; }
18 
19  inline void setId(int id) { m_ID = id; }
20  inline int getId() const { return m_ID; };
21 
22  // Methods for user data
23  inline void setSRPConfigurationID(int x) { m_srp_config_id = x; }
24  inline int getSRPConfigurationID() const { return m_srp_config_id; }
25 
26  // Operators
27  inline bool operator==(const ODSRPCycle &m) const { return (m_ID == m.m_ID); }
28  inline bool operator!=(const ODSRPCycle &m) const { return !(*this == m); }
29 
30 private:
31  // User data
32  int m_ID;
34  void writeDB() noexcept(false);
35  void prepareWrite() noexcept(false) override;
36  void clear();
37  void fetchData(ODSRPCycle *result) noexcept(false);
38  void insertConfig() noexcept(false);
39 
40  // Methods from IUniqueDBObject
41  int fetchID() noexcept(false);
42  void setByID(int id) noexcept(false);
43 };
44 
45 #endif
~ODSRPCycle() override
Definition: ODSRPCycle.cc:19
void setByID(int id) noexcept(false)
Definition: ODSRPCycle.cc:86
int fetchID() noexcept(false)
Definition: ODSRPCycle.cc:56
int m_srp_config_id
Definition: ODSRPCycle.h:33
bool operator!=(const ODSRPCycle &m) const
Definition: ODSRPCycle.h:28
void clear()
Definition: ODSRPCycle.cc:54
int getId() const
Definition: ODSRPCycle.h:20
void fetchData(ODSRPCycle *result) noexcept(false)
Definition: ODSRPCycle.cc:109
void setId(int id)
Definition: ODSRPCycle.h:19
std::string getTable() override
Definition: ODSRPCycle.h:17
void setSRPConfigurationID(int x)
Definition: ODSRPCycle.h:23
void insertConfig() noexcept(false)
Definition: ODSRPCycle.cc:134
void prepareWrite() noexcept(false) override
Definition: ODSRPCycle.cc:21
void writeDB() noexcept(false)
Definition: ODSRPCycle.cc:34
int getSRPConfigurationID() const
Definition: ODSRPCycle.h:24
bool operator==(const ODSRPCycle &m) const
Definition: ODSRPCycle.h:27