00001 #ifndef ODFEPEDOFFINFO_H 00002 #define ODFEPEDOFFINFO_H 00003 00004 #include <map> 00005 #include <string> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h" 00008 00009 class ODFEPedestalOffsetInfo : public IODConfig { 00010 public: 00011 friend class EcalCondDBInterface; 00012 ODFEPedestalOffsetInfo(); 00013 ~ODFEPedestalOffsetInfo(); 00014 00015 // User data methods 00016 inline std::string getTable() { return "PEDESTAL_OFFSETS_INFO"; } 00017 00018 inline void setId(int id) { m_ID = id; } 00019 inline int getId() const { return m_ID; } 00020 00021 // the tag is already in IODConfig 00022 00023 inline void setVersion(int id) { m_version = id; } 00024 inline int getVersion() const { return m_version; } 00025 00026 int fetchNextId() throw(std::runtime_error); 00027 void setParameters(std::map<std::string,std::string> my_keys_map); 00028 int fetchID() throw(std::runtime_error); 00029 00030 private: 00031 void prepareWrite() throw(std::runtime_error); 00032 00033 void writeDB() throw(std::runtime_error); 00034 00035 void clear(); 00036 00037 void fetchData(ODFEPedestalOffsetInfo * result) throw(std::runtime_error); 00038 void fetchLastData(ODFEPedestalOffsetInfo * result) throw(std::runtime_error); 00039 00040 00041 00042 // User data 00043 int m_ID; 00044 int m_version; 00045 00046 }; 00047 00048 #endif