CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
unsigned int getDCCClobSize() const
Definition: ODDCCConfig.h:43
std::string m_test_url
Definition: ODDCCConfig.h:62
uint16_t *__restrict__ id
std::string getTestPatternFileUrl() const
Definition: ODDCCConfig.h:33
unsigned int m_size
Definition: ODDCCConfig.h:65
unsigned char * m_dcc_clob
Definition: ODDCCConfig.h:60
void setNTestPatternsToLoad(int id)
Definition: ODDCCConfig.h:35
std::string m_dcc_url
Definition: ODDCCConfig.h:61
std::string m_wei
Definition: ODDCCConfig.h:66
unsigned int getSize() const
Definition: ODDCCConfig.h:27
tuple result
Definition: mps_fire.py:311
void fetchData(ODDCCConfig *result) noexcept(false)
Definition: ODDCCConfig.cc:173
int getNTestPatternsToLoad() const
Definition: ODDCCConfig.h:36
std::string getDCCConfigurationUrl() const
Definition: ODDCCConfig.h:30
void prepareWrite() noexcept(false) override
Definition: ODDCCConfig.cc:48
~ODDCCConfig() override
Definition: ODDCCConfig.cc:27
int getId() const
Definition: ODDCCConfig.h:25
void setSize(unsigned int id)
Definition: ODDCCConfig.h:26
void setDCCWeightsMode(std::string x)
Definition: ODDCCConfig.h:44
std::string getDCCWeightsMode() const
Definition: ODDCCConfig.h:45
int getSMHalf() const
Definition: ODDCCConfig.h:39
int fetchNextId() noexcept(false)
Definition: ODDCCConfig.cc:29
unsigned char * getDCCClob() const
Definition: ODDCCConfig.h:42
std::string getTable() override
Definition: ODDCCConfig.h:22
void setTestPatternFileUrl(std::string x)
Definition: ODDCCConfig.h:32
void setSMHalf(int id)
Definition: ODDCCConfig.h:38
void setDCCConfigurationUrl(std::string x)
Definition: ODDCCConfig.h:29
void setId(int id)
Definition: ODDCCConfig.h:24
void setDCCClob(unsigned char *x)
Definition: ODDCCConfig.h:41
int fetchID() noexcept(false)
Definition: ODDCCConfig.cc:230
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODDCCConfig.cc:94
void writeDB() noexcept(false)
Definition: ODDCCConfig.cc:134
void clear()
Definition: ODDCCConfig.cc:165