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