00001 #ifndef ODFEDAQCONFIG_H 00002 #define ODFEDAQCONFIG_H 00003 00004 #include <map> 00005 #include <string> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h" 00008 00009 class ODFEDAQConfig : public IODConfig { 00010 public: 00011 friend class EcalCondDBInterface; 00012 ODFEDAQConfig(); 00013 ~ODFEDAQConfig(); 00014 00015 // User data methods 00016 inline std::string getTable() { return "FE_DAQ_CONFIG"; } 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 inline void setPedestalId(int x) { m_ped = x; } 00027 inline int getPedestalId() const { return m_ped; } 00028 inline void setDelayId(int x) { m_del = x; } 00029 inline int getDelayId() const { return m_del; } 00030 inline void setWeightId(int x) { m_wei = x; } 00031 inline int getWeightId() const { return m_wei; } 00032 00033 inline void setBadXtId(int x) { m_bxt = x; } 00034 inline int getBadXtId() const { return m_bxt; } 00035 inline void setBadTTId(int x) { m_btt = x; } 00036 inline int getBadTTId() const { return m_btt; } 00037 inline void setTriggerBadXtId(int x) { m_tbxt = x; } 00038 inline int getTriggerBadXtId() const { return m_tbxt; } 00039 inline void setTriggerBadTTId(int x) { m_tbtt = x; } 00040 inline int getTriggerBadTTId() const { return m_tbtt; } 00041 00042 inline void setComment(std::string x) { m_com = x; } 00043 inline std::string getComment() const { return m_com; } 00044 00045 int fetchNextId() throw(std::runtime_error); 00046 void setParameters(std::map<std::string,std::string> my_keys_map); 00047 00048 private: 00049 void prepareWrite() throw(std::runtime_error); 00050 00051 void writeDB() throw(std::runtime_error); 00052 00053 void clear(); 00054 00055 void fetchData(ODFEDAQConfig * result) throw(std::runtime_error); 00056 00057 int fetchID() throw(std::runtime_error); 00058 00059 00060 // User data 00061 int m_ID; 00062 int m_ped; 00063 int m_del; 00064 int m_wei; 00065 00066 int m_bxt; 00067 int m_btt; 00068 int m_tbxt; 00069 int m_tbtt; 00070 int m_version; 00071 std::string m_com; 00072 00073 }; 00074 00075 #endif