CMS 3D CMS Logo

ODTTCFConfig.h
Go to the documentation of this file.
1 #ifndef ODTTCFCONFIG_H
2 #define ODTTCFCONFIG_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 ODTTCFConfig : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18  ODTTCFConfig();
19  ~ODTTCFConfig() override;
20 
21  // User data methods
22  inline std::string getTable() override { return "ECAL_TTCF_CONFIGURATION"; }
23  inline void setSize(unsigned int id) { m_size = id; }
24  inline unsigned int getSize() const { return m_size; }
25 
26  inline void setId(int id) { m_ID = id; }
27  inline int getId() const { return m_ID; }
28 
31 
32  inline void setTTCFClob(unsigned char* x) { m_ttcf_clob = x; }
33  inline unsigned char* getTTCFClob() const { return m_ttcf_clob; }
34 
35  inline void setRxBC0Delay(int x) { m_rxbc0_delay = x; }
36  inline int getRxBC0Delay() { return m_rxbc0_delay; }
37  inline void setReg30(int x) { m_reg_30 = x; }
38  inline int getReg30() { return m_reg_30; }
39 
40  void setParameters(const std::map<std::string, std::string>& my_keys_map);
41 
42 private:
43  void prepareWrite() noexcept(false) override;
44 
45  void writeDB() noexcept(false);
46 
47  void clear();
48 
49  void fetchData(ODTTCFConfig* result) noexcept(false);
50 
51  int fetchID() noexcept(false);
52 
53  int fetchNextId() noexcept(false);
54 
55  // User data
56  int m_ID;
57  unsigned char* m_ttcf_clob;
58  unsigned int m_size;
59  std::string m_ttcf_file;
60 
62  int m_reg_30;
63 };
64 
65 #endif
~ODTTCFConfig() override
Definition: ODTTCFConfig.cc:25
std::string getTable() override
Definition: ODTTCFConfig.h:22
int getId() const
Definition: ODTTCFConfig.h:27
void prepareWrite() noexcept(false) override
Definition: ODTTCFConfig.cc:48
unsigned int getSize() const
Definition: ODTTCFConfig.h:24
unsigned int m_size
Definition: ODTTCFConfig.h:58
void setSize(unsigned int id)
Definition: ODTTCFConfig.h:23
void setReg30(int x)
Definition: ODTTCFConfig.h:37
int getRxBC0Delay()
Definition: ODTTCFConfig.h:36
std::string m_ttcf_file
Definition: ODTTCFConfig.h:59
void setTTCFClob(unsigned char *x)
Definition: ODTTCFConfig.h:32
std::string getTTCFConfigurationFile() const
Definition: ODTTCFConfig.h:30
unsigned char * getTTCFClob() const
Definition: ODTTCFConfig.h:33
void setId(int id)
Definition: ODTTCFConfig.h:26
void setParameters(const std::map< std::string, std::string > &my_keys_map)
int fetchID() noexcept(false)
void setTTCFConfigurationFile(std::string x)
Definition: ODTTCFConfig.h:29
unsigned char * m_ttcf_clob
Definition: ODTTCFConfig.h:57
int fetchNextId() noexcept(false)
Definition: ODTTCFConfig.cc:27
void writeDB() noexcept(false)
Definition: ODTTCFConfig.cc:90
void setRxBC0Delay(int x)
Definition: ODTTCFConfig.h:35
void fetchData(ODTTCFConfig *result) noexcept(false)
int getReg30()
Definition: ODTTCFConfig.h:38