CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ODTCCConfig.h
Go to the documentation of this file.
1 #ifndef ODTCCCONFIG_H
2 #define ODTCCCONFIG_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 ODTCCConfig : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18  ODTCCConfig();
19  ~ODTCCConfig() override;
20 
21  // User data methods
22  inline std::string getTable() override { return "ECAL_TCC_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26 
28  inline std::string getTCCConfigurationFile() const { return m_tcc_file; }
30  inline std::string getLUTConfigurationFile() const { return m_lut_file; }
32  inline std::string getSLBConfigurationFile() const { return m_slb_file; }
34  inline std::string getTestPatternFileUrl() const { return m_test_url; }
35  inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
36  inline int getNTestPatternsToLoad() const { return m_ntest; }
37 
38  inline void setTCCClob(unsigned char* x) { m_tcc_clob = x; }
39  inline unsigned char* getTCCClob() const { return m_tcc_clob; }
40 
41  inline void setLUTClob(unsigned char* x) { m_lut_clob = x; }
42  inline unsigned char* getLUTClob() const { return m_lut_clob; }
43 
44  inline void setSLBClob(unsigned char* x) { m_slb_clob = x; }
45  inline unsigned char* getSLBClob() const { return m_slb_clob; }
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(ODTCCConfig* 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_tcc_clob;
61  unsigned char* m_lut_clob;
62  unsigned char* m_slb_clob;
63  std::string m_tcc_file;
64  std::string m_lut_file;
65  std::string m_slb_file;
66  std::string m_test_url;
67  int m_ntest;
68  unsigned int m_size;
69 };
70 
71 #endif
unsigned char * m_tcc_clob
Definition: ODTCCConfig.h:60
void writeDB() noexcept(false)
Definition: ODTCCConfig.cc:126
uint16_t *__restrict__ id
void setSLBClob(unsigned char *x)
Definition: ODTCCConfig.h:44
unsigned char * m_slb_clob
Definition: ODTCCConfig.h:62
unsigned char * getTCCClob() const
Definition: ODTCCConfig.h:39
void setLUTConfigurationFile(std::string x)
Definition: ODTCCConfig.h:29
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODTCCConfig.cc:52
void setId(int id)
Definition: ODTCCConfig.h:24
int fetchNextId() noexcept(false)
Definition: ODTCCConfig.cc:33
unsigned int m_size
Definition: ODTCCConfig.h:68
std::string m_slb_file
Definition: ODTCCConfig.h:65
int getId() const
Definition: ODTCCConfig.h:25
unsigned char * m_lut_clob
Definition: ODTCCConfig.h:61
~ODTCCConfig() override
Definition: ODTCCConfig.cc:31
tuple result
Definition: mps_fire.py:311
unsigned char * getLUTClob() const
Definition: ODTCCConfig.h:42
void setTCCConfigurationFile(std::string x)
Definition: ODTCCConfig.h:27
unsigned char * getSLBClob() const
Definition: ODTCCConfig.h:45
void setTCCClob(unsigned char *x)
Definition: ODTCCConfig.h:38
std::string m_tcc_file
Definition: ODTCCConfig.h:63
void setNTestPatternsToLoad(int id)
Definition: ODTCCConfig.h:35
void setSLBConfigurationFile(std::string x)
Definition: ODTCCConfig.h:31
void fetchData(ODTCCConfig *result) noexcept(false)
Definition: ODTCCConfig.cc:156
std::string getTestPatternFileUrl() const
Definition: ODTCCConfig.h:34
void prepareWrite() noexcept(false) override
Definition: ODTCCConfig.cc:72
std::string m_test_url
Definition: ODTCCConfig.h:66
void setTestPatternFileUrl(std::string x)
Definition: ODTCCConfig.h:33
std::string getTCCConfigurationFile() const
Definition: ODTCCConfig.h:28
std::string getTable() override
Definition: ODTCCConfig.h:22
std::string getSLBConfigurationFile() const
Definition: ODTCCConfig.h:32
std::string getLUTConfigurationFile() const
Definition: ODTCCConfig.h:30
void setLUTClob(unsigned char *x)
Definition: ODTCCConfig.h:41
int fetchID() noexcept(false)
Definition: ODTCCConfig.cc:228
void clear()
Definition: ODTCCConfig.cc:23
int getNTestPatternsToLoad() const
Definition: ODTCCConfig.h:36
std::string m_lut_file
Definition: ODTCCConfig.h:64