CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/OnlineDB/EcalCondDB/interface/ODTTCFConfig.h

Go to the documentation of this file.
00001 #ifndef ODTTCFCONFIG_H
00002 #define ODTTCFCONFIG_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 ODTTCFConfig : public IODConfig {
00016  public:
00017   friend class EcalCondDBInterface;
00018   ODTTCFConfig();
00019   ~ODTTCFConfig();
00020 
00021   // User data methods
00022   inline std::string getTable() { return "ECAL_TTCF_CONFIGURATION"; }
00023   inline void setSize(unsigned int id) { m_size = id; }
00024   inline unsigned int getSize() const { return m_size; }
00025 
00026   inline void setId(int id) { m_ID = id; }
00027   inline int getId() const { return m_ID; }
00028 
00029   inline void setTTCFConfigurationFile(std::string x) { m_ttcf_file = x; }
00030   inline std::string getTTCFConfigurationFile() const { return m_ttcf_file; }
00031 
00032   inline void setTTCFClob(unsigned char* x) { m_ttcf_clob = x; }
00033   inline unsigned char* getTTCFClob() const { return m_ttcf_clob; }
00034 
00035   inline void setRxBC0Delay( int x ) { m_rxbc0_delay = x; } 
00036   inline int getRxBC0Delay( ) { return m_rxbc0_delay; } 
00037   inline void setReg30( int x ) { m_reg_30 = x; } 
00038   inline int getReg30( ) { return m_reg_30; } 
00039 
00040   void setParameters(std::map<std::string,std::string> my_keys_map);
00041   
00042  private:
00043   void prepareWrite()  throw(std::runtime_error);
00044 
00045   void writeDB()       throw(std::runtime_error);
00046 
00047   void clear();
00048 
00049   void fetchData(ODTTCFConfig * result)     throw(std::runtime_error);
00050 
00051   int fetchID()  throw(std::runtime_error);
00052 
00053 
00054 
00055   int fetchNextId() throw(std::runtime_error);
00056 
00057   // User data
00058   int m_ID;
00059   unsigned char* m_ttcf_clob;
00060   unsigned int m_size;
00061   std::string m_ttcf_file;
00062 
00063   int m_rxbc0_delay;
00064   int m_reg_30;
00065   
00066 };
00067 
00068 #endif