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