Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:57

0001 #ifndef ODTTCFCONFIG_H
0002 #define ODTTCFCONFIG_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 ODTTCFConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODTTCFConfig();
0019   ~ODTTCFConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_TTCF_CONFIGURATION"; }
0023   inline void setSize(unsigned int id) { m_size = id; }
0024   inline unsigned int getSize() const { return m_size; }
0025 
0026   inline void setId(int id) { m_ID = id; }
0027   inline int getId() const { return m_ID; }
0028 
0029   inline void setTTCFConfigurationFile(std::string x) { m_ttcf_file = x; }
0030   inline std::string getTTCFConfigurationFile() const { return m_ttcf_file; }
0031 
0032   inline void setTTCFClob(unsigned char* x) { m_ttcf_clob = x; }
0033   inline unsigned char* getTTCFClob() const { return m_ttcf_clob; }
0034 
0035   inline void setRxBC0Delay(int x) { m_rxbc0_delay = x; }
0036   inline int getRxBC0Delay() { return m_rxbc0_delay; }
0037   inline void setReg30(int x) { m_reg_30 = x; }
0038   inline int getReg30() { return m_reg_30; }
0039 
0040   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0041 
0042 private:
0043   void prepareWrite() noexcept(false) override;
0044 
0045   void writeDB() noexcept(false);
0046 
0047   void clear();
0048 
0049   void fetchData(ODTTCFConfig* result) noexcept(false);
0050 
0051   int fetchID() noexcept(false);
0052 
0053   int fetchNextId() noexcept(false);
0054 
0055   // User data
0056   int m_ID;
0057   unsigned char* m_ttcf_clob;
0058   unsigned int m_size;
0059   std::string m_ttcf_file;
0060 
0061   int m_rxbc0_delay;
0062   int m_reg_30;
0063 };
0064 
0065 #endif