File indexing completed on 2024-04-06 12:22:56
0001 #ifndef OBADTTDAT_H
0002 #define OBADTTDAT_H
0003
0004 #include <vector>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 #include "OnlineDB/EcalCondDB/interface/ODBadTTInfo.h"
0009
0010 class ODBadTTDat : public IODConfig {
0011 public:
0012 friend class EcalCondDBInterface;
0013 ODBadTTDat();
0014 ~ODBadTTDat() override;
0015
0016
0017 inline std::string getTable() override { return "BAD_TT_DAT"; }
0018
0019 inline void setId(int dac) { m_ID = dac; }
0020 inline int getId() const { return m_ID; }
0021
0022 inline void setSMId(int dac) { m_sm = dac; }
0023 inline int getSMId() const { return m_sm; }
0024
0025 inline void setTRId(int dac) { m_sm = dac; }
0026 inline int getTRId() const { return m_sm; }
0027
0028 inline void setFedId(int dac) { m_fed = dac; }
0029 inline int getFedId() const { return m_fed; }
0030
0031 inline void setTTId(int dac) { m_tt = dac; }
0032 inline int getTTId() const { return m_tt; }
0033
0034 inline void setStatus(int dac) { m_t1 = dac; }
0035 inline int getStatus() const { return m_t1; }
0036
0037 private:
0038 void prepareWrite() noexcept(false) override;
0039
0040 void writeDB(const ODBadTTDat* item, ODBadTTInfo* iov) noexcept(false);
0041
0042 void writeArrayDB(const std::vector<ODBadTTDat>& data, ODBadTTInfo* iov) noexcept(false);
0043
0044 void fetchData(std::vector<ODBadTTDat>* fillMap, ODBadTTInfo* iov) noexcept(false);
0045
0046
0047 int m_sm;
0048 int m_fed;
0049 int m_tt;
0050 int m_t1;
0051 int m_ID;
0052 };
0053
0054 #endif