Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODDCCCONFIG_H
0002 #define ODDCCCONFIG_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 ODDCCConfig : public IODConfig {
0016 public:
0017   friend class EcalCondDBInterface;
0018   ODDCCConfig();
0019   ~ODDCCConfig() override;
0020 
0021   // User data methods
0022   inline std::string getTable() override { return "ECAL_DCC_CONFIGURATION"; }
0023 
0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026   inline void setSize(unsigned int id) { m_size = id; }
0027   inline unsigned int getSize() const { return m_size; }
0028 
0029   inline void setDCCConfigurationUrl(std::string x) { m_dcc_url = x; }
0030   inline std::string getDCCConfigurationUrl() const { return m_dcc_url; }
0031 
0032   inline void setTestPatternFileUrl(std::string x) { m_test_url = x; }
0033   inline std::string getTestPatternFileUrl() const { return m_test_url; }
0034 
0035   inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
0036   inline int getNTestPatternsToLoad() const { return m_ntest; }
0037 
0038   inline void setSMHalf(int id) { m_sm_half = id; }
0039   inline int getSMHalf() const { return m_sm_half; }
0040 
0041   inline void setDCCClob(unsigned char* x) { m_dcc_clob = x; }
0042   inline unsigned char* getDCCClob() const { return m_dcc_clob; }
0043   inline unsigned int getDCCClobSize() const { return m_size; }
0044   inline void setDCCWeightsMode(std::string x) { m_wei = x; }
0045   inline std::string getDCCWeightsMode() const { return m_wei; }
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(ODDCCConfig* 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_dcc_clob;
0061   std::string m_dcc_url;
0062   std::string m_test_url;
0063   int m_ntest;
0064   int m_sm_half;
0065   unsigned int m_size;
0066   std::string m_wei;
0067 };
0068 
0069 #endif