Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODTCCEECONFIG_H
0002 #define ODTCCEECONFIG_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 ODTCCEEConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODTCCEEConfig();
0019   ~ODTCCEEConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_TCC_EE_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_ee_file = x; }
0028   inline std::string getTCCConfigurationFile() const { return m_tcc_ee_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   inline void setTriggerPos(int id) { m_trigpos = id; }
0038   inline int getTrigPos() const { return m_trigpos; }
0039 
0040   inline void setSLBLatency(int id) { m_slb = id; }
0041   inline int getSLBLatency() const { return m_slb; }
0042 
0043   inline void setTCCClob(unsigned char* x) { m_tcc_ee_clob = x; }
0044   inline unsigned char* getTCCClob() const { return m_tcc_ee_clob; }
0045 
0046   inline void setLUTClob(unsigned char* x) { m_lut_clob = x; }
0047   inline unsigned char* getLUTClob() const { return m_lut_clob; }
0048 
0049   inline void setSLBClob(unsigned char* x) { m_slb_clob = x; }
0050   inline unsigned char* getSLBClob() const { return m_slb_clob; }
0051 
0052   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0053 
0054 private:
0055   void prepareWrite() noexcept(false) override;
0056   void writeDB() noexcept(false);
0057   void clear();
0058   void fetchData(ODTCCEEConfig* result) noexcept(false);
0059   int fetchID() noexcept(false);
0060 
0061   int fetchNextId() noexcept(false);
0062 
0063   // User data
0064   int m_ID;
0065   unsigned char* m_tcc_ee_clob;
0066   unsigned char* m_lut_clob;
0067   unsigned char* m_slb_clob;
0068   std::string m_tcc_ee_file;
0069   std::string m_lut_file;
0070   std::string m_slb_file;
0071   std::string m_test_url;
0072   int m_ntest;
0073   int m_trigpos;
0074   int m_slb;
0075   unsigned int m_size;
0076 };
0077 
0078 #endif