CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ODLTCConfig.h
Go to the documentation of this file.
1 #ifndef ODLTCCONFIG_H
2 #define ODLTCCONFIG_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 ODLTCConfig : public IODConfig {
16  public:
17  friend class EcalCondDBInterface;
18  ODLTCConfig();
19  ~ODLTCConfig();
20 
21  // User data methods
22  inline std::string getTable() { return "ECAL_LTC_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26 
27  inline void setSize(unsigned int id) { m_size = id; }
28  inline unsigned int getSize() const { return m_size; }
29 
30  inline void setLTCConfigurationFile(std::string x) { m_ltc_file = x; }
31  inline std::string getLTCConfigurationFile() const { return m_ltc_file; }
32 
33  inline void setLTCClob(unsigned char* x) { m_ltc_clob = x; }
34  inline unsigned char* getLTCClob() const { return m_ltc_clob; }
35 
36  void setParameters(std::map<std::string,std::string> my_keys_map);
37 
38  private:
39  void prepareWrite() throw(std::runtime_error);
40  void writeDB() throw(std::runtime_error);
41  void clear();
42  void fetchData(ODLTCConfig * result) throw(std::runtime_error);
43  int fetchID() throw(std::runtime_error);
44 
45 
46  int fetchNextId() throw(std::runtime_error);
47 
48  // User data
49  int m_ID;
50  unsigned char* m_ltc_clob;
51  std::string m_ltc_file;
52  int m_size;
53 
54 };
55 
56 #endif
unsigned char * m_ltc_clob
Definition: ODLTCConfig.h:50
void setSize(unsigned int id)
Definition: ODLTCConfig.h:27
int getId() const
Definition: ODLTCConfig.h:25
int fetchNextId()
Definition: ODLTCConfig.cc:34
void setLTCConfigurationFile(std::string x)
Definition: ODLTCConfig.h:30
std::string m_ltc_file
Definition: ODLTCConfig.h:51
void writeDB()
Definition: ODLTCConfig.cc:148
tuple result
Definition: query.py:137
void fetchData(ODLTCConfig *result)
Definition: ODLTCConfig.cc:199
void setLTCClob(unsigned char *x)
Definition: ODLTCConfig.h:33
void setId(int id)
Definition: ODLTCConfig.h:24
std::string getLTCConfigurationFile() const
Definition: ODLTCConfig.h:31
void setParameters(std::map< std::string, std::string > my_keys_map)
Definition: ODLTCConfig.cc:102
void clear()
Definition: ODLTCConfig.cc:190
unsigned char * getLTCClob() const
Definition: ODLTCConfig.h:34
unsigned int getSize() const
Definition: ODLTCConfig.h:28
x
Definition: VDTMath.h:216
std::string getTable()
Definition: ODLTCConfig.h:22
void prepareWrite()
Definition: ODLTCConfig.cc:58