CMS 3D CMS Logo

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 
50  private:
51  void prepareWrite() noexcept(false) override;
52  void writeDB() noexcept(false);
53  void clear();
54  void fetchData(ODTCCConfig * result) noexcept(false);
55  int fetchID() noexcept(false);
56 
57 
58  int fetchNextId() noexcept(false);
59 
60  // User data
61  int m_ID;
62  unsigned char* m_tcc_clob;
63  unsigned char* m_lut_clob;
64  unsigned char* m_slb_clob;
69  int m_ntest;
70  unsigned int m_size;
71 };
72 
73 #endif
unsigned char * m_tcc_clob
Definition: ODTCCConfig.h:62
void writeDB() noexcept(false)
Definition: ODTCCConfig.cc:137
void setSLBClob(unsigned char *x)
Definition: ODTCCConfig.h:44
unsigned char * m_slb_clob
Definition: ODTCCConfig.h:64
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:60
#define noexcept
void setId(int id)
Definition: ODTCCConfig.h:24
int fetchNextId() noexcept(false)
Definition: ODTCCConfig.cc:38
unsigned int m_size
Definition: ODTCCConfig.h:70
std::string m_slb_file
Definition: ODTCCConfig.h:67
int getId() const
Definition: ODTCCConfig.h:25
unsigned char * m_lut_clob
Definition: ODTCCConfig.h:63
~ODTCCConfig() override
Definition: ODTCCConfig.cc:34
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:65
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:180
std::string getTestPatternFileUrl() const
Definition: ODTCCConfig.h:34
void prepareWrite() noexcept(false) override
Definition: ODTCCConfig.cc:81
std::string m_test_url
Definition: ODTCCConfig.h:68
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:256
void clear()
Definition: ODTCCConfig.cc:24
int getNTestPatternsToLoad() const
Definition: ODTCCConfig.h:36
std::string m_lut_file
Definition: ODTCCConfig.h:66