00001 #ifndef ODDCUCONFIG_H 00002 #define ODDCUCONFIG_H 00003 00004 #include <map> 00005 #include <stdexcept> 00006 #include "OnlineDB/Oracle/interface/Oracle.h" 00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h" 00008 #define USE_NORM 1 00009 #define USE_CHUN 2 00010 #define USE_BUFF 3 00011 00012 /* Buffer Size */ 00013 #define BUFSIZE 200; 00014 00015 class ODDCUConfig : public IODConfig { 00016 public: 00017 friend class EcalCondDBInterface; 00018 ODDCUConfig(); 00019 ~ODDCUConfig(); 00020 00021 // User data methods 00022 inline std::string getTable() { return "ECAL_DCU_CONFIGURATION"; } 00023 00024 inline void setId(int id) { m_ID = id; } 00025 inline int getId() const { return m_ID; } 00026 00027 void setParameters(std::map<std::string,std::string> my_keys_map); 00028 00029 private: 00030 void prepareWrite() throw(std::runtime_error); 00031 void writeDB() throw(std::runtime_error); 00032 void clear(); 00033 void fetchData(ODDCUConfig * result) throw(std::runtime_error); 00034 int fetchID() throw(std::runtime_error); 00035 00036 00037 int fetchNextId() throw(std::runtime_error); 00038 00039 // User data 00040 int m_ID; 00041 00042 }; 00043 00044 #endif