CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/OnlineDB/EcalCondDB/interface/ODTTCciConfig.h

Go to the documentation of this file.
00001 #ifndef ODTTCCICONFIG_H
00002 #define ODTTCCICONFIG_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 ODTTCciConfig : public IODConfig {
00016  public:
00017   friend class EcalCondDBInterface;
00018   ODTTCciConfig();
00019   ~ODTTCciConfig();
00020 
00021   // User data methods
00022   inline std::string getTable() { return "ECAL_TTCci_CONFIGURATION"; }
00023 
00024   inline void setId(int id) { m_ID = id; }
00025   inline int getId() const { return m_ID; }
00026 
00027   inline void setTTCciConfigurationFile(std::string x) { m_ttcci_file = x; }
00028   inline std::string getTTCciConfigurationFile() const { return m_ttcci_file; }
00029 
00030   inline void setConfigurationScript(std::string x) { m_configuration_script = x; }
00031   inline std::string getConfigurationScript() const { return m_configuration_script; }
00032   inline void setConfigurationScriptParams(std::string x) { m_configuration_script_params = x; }
00033   inline std::string getConfigurationScriptParams() const { return m_configuration_script_params; }
00034 
00035 
00036   inline void setTrgMode(std::string x) { m_trg_mode = x; }
00037   inline std::string getTrgMode() const { return m_trg_mode; }
00038   inline void setTrgSleep(int id) { m_trg_sleep = id; }
00039   inline int getTrgSleep() const { return m_trg_sleep; }
00040 
00041   inline void setTTCciClob(unsigned char* x) { m_ttcci_clob = x; }
00042   inline unsigned char* getTTCciClob() const { return m_ttcci_clob; }
00043   inline void setSize(unsigned int id) { m_size = id; }
00044   inline unsigned int getSize() const { return m_size; }
00045   void setParameters(std::map<std::string,std::string> my_keys_map);
00046 
00047   
00048  private:
00049   void prepareWrite()  throw(std::runtime_error);
00050   void writeDB()       throw(std::runtime_error);
00051   void clear();
00052   void fetchData(ODTTCciConfig * result)     throw(std::runtime_error);
00053   int fetchID()  throw(std::runtime_error);
00054 
00055 
00056   int fetchNextId() throw(std::runtime_error);
00057 
00058   // User data
00059   int m_ID;
00060   unsigned char* m_ttcci_clob;
00061   std::string  m_ttcci_file;
00062   std::string  m_configuration_script;
00063   std::string  m_configuration_script_params;
00064   std::string  m_trg_mode;
00065   int  m_trg_sleep;
00066   int m_size;
00067 
00068   
00069 };
00070 
00071 #endif