Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:53

0001 #ifndef ODTTCCICONFIG_H
0002 #define ODTTCCICONFIG_H
0003 
0004 #include <map>
0005 #include <stdexcept>
0006 #include "OnlineDB/Oracle/interface/Oracle.h"
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 #define USE_NORM 1
0009 #define USE_CHUN 2
0010 #define USE_BUFF 3
0011 
0012 /* Buffer Size */
0013 #define BUFSIZE 200;
0014 
0015 class ODTTCciConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODTTCciConfig();
0019   ~ODTTCciConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_TTCci_CONFIGURATION"; }
0023 
0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026 
0027   inline void setTTCciConfigurationFile(std::string x) { m_ttcci_file = x; }
0028   inline std::string getTTCciConfigurationFile() const { return m_ttcci_file; }
0029 
0030   inline void setConfigurationScript(std::string x) { m_configuration_script = x; }
0031   inline std::string getConfigurationScript() const { return m_configuration_script; }
0032   inline void setConfigurationScriptParams(std::string x) { m_configuration_script_params = x; }
0033   inline std::string getConfigurationScriptParams() const { return m_configuration_script_params; }
0034 
0035   inline void setTrgMode(std::string x) { m_trg_mode = x; }
0036   inline std::string getTrgMode() const { return m_trg_mode; }
0037   inline void setTrgSleep(int id) { m_trg_sleep = id; }
0038   inline int getTrgSleep() const { return m_trg_sleep; }
0039 
0040   inline void setTTCciClob(unsigned char* x) { m_ttcci_clob = x; }
0041   inline unsigned char* getTTCciClob() const { return m_ttcci_clob; }
0042   inline void setSize(unsigned int id) { m_size = id; }
0043   inline unsigned int getSize() const { return m_size; }
0044   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0045 
0046 private:
0047   void prepareWrite() noexcept(false) override;
0048   void writeDB() noexcept(false);
0049   void clear();
0050   void fetchData(ODTTCciConfig* result) noexcept(false);
0051   int fetchID() noexcept(false);
0052 
0053   int fetchNextId() noexcept(false);
0054 
0055   // User data
0056   int m_ID;
0057   unsigned char* m_ttcci_clob;
0058   std::string m_ttcci_file;
0059   std::string m_configuration_script;
0060   std::string m_configuration_script_params;
0061   std::string m_trg_mode;
0062   int m_trg_sleep;
0063   int m_size;
0064 };
0065 
0066 #endif