CMS 3D CMS Logo

ODTCCEEConfig.h
Go to the documentation of this file.
1 #ifndef ODTCCEECONFIG_H
2 #define ODTCCEECONFIG_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 ODTCCEEConfig : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18  ODTCCEEConfig();
19  ~ODTCCEEConfig() override;
20 
21  // User data methods
22  inline std::string getTable() override { return "ECAL_TCC_EE_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26 
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  inline void setTriggerPos(int id) { m_trigpos = id; }
38  inline int getTrigPos() const { return m_trigpos; }
39 
40  inline void setSLBLatency(int id) { m_slb = id; }
41  inline int getSLBLatency() const { return m_slb; }
42 
43  inline void setTCCClob(unsigned char* x) { m_tcc_ee_clob = x; }
44  inline unsigned char* getTCCClob() const { return m_tcc_ee_clob; }
45 
46  inline void setLUTClob(unsigned char* x) { m_lut_clob = x; }
47  inline unsigned char* getLUTClob() const { return m_lut_clob; }
48 
49  inline void setSLBClob(unsigned char* x) { m_slb_clob = x; }
50  inline unsigned char* getSLBClob() const { return m_slb_clob; }
51 
52  void setParameters(const std::map<std::string, std::string>& my_keys_map);
53 
54 private:
55  void prepareWrite() noexcept(false) override;
56  void writeDB() noexcept(false);
57  void clear();
58  void fetchData(ODTCCEEConfig* result) noexcept(false);
59  int fetchID() noexcept(false);
60 
61  int fetchNextId() noexcept(false);
62 
63  // User data
64  int m_ID;
65  unsigned char* m_tcc_ee_clob;
66  unsigned char* m_lut_clob;
67  unsigned char* m_slb_clob;
68  std::string m_tcc_ee_file;
69  std::string m_lut_file;
70  std::string m_slb_file;
71  std::string m_test_url;
72  int m_ntest;
73  int m_trigpos;
74  int m_slb;
75  unsigned int m_size;
76 };
77 
78 #endif
std::string m_lut_file
Definition: ODTCCEEConfig.h:69
std::string getTCCConfigurationFile() const
Definition: ODTCCEEConfig.h:28
unsigned char * getTCCClob() const
Definition: ODTCCEEConfig.h:44
void setSLBConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:31
void writeDB() noexcept(false)
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:68
void setLUTConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:29
unsigned char * m_tcc_ee_clob
Definition: ODTCCEEConfig.h:65
std::string getSLBConfigurationFile() const
Definition: ODTCCEEConfig.h:32
void fetchData(ODTCCEEConfig *result) noexcept(false)
int fetchNextId() noexcept(false)
void setLUTClob(unsigned char *x)
Definition: ODTCCEEConfig.h:46
int getId() const
Definition: ODTCCEEConfig.h:25
void setParameters(const std::map< std::string, std::string > &my_keys_map)
unsigned char * getSLBClob() const
Definition: ODTCCEEConfig.h:50
std::string m_test_url
Definition: ODTCCEEConfig.h:71
void setId(int id)
Definition: ODTCCEEConfig.h:24
void setTriggerPos(int id)
Definition: ODTCCEEConfig.h:37
unsigned char * getLUTClob() const
Definition: ODTCCEEConfig.h:47
int getNTestPatternsToLoad() const
Definition: ODTCCEEConfig.h:36
~ODTCCEEConfig() override
void setTCCConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:27
void setSLBLatency(int id)
Definition: ODTCCEEConfig.h:40
std::string m_slb_file
Definition: ODTCCEEConfig.h:70
void setSLBClob(unsigned char *x)
Definition: ODTCCEEConfig.h:49
int fetchID() noexcept(false)
void setTCCClob(unsigned char *x)
Definition: ODTCCEEConfig.h:43
std::string getLUTConfigurationFile() const
Definition: ODTCCEEConfig.h:30
int getSLBLatency() const
Definition: ODTCCEEConfig.h:41
void setNTestPatternsToLoad(int id)
Definition: ODTCCEEConfig.h:35
unsigned char * m_lut_clob
Definition: ODTCCEEConfig.h:66
void setTestPatternFileUrl(std::string x)
Definition: ODTCCEEConfig.h:33
std::string getTable() override
Definition: ODTCCEEConfig.h:22
unsigned int m_size
Definition: ODTCCEEConfig.h:75
unsigned char * m_slb_clob
Definition: ODTCCEEConfig.h:67
void prepareWrite() noexcept(false) override
std::string getTestPatternFileUrl() const
Definition: ODTCCEEConfig.h:34
int getTrigPos() const
Definition: ODTCCEEConfig.h:38