Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODTCCCONFIG_H
0002 #define ODTCCCONFIG_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 ODTCCConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODTCCConfig();
0019   ~ODTCCConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_TCC_CONFIGURATION"; }
0023 
0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026 
0027   inline void setTCCConfigurationFile(std::string x) { m_tcc_file = x; }
0028   inline std::string getTCCConfigurationFile() const { return m_tcc_file; }
0029   inline void setLUTConfigurationFile(std::string x) { m_lut_file = x; }
0030   inline std::string getLUTConfigurationFile() const { return m_lut_file; }
0031   inline void setSLBConfigurationFile(std::string x) { m_slb_file = x; }
0032   inline std::string getSLBConfigurationFile() const { return m_slb_file; }
0033   inline void setTestPatternFileUrl(std::string x) { m_test_url = x; }
0034   inline std::string getTestPatternFileUrl() const { return m_test_url; }
0035   inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
0036   inline int getNTestPatternsToLoad() const { return m_ntest; }
0037 
0038   inline void setTCCClob(unsigned char* x) { m_tcc_clob = x; }
0039   inline unsigned char* getTCCClob() const { return m_tcc_clob; }
0040 
0041   inline void setLUTClob(unsigned char* x) { m_lut_clob = x; }
0042   inline unsigned char* getLUTClob() const { return m_lut_clob; }
0043 
0044   inline void setSLBClob(unsigned char* x) { m_slb_clob = x; }
0045   inline unsigned char* getSLBClob() const { return m_slb_clob; }
0046 
0047   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0048 
0049 private:
0050   void prepareWrite() noexcept(false) override;
0051   void writeDB() noexcept(false);
0052   void clear();
0053   void fetchData(ODTCCConfig* result) noexcept(false);
0054   int fetchID() noexcept(false);
0055 
0056   int fetchNextId() noexcept(false);
0057 
0058   // User data
0059   int m_ID;
0060   unsigned char* m_tcc_clob;
0061   unsigned char* m_lut_clob;
0062   unsigned char* m_slb_clob;
0063   std::string m_tcc_file;
0064   std::string m_lut_file;
0065   std::string m_slb_file;
0066   std::string m_test_url;
0067   int m_ntest;
0068   unsigned int m_size;
0069 };
0070 
0071 #endif