CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ODSRPConfig.h
Go to the documentation of this file.
1 #ifndef ODSRPCONFIG_H
2 #define ODSRPCONFIG_H
3 
4 #include <map>
5 #include <stdexcept>
8 
9 #define USE_NORM 1
10 #define USE_CHUN 2
11 #define USE_BUFF 3
12 
13 /* Buffer Size */
14 #define BUFSIZE 200;
15 
16 class ODSRPConfig : public IODConfig {
17 public:
18  friend class EcalCondDBInterface;
19  ODSRPConfig();
20  ~ODSRPConfig() override;
21 
22  // User data methods
23  inline std::string getTable() override { return "ECAL_SRP_CONFIGURATION"; }
24 
25  inline void setId(int id) { m_ID = id; }
26  inline int getId() const { return m_ID; }
27 
28  inline void setDebugMode(int x) { m_debug = x; }
29  inline int getDebugMode() const { return m_debug; }
30 
31  inline void setDummyMode(int x) { m_dummy = x; }
32  inline int getDummyMode() const { return m_dummy; }
33 
35  inline std::string getPatternDirectory() const { return m_patdir; }
36 
37  inline void setAutomaticMasks(int x) { m_auto = x; }
38  inline int getAutomaticMasks() const { return m_auto; }
39 
40  inline void setAutomaticSrpSelect(int x) { m_auto_srp = x; }
41  inline int getAutomaticSrpSelect() const { return m_auto_srp; }
42 
43  inline void setSRP0BunchAdjustPosition(int x) { m_bnch = x; }
44  inline int getSRP0BunchAdjustPosition() const { return m_bnch; }
45 
46  inline void setConfigFile(std::string x) { m_file = x; }
47  inline std::string getConfigFile() const { return m_file; }
48 
49  inline void setSRPClob(unsigned char* x) { m_srp_clob = x; }
50  inline unsigned char* getSRPClob() const { return m_srp_clob; }
51  inline unsigned int getSRPClobSize() const { return m_size; }
52 
53  void setParameters(const std::map<std::string, std::string>& my_keys_map);
54 
55 private:
56  void prepareWrite() noexcept(false) override;
57  void writeDB() noexcept(false);
58  void clear();
59  void fetchData(ODSRPConfig* result) noexcept(false);
60  int fetchID() noexcept(false);
61 
62  int fetchNextId() noexcept(false);
63 
64  // User data
65  int m_ID;
66  unsigned char* m_srp_clob;
67  int m_debug;
68  int m_dummy;
69  std::string m_file;
70  std::string m_patdir;
72  int m_bnch;
73  unsigned int m_size;
74 };
75 
76 #endif
int fetchNextId() noexcept(false)
Definition: ODSRPConfig.cc:37
void setPatternDirectory(std::string x)
Definition: ODSRPConfig.h:34
int getId() const
Definition: ODSRPConfig.h:26
void setSRPClob(unsigned char *x)
Definition: ODSRPConfig.h:49
uint16_t *__restrict__ id
std::string getTable() override
Definition: ODSRPConfig.h:23
std::string m_file
Definition: ODSRPConfig.h:69
std::string getConfigFile() const
Definition: ODSRPConfig.h:47
unsigned char * m_srp_clob
Definition: ODSRPConfig.h:66
void setConfigFile(std::string x)
Definition: ODSRPConfig.h:46
unsigned int m_size
Definition: ODSRPConfig.h:73
unsigned int getSRPClobSize() const
Definition: ODSRPConfig.h:51
int fetchID() noexcept(false)
Definition: ODSRPConfig.cc:243
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODSRPConfig.cc:56
tuple result
Definition: mps_fire.py:311
int getAutomaticMasks() const
Definition: ODSRPConfig.h:38
~ODSRPConfig() override
Definition: ODSRPConfig.cc:35
void clear()
Definition: ODSRPConfig.cc:25
int getDebugMode() const
Definition: ODSRPConfig.h:29
int m_auto_srp
Definition: ODSRPConfig.h:71
int getAutomaticSrpSelect() const
Definition: ODSRPConfig.h:41
void fetchData(ODSRPConfig *result) noexcept(false)
Definition: ODSRPConfig.cc:185
void prepareWrite() noexcept(false) override
Definition: ODSRPConfig.cc:109
int getSRP0BunchAdjustPosition() const
Definition: ODSRPConfig.h:44
std::string getPatternDirectory() const
Definition: ODSRPConfig.h:35
unsigned char * getSRPClob() const
Definition: ODSRPConfig.h:50
void setDebugMode(int x)
Definition: ODSRPConfig.h:28
void setSRP0BunchAdjustPosition(int x)
Definition: ODSRPConfig.h:43
void writeDB() noexcept(false)
Definition: ODSRPConfig.cc:156
int getDummyMode() const
Definition: ODSRPConfig.h:32
void setDummyMode(int x)
Definition: ODSRPConfig.h:31
void setId(int id)
Definition: ODSRPConfig.h:25
void setAutomaticMasks(int x)
Definition: ODSRPConfig.h:37
void setAutomaticSrpSelect(int x)
Definition: ODSRPConfig.h:40
std::string m_patdir
Definition: ODSRPConfig.h:70