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