File indexing completed on 2023-03-17 11:15:06
0001 #ifndef ODRUNCONFIGCYCLEINFO_H
0002 #define ODRUNCONFIGCYCLEINFO_H
0003
0004 #include <stdexcept>
0005 #include <iostream>
0006
0007 #include "OnlineDB/EcalCondDB/interface/RunModeDef.h"
0008 #include "OnlineDB/EcalCondDB/interface/RunTypeDef.h"
0009 #include "OnlineDB/EcalCondDB/interface/RunSeqDef.h"
0010 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0011
0012 class ODRunConfigCycleInfo : public IODConfig {
0013 public:
0014 friend class EcalCondDBInterface;
0015 friend class ODEcalCycle;
0016
0017 ODRunConfigCycleInfo();
0018 ~ODRunConfigCycleInfo() override;
0019
0020 inline std::string getTable() override { return "ECAL_CYCLE_DAT"; }
0021
0022
0023 inline void setId(int id) { m_ID = id; }
0024 inline int getId() const { return m_ID; }
0025
0026 void setDescription(std::string x) { m_description = x; }
0027 std::string getDescription() const { return m_description; }
0028
0029 void setTag(std::string x) { m_tag = x; }
0030 std::string getTag() const { return m_tag; }
0031
0032 void setSequenceID(int x) { m_sequence_id = x; }
0033 int getSequenceID() const { return m_sequence_id; }
0034
0035 void setCycleNumber(int n) { m_cycle_num = n; }
0036 int getCycleNumber() const { return m_cycle_num; }
0037
0038
0039
0040 inline bool operator==(const ODRunConfigCycleInfo &r) const { return (m_ID == r.m_ID); }
0041 inline bool operator!=(const ODRunConfigCycleInfo &r) const { return !(*this == r); }
0042
0043 private:
0044
0045 int m_ID;
0046 int m_sequence_id;
0047 int m_cycle_num;
0048 std::string m_tag;
0049 std::string m_description;
0050
0051 void prepareWrite() noexcept(false) override;
0052 void writeDB() noexcept(false);
0053 void clear();
0054 void fetchData(ODRunConfigCycleInfo *result) noexcept(false);
0055 void insertConfig() noexcept(false);
0056
0057
0058 int fetchID() noexcept(false);
0059 int fetchIDLast() noexcept(false);
0060 void setByID(int id) noexcept(false);
0061 };
0062
0063 #endif