CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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();
20 
21  // User data methods
22  inline std::string getTable() { 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 
55  private:
56  void prepareWrite() throw(std::runtime_error);
57  void writeDB() throw(std::runtime_error);
58  void clear();
59  void fetchData(ODTCCEEConfig * result) throw(std::runtime_error);
60  int fetchID() throw(std::runtime_error);
61 
62 
63  int fetchNextId() throw(std::runtime_error);
64 
65  // User data
66  int m_ID;
67  unsigned char* m_tcc_ee_clob;
68  unsigned char* m_lut_clob;
69  unsigned char* m_slb_clob;
70  std::string m_tcc_ee_file;
71  std::string m_lut_file;
72  std::string m_slb_file;
73  std::string m_test_url;
74  int m_ntest;
75  int m_trigpos;
76  int m_slb;
77  unsigned int m_size;
78 };
79 
80 #endif
std::string m_lut_file
Definition: ODTCCEEConfig.h:71
std::string getTable()
Definition: ODTCCEEConfig.h:22
void setSLBConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:31
int getNTestPatternsToLoad() const
Definition: ODTCCEEConfig.h:36
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:70
void setLUTConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:29
unsigned char * m_tcc_ee_clob
Definition: ODTCCEEConfig.h:67
std::string getTestPatternFileUrl() const
Definition: ODTCCEEConfig.h:34
unsigned char * getTCCClob() const
Definition: ODTCCEEConfig.h:44
void setLUTClob(unsigned char *x)
Definition: ODTCCEEConfig.h:46
int getId() const
Definition: ODTCCEEConfig.h:25
int getSLBLatency() const
Definition: ODTCCEEConfig.h:41
unsigned char * getSLBClob() const
Definition: ODTCCEEConfig.h:50
void setParameters(const std::map< std::string, std::string > &my_keys_map)
std::string m_test_url
Definition: ODTCCEEConfig.h:73
tuple result
Definition: query.py:137
void setId(int id)
Definition: ODTCCEEConfig.h:24
void prepareWrite()
void setTriggerPos(int id)
Definition: ODTCCEEConfig.h:37
std::string getSLBConfigurationFile() const
Definition: ODTCCEEConfig.h:32
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:72
void setSLBClob(unsigned char *x)
Definition: ODTCCEEConfig.h:49
int getTrigPos() const
Definition: ODTCCEEConfig.h:38
void setTCCClob(unsigned char *x)
Definition: ODTCCEEConfig.h:43
void setNTestPatternsToLoad(int id)
Definition: ODTCCEEConfig.h:35
std::string getTCCConfigurationFile() const
Definition: ODTCCEEConfig.h:28
unsigned char * m_lut_clob
Definition: ODTCCEEConfig.h:68
Definition: DDAxes.h:10
std::string getLUTConfigurationFile() const
Definition: ODTCCEEConfig.h:30
void setTestPatternFileUrl(std::string x)
Definition: ODTCCEEConfig.h:33
unsigned int m_size
Definition: ODTCCEEConfig.h:77
void fetchData(ODTCCEEConfig *result)
unsigned char * getLUTClob() const
Definition: ODTCCEEConfig.h:47
unsigned char * m_slb_clob
Definition: ODTCCEEConfig.h:69