00001 #ifndef ODPEDESTALOFFSETSDAT_H 00002 #define ODPEDESTALOFFSETSDAT_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/ODFEPedestalOffsetInfo.h" 00010 00011 class ODPedestalOffsetsDat : public IODConfig { 00012 public: 00013 friend class EcalCondDBInterface; 00014 ODPedestalOffsetsDat(); 00015 ~ODPedestalOffsetsDat(); 00016 00017 // User data methods 00018 inline std::string getTable() { return "PEDESTAL_OFFSETS_DAT"; } 00019 00020 inline void setId(int dac) { m_ID = dac; } 00021 inline int getId() const { return m_ID; } 00022 00023 inline void setSMId(int dac) { m_sm = dac; } 00024 inline int getSMId() const { return m_sm; } 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 setCrystalId(int dac) { m_xt = dac; } 00033 inline int getCrystalId() const { return m_xt; } 00034 00035 inline void setLow(int dac) { m_low = dac; } 00036 inline int getLow() const { return m_low; } 00037 00038 inline void setMid(int dac) { m_mid = dac; } 00039 inline int getMid() const { return m_mid; } 00040 00041 inline void setHigh(int dac) { m_high = dac; } 00042 inline int getHigh() const { return m_high; } 00043 00044 00045 private: 00046 void prepareWrite() 00047 throw(std::runtime_error); 00048 00049 void writeDB(const ODPedestalOffsetsDat* item, ODFEPedestalOffsetInfo* iov ) 00050 throw(std::runtime_error); 00051 00052 void writeArrayDB(const std::vector< ODPedestalOffsetsDat > data, ODFEPedestalOffsetInfo* iov) 00053 throw(std::runtime_error); 00054 00055 00056 void fetchData(std::vector< ODPedestalOffsetsDat >* fillMap, ODFEPedestalOffsetInfo* iov) 00057 throw(std::runtime_error); 00058 00059 // User data 00060 int m_sm; 00061 int m_fed; 00062 int m_tt; 00063 int m_xt; 00064 int m_low; 00065 int m_mid; 00066 int m_high; 00067 int m_ID; 00068 00069 }; 00070 00071 #endif