File indexing completed on 2024-04-06 12:22:56
0001 #ifndef ODDCCCYCLE_H
0002 #define ODDCCCYCLE_H
0003
0004 #include <stdexcept>
0005 #include <iostream>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008
0009 class ODDCCCycle : public IODConfig {
0010 public:
0011 friend class EcalCondDBInterface;
0012 friend class ODEcalCycle;
0013
0014 ODDCCCycle();
0015 ~ODDCCCycle() override;
0016
0017 inline std::string getTable() override { return "ECAL_DCC_CYCLE"; }
0018
0019 inline void setId(int id) { m_ID = id; }
0020 inline int getId() const { return m_ID; };
0021
0022
0023 inline void setDCCConfigurationID(int x) { m_dcc_config_id = x; }
0024 inline int getDCCConfigurationID() const { return m_dcc_config_id; }
0025
0026
0027 inline bool operator==(const ODDCCCycle &m) const { return (m_ID == m.m_ID); }
0028 inline bool operator!=(const ODDCCCycle &m) const { return !(*this == m); }
0029
0030 private:
0031
0032 int m_ID;
0033 int m_dcc_config_id;
0034 void writeDB() noexcept(false);
0035 void prepareWrite() noexcept(false) override;
0036 void clear();
0037 void fetchData(ODDCCCycle *result) noexcept(false);
0038 void insertConfig() noexcept(false);
0039
0040
0041 int fetchID() noexcept(false);
0042 void setByID(int id) noexcept(false);
0043 };
0044
0045 #endif