File indexing completed on 2023-03-17 11:15:06
0001 #ifndef ODLTCCYCLE_H
0002 #define ODLTCCYCLE_H
0003
0004 #include <stdexcept>
0005 #include <iostream>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008
0009 class ODLTCCycle : public IODConfig {
0010 public:
0011 friend class EcalCondDBInterface;
0012 friend class ODEcalCycle;
0013
0014 ODLTCCycle();
0015 ~ODLTCCycle() override;
0016
0017 inline std::string getTable() override { return "ECAL_LTC_CYCLE"; }
0018
0019 inline void setId(int id) { m_ID = id; }
0020 inline int getId() const { return m_ID; };
0021
0022
0023 inline void setLTCConfigurationID(int x) { m_ltc_config_id = x; }
0024 inline int getLTCConfigurationID() const { return m_ltc_config_id; }
0025
0026
0027 inline bool operator==(const ODLTCCycle &m) const { return (m_ID == m.m_ID); }
0028 inline bool operator!=(const ODLTCCycle &m) const { return !(*this == m); }
0029
0030 private:
0031
0032 int m_ID;
0033 int m_ltc_config_id;
0034 void writeDB() noexcept(false);
0035 void prepareWrite() noexcept(false) override;
0036 void clear();
0037 void fetchData(ODLTCCycle *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