CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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();
20 
21  // User data methods
22  inline std::string getTable() { return "ECAL_TCC_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26 
27  inline void setTCCConfigurationFile(std::string x) { m_tcc_file = x; }
28  inline std::string getTCCConfigurationFile() const { return m_tcc_file; }
29  inline void setLUTConfigurationFile(std::string x) { m_lut_file = x; }
30  inline std::string getLUTConfigurationFile() const { return m_lut_file; }
31  inline void setSLBConfigurationFile(std::string x) { m_slb_file = x; }
32  inline std::string getSLBConfigurationFile() const { return m_slb_file; }
33  inline void setTestPatternFileUrl(std::string x) { m_test_url = x; }
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(std::map<std::string,std::string> my_keys_map);
48 
49 
50  private:
51  void prepareWrite() throw(std::runtime_error);
52  void writeDB() throw(std::runtime_error);
53  void clear();
54  void fetchData(ODTCCConfig * result) throw(std::runtime_error);
55  int fetchID() throw(std::runtime_error);
56 
57 
58  int fetchNextId() throw(std::runtime_error);
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;
65  std::string m_tcc_file;
66  std::string m_lut_file;
67  std::string m_slb_file;
68  std::string m_test_url;
69  int m_ntest;
70  unsigned int m_size;
71 };
72 
73 #endif
std::string getTable()
Definition: ODTCCConfig.h:22
unsigned char * m_tcc_clob
Definition: ODTCCConfig.h:62
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 fetchData(ODTCCConfig *result)
Definition: ODTCCConfig.cc:180
void prepareWrite()
Definition: ODTCCConfig.cc:81
void setLUTConfigurationFile(std::string x)
Definition: ODTCCConfig.h:29
void setId(int id)
Definition: ODTCCConfig.h:24
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
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
tuple result
Definition: query.py:137
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
std::string getTestPatternFileUrl() const
Definition: ODTCCConfig.h:34
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
void setParameters(std::map< std::string, std::string > my_keys_map)
Definition: ODTCCConfig.cc:60
int fetchNextId()
Definition: ODTCCConfig.cc:38
std::string getSLBConfigurationFile() const
Definition: ODTCCConfig.h:32
void writeDB()
Definition: ODTCCConfig.cc:137
std::string getLUTConfigurationFile() const
Definition: ODTCCConfig.h:30
x
Definition: VDTMath.h:216
void setLUTClob(unsigned char *x)
Definition: ODTCCConfig.h:41
void clear()
Definition: ODTCCConfig.cc:24
int getNTestPatternsToLoad() const
Definition: ODTCCConfig.h:36
std::string m_lut_file
Definition: ODTCCConfig.h:66