test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ODDCCConfig.h
Go to the documentation of this file.
1 #ifndef ODDCCCONFIG_H
2 #define ODDCCCONFIG_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 ODDCCConfig : public IODConfig {
16  public:
17  friend class EcalCondDBInterface;
18  ODDCCConfig();
19  ~ODDCCConfig();
20 
21  // User data methods
22  inline std::string getTable() { return "ECAL_DCC_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26  inline void setSize(unsigned int id) { m_size = id; }
27  inline unsigned int getSize() const { return m_size; }
28 
30  inline std::string getDCCConfigurationUrl() const { return m_dcc_url; }
31 
33  inline std::string getTestPatternFileUrl() const { return m_test_url; }
34 
35  inline void setNTestPatternsToLoad(int id) { m_ntest = id; }
36  inline int getNTestPatternsToLoad() const { return m_ntest; }
37 
38  inline void setSMHalf(int id) { m_sm_half = id; }
39  inline int getSMHalf() const { return m_sm_half; }
40 
41  inline void setDCCClob(unsigned char* x) { m_dcc_clob = x; }
42  inline unsigned char* getDCCClob() const { return m_dcc_clob; }
43  inline unsigned int getDCCClobSize() const { return m_size; }
44  inline void setDCCWeightsMode(std::string x) { m_wei = x; }
45  inline std::string getDCCWeightsMode() const { return m_wei; }
46 
47  void setParameters(const std::map<std::string,std::string>& my_keys_map);
48 
49  private:
50  void prepareWrite() throw(std::runtime_error);
51  void writeDB() throw(std::runtime_error);
52  void clear();
53  void fetchData(ODDCCConfig * result) throw(std::runtime_error);
54  int fetchID() throw(std::runtime_error);
55 
56 
57  int fetchNextId() throw(std::runtime_error);
58 
59  // User data
60  int m_ID;
61  unsigned char* m_dcc_clob;
62  std::string m_dcc_url;
63  std::string m_test_url;
64  int m_ntest;
65  int m_sm_half;
66  unsigned int m_size;
67  std::string m_wei;
68 
69 };
70 
71 #endif
unsigned int getDCCClobSize() const
Definition: ODDCCConfig.h:43
int fetchNextId()
Definition: ODDCCConfig.cc:35
std::string m_test_url
Definition: ODDCCConfig.h:63
std::string getTestPatternFileUrl() const
Definition: ODDCCConfig.h:33
unsigned int m_size
Definition: ODDCCConfig.h:66
unsigned char * m_dcc_clob
Definition: ODDCCConfig.h:61
void setNTestPatternsToLoad(int id)
Definition: ODDCCConfig.h:35
std::string m_dcc_url
Definition: ODDCCConfig.h:62
std::string m_wei
Definition: ODDCCConfig.h:67
unsigned int getSize() const
Definition: ODDCCConfig.h:27
tuple result
Definition: mps_fire.py:84
std::string getTable()
Definition: ODDCCConfig.h:22
int getNTestPatternsToLoad() const
Definition: ODDCCConfig.h:36
std::string getDCCConfigurationUrl() const
Definition: ODDCCConfig.h:30
int getId() const
Definition: ODDCCConfig.h:25
void setSize(unsigned int id)
Definition: ODDCCConfig.h:26
void setDCCWeightsMode(std::string x)
Definition: ODDCCConfig.h:44
std::string getDCCWeightsMode() const
Definition: ODDCCConfig.h:45
int getSMHalf() const
Definition: ODDCCConfig.h:39
unsigned char * getDCCClob() const
Definition: ODDCCConfig.h:42
void setTestPatternFileUrl(std::string x)
Definition: ODDCCConfig.h:32
void setSMHalf(int id)
Definition: ODDCCConfig.h:38
void setDCCConfigurationUrl(std::string x)
Definition: ODDCCConfig.h:29
void setId(int id)
Definition: ODDCCConfig.h:24
void writeDB()
Definition: ODDCCConfig.cc:153
void setDCCClob(unsigned char *x)
Definition: ODDCCConfig.h:41
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODDCCConfig.cc:110
void fetchData(ODDCCConfig *result)
Definition: ODDCCConfig.cc:207
void clear()
Definition: ODDCCConfig.cc:194
void prepareWrite()
Definition: ODDCCConfig.cc:59