00001 #ifndef ODTOWERSTOBYPASSDAT_H 00002 #define ODTOWERSTOBYPASSDAT_H 00003 00004 #include <vector> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00009 #include "OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h" 00010 00011 class ODTowersToByPassDat : public IODConfig { 00012 public: 00013 friend class EcalCondDBInterface; 00014 ODTowersToByPassDat(); 00015 ~ODTowersToByPassDat(); 00016 00017 // User data methods 00018 inline std::string getTable() { return "TOWERS_TO_BYPASS_DAT"; } 00019 00020 inline void setId(int dac) { m_ID = dac; } 00021 inline int getId() const { return m_ID; } 00022 00023 inline void setTrId(int dac) { m_tr = dac; } 00024 inline int getTrId() const { return m_tr; } 00025 00026 inline void setFedId(int dac) { m_fed = dac; } 00027 inline int getFedId() const { return m_fed; } 00028 00029 inline void setTTId(int dac) { m_tt = dac; } 00030 inline int getTTId() const { return m_tt; } 00031 00032 inline void setTimeCorr(int dac) { m_time = dac; } 00033 inline int getTimeCorr() const { return m_time; } 00034 00035 inline void setStatus(int dac) { m_sta = dac; } 00036 inline int getStatus() const { return m_sta; } 00037 00038 00039 private: 00040 void prepareWrite() 00041 throw(std::runtime_error); 00042 00043 void writeDB(const ODTowersToByPassDat* item, ODTowersToByPassInfo* iov ) 00044 throw(std::runtime_error); 00045 00046 void writeArrayDB(const std::vector< ODTowersToByPassDat > data, ODTowersToByPassInfo* iov) 00047 throw(std::runtime_error); 00048 00049 00050 void fetchData(std::vector< ODTowersToByPassDat >* fillMap, ODTowersToByPassInfo* iov) 00051 throw(std::runtime_error); 00052 00053 // User data 00054 int m_tr; 00055 int m_fed; 00056 int m_tt; 00057 int m_time; 00058 int m_sta; 00059 int m_ID; 00060 00061 }; 00062 00063 #endif