Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:15:06

0001 #ifndef ODLTCCONFIG_H
0002 #define ODLTCCONFIG_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 ODLTCConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODLTCConfig();
0019   ~ODLTCConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_LTC_CONFIGURATION"; }
0023 
0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026 
0027   inline void setSize(unsigned int id) { m_size = id; }
0028   inline unsigned int getSize() const { return m_size; }
0029 
0030   inline void setLTCConfigurationFile(std::string x) { m_ltc_file = x; }
0031   inline std::string getLTCConfigurationFile() const { return m_ltc_file; }
0032 
0033   inline void setLTCClob(unsigned char* x) { m_ltc_clob = x; }
0034   inline unsigned char* getLTCClob() const { return m_ltc_clob; }
0035 
0036   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0037 
0038 private:
0039   void prepareWrite() noexcept(false) override;
0040   void writeDB() noexcept(false);
0041   void clear();
0042   void fetchData(ODLTCConfig* result) noexcept(false);
0043   int fetchID() noexcept(false);
0044 
0045   int fetchNextId() noexcept(false);
0046 
0047   // User data
0048   int m_ID;
0049   unsigned char* m_ltc_clob;
0050   std::string m_ltc_file;
0051   int m_size;
0052 };
0053 
0054 #endif