CMS 3D CMS Logo

ODDCCConfig.h
Go to the documentation of this file.
1 #ifndef ODDCCCONFIG_H
2 #define ODDCCCONFIG_H
3 
4 #include <map>
5 #include <stdexcept>
8 #define USE_NORM 1
9 #define USE_CHUN 2
10 #define USE_BUFF 3
11 
12 /* Buffer Size */
13 #define BUFSIZE 200;
14 
15 class ODDCCConfig : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18  ODDCCConfig();
19  ~ODDCCConfig() override;
20 
21  // User data methods
22  inline std::string getTable() override { return "ECAL_DCC_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26  inline void setSize(unsigned int id) { m_size = id; }
27  inline unsigned int getSize() const { return m_size; }
28 
30  inline std::string getDCCConfigurationUrl() const { return m_dcc_url; }
31 
33  inline std::string getTestPatternFileUrl() const { return m_test_url; }
34 
35  inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
36  inline int getNTestPatternsToLoad() const { return m_ntest; }
37 
38  inline void setSMHalf(int id) { m_sm_half = id; }
39  inline int getSMHalf() const { return m_sm_half; }
40 
41  inline void setDCCClob(unsigned char* x) { m_dcc_clob = x; }
42  inline unsigned char* getDCCClob() const { return m_dcc_clob; }
43  inline unsigned int getDCCClobSize() const { return m_size; }
44  inline void setDCCWeightsMode(std::string x) { m_wei = x; }
45  inline std::string getDCCWeightsMode() const { return m_wei; }
46 
47  void setParameters(const std::map<std::string, std::string>& my_keys_map);
48 
49 private:
50  void prepareWrite() noexcept(false) override;
51  void writeDB() noexcept(false);
52  void clear();
53  void fetchData(ODDCCConfig* result) noexcept(false);
54  int fetchID() noexcept(false);
55 
56  int fetchNextId() noexcept(false);
57 
58  // User data
59  int m_ID;
60  unsigned char* m_dcc_clob;
61  std::string m_dcc_url;
62  std::string m_test_url;
63  int m_ntest;
64  int m_sm_half;
65  unsigned int m_size;
66  std::string m_wei;
67 };
68 
69 #endif
ODDCCConfig::getDCCClob
unsigned char * getDCCClob() const
Definition: ODDCCConfig.h:42
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
ODDCCConfig::getTable
std::string getTable() override
Definition: ODDCCConfig.h:22
funct::false
false
Definition: Factorize.h:29
ODDCCConfig::getDCCWeightsMode
std::string getDCCWeightsMode() const
Definition: ODDCCConfig.h:45
ODDCCConfig::prepareWrite
void prepareWrite() noexcept(false) override
Definition: ODDCCConfig.cc:48
ODDCCConfig::getSize
unsigned int getSize() const
Definition: ODDCCConfig.h:27
ODDCCConfig::fetchID
int fetchID() noexcept(false)
Definition: ODDCCConfig.cc:230
ODDCCConfig
Definition: ODDCCConfig.h:15
IODConfig.h
ODDCCConfig::writeDB
void writeDB() noexcept(false)
Definition: ODDCCConfig.cc:134
ODDCCConfig::m_test_url
std::string m_test_url
Definition: ODDCCConfig.h:62
DDAxes::x
ODDCCConfig::fetchData
void fetchData(ODDCCConfig *result) noexcept(false)
Definition: ODDCCConfig.cc:173
ODDCCConfig::m_dcc_clob
unsigned char * m_dcc_clob
Definition: ODDCCConfig.h:60
ODDCCConfig::m_ID
int m_ID
Definition: ODDCCConfig.h:59
ODDCCConfig::getTestPatternFileUrl
std::string getTestPatternFileUrl() const
Definition: ODDCCConfig.h:33
ODDCCConfig::setTestPatternFileUrl
void setTestPatternFileUrl(std::string x)
Definition: ODDCCConfig.h:32
ODDCCConfig::setDCCWeightsMode
void setDCCWeightsMode(std::string x)
Definition: ODDCCConfig.h:44
ODDCCConfig::getSMHalf
int getSMHalf() const
Definition: ODDCCConfig.h:39
ODDCCConfig::m_dcc_url
std::string m_dcc_url
Definition: ODDCCConfig.h:61
ODDCCConfig::getId
int getId() const
Definition: ODDCCConfig.h:25
ODDCCConfig::setDCCClob
void setDCCClob(unsigned char *x)
Definition: ODDCCConfig.h:41
IODConfig
Definition: IODConfig.h:18
ODDCCConfig::fetchNextId
int fetchNextId() noexcept(false)
Definition: ODDCCConfig.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ODDCCConfig::m_sm_half
int m_sm_half
Definition: ODDCCConfig.h:64
std
Definition: JetResolutionObject.h:76
ODDCCConfig::setSize
void setSize(unsigned int id)
Definition: ODDCCConfig.h:26
ODDCCConfig::setId
void setId(int id)
Definition: ODDCCConfig.h:24
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
ODDCCConfig::setParameters
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODDCCConfig.cc:94
ODDCCConfig::getDCCConfigurationUrl
std::string getDCCConfigurationUrl() const
Definition: ODDCCConfig.h:30
ODDCCConfig::m_ntest
int m_ntest
Definition: ODDCCConfig.h:63
ODDCCConfig::~ODDCCConfig
~ODDCCConfig() override
Definition: ODDCCConfig.cc:27
ODDCCConfig::setSMHalf
void setSMHalf(int id)
Definition: ODDCCConfig.h:38
ODDCCConfig::getDCCClobSize
unsigned int getDCCClobSize() const
Definition: ODDCCConfig.h:43
Oracle.h
mps_fire.result
result
Definition: mps_fire.py:311
ODDCCConfig::getNTestPatternsToLoad
int getNTestPatternsToLoad() const
Definition: ODDCCConfig.h:36
ODDCCConfig::ODDCCConfig
ODDCCConfig()
Definition: ODDCCConfig.cc:15
ODDCCConfig::setNTestPatternsToLoad
void setNTestPatternsToLoad(int id)
Definition: ODDCCConfig.h:35
ODDCCConfig::clear
void clear()
Definition: ODDCCConfig.cc:165
ODDCCConfig::m_size
unsigned int m_size
Definition: ODDCCConfig.h:65
ODDCCConfig::setDCCConfigurationUrl
void setDCCConfigurationUrl(std::string x)
Definition: ODDCCConfig.h:29
ODDCCConfig::m_wei
std::string m_wei
Definition: ODDCCConfig.h:66