CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/OnlineDB/EcalCondDB/interface/ODTCCConfig.h

Go to the documentation of this file.
00001 #ifndef ODTCCCONFIG_H
00002 #define ODTCCCONFIG_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 ODTCCConfig : public IODConfig {
00016  public:
00017   friend class EcalCondDBInterface;
00018   ODTCCConfig();
00019   ~ODTCCConfig();
00020 
00021   // User data methods
00022   inline std::string getTable() { return "ECAL_TCC_CONFIGURATION"; }
00023 
00024   inline void setId(int id) { m_ID = id; }
00025   inline int getId() const { return m_ID; }
00026 
00027   inline void setTCCConfigurationFile(std::string x) { m_tcc_file = x; }
00028   inline std::string getTCCConfigurationFile() const { return m_tcc_file; }
00029   inline void setLUTConfigurationFile(std::string x) { m_lut_file = x; }
00030   inline std::string getLUTConfigurationFile() const { return m_lut_file; }
00031   inline void setSLBConfigurationFile(std::string x) { m_slb_file = x; }
00032   inline std::string getSLBConfigurationFile() const { return m_slb_file; }
00033   inline void setTestPatternFileUrl(std::string x) { m_test_url = x; }
00034   inline std::string getTestPatternFileUrl() const { return m_test_url; }
00035   inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
00036   inline int getNTestPatternsToLoad() const { return m_ntest; }
00037 
00038   inline void setTCCClob(unsigned char* x) { m_tcc_clob = x; }
00039   inline unsigned char* getTCCClob() const { return m_tcc_clob; }
00040 
00041   inline void setLUTClob(unsigned char* x) { m_lut_clob = x; }
00042   inline unsigned char* getLUTClob() const { return m_lut_clob; }
00043 
00044   inline void setSLBClob(unsigned char* x) { m_slb_clob = x; }
00045   inline unsigned char* getSLBClob() const { return m_slb_clob; }
00046 
00047   void setParameters(std::map<std::string,std::string> my_keys_map);
00048 
00049   
00050  private:
00051   void prepareWrite()  throw(std::runtime_error);
00052   void writeDB()       throw(std::runtime_error);
00053   void clear();
00054   void fetchData(ODTCCConfig * result)     throw(std::runtime_error);
00055   int fetchID()  throw(std::runtime_error);
00056 
00057 
00058   int fetchNextId() throw(std::runtime_error);
00059 
00060   // User data
00061   int m_ID;
00062   unsigned char* m_tcc_clob;
00063   unsigned char* m_lut_clob;
00064   unsigned char* m_slb_clob;
00065   std::string  m_tcc_file;
00066   std::string  m_lut_file;
00067   std::string  m_slb_file;
00068   std::string  m_test_url;
00069   int  m_ntest;
00070   unsigned int m_size;
00071 };
00072 
00073 #endif