CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/OnlineDB/EcalCondDB/interface/ODLTCConfig.h

Go to the documentation of this file.
00001 #ifndef ODLTCCONFIG_H
00002 #define ODLTCCONFIG_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 ODLTCConfig : public IODConfig {
00016  public:
00017   friend class EcalCondDBInterface;
00018   ODLTCConfig();
00019   ~ODLTCConfig();
00020 
00021   // User data methods
00022   inline std::string getTable() { return "ECAL_LTC_CONFIGURATION"; }
00023 
00024   inline void setId(int id) { m_ID = id; }
00025   inline int getId() const { return m_ID; }
00026 
00027   inline void setSize(unsigned int id) { m_size = id; }
00028   inline unsigned int getSize() const { return m_size; }
00029 
00030   inline void setLTCConfigurationFile(std::string x) { m_ltc_file = x; }
00031   inline std::string getLTCConfigurationFile() const { return m_ltc_file; }
00032 
00033   inline void setLTCClob(unsigned char* x) { m_ltc_clob = x; }
00034   inline unsigned char* getLTCClob() const { return m_ltc_clob; }
00035 
00036   void setParameters(std::map<std::string,std::string> my_keys_map);
00037   
00038  private:
00039   void prepareWrite()  throw(std::runtime_error);
00040   void writeDB()       throw(std::runtime_error);
00041   void clear();
00042   void fetchData(ODLTCConfig * result)     throw(std::runtime_error);
00043   int fetchID()  throw(std::runtime_error);
00044 
00045 
00046   int fetchNextId() throw(std::runtime_error);
00047 
00048   // User data
00049   int m_ID;
00050   unsigned char* m_ltc_clob;
00051   std::string  m_ltc_file;
00052   int m_size;
00053 
00054 };
00055 
00056 #endif