CMS 3D CMS Logo

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
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
ODSRPConfig::m_patdir
std::string m_patdir
Definition: ODSRPConfig.h:70
ODSRPConfig::getAutomaticMasks
int getAutomaticMasks() const
Definition: ODSRPConfig.h:38
funct::false
false
Definition: Factorize.h:34
ODSRPConfig::getAutomaticSrpSelect
int getAutomaticSrpSelect() const
Definition: ODSRPConfig.h:41
ODSRPConfig::ODSRPConfig
ODSRPConfig()
Definition: ODSRPConfig.cc:13
ODSRPConfig::fetchID
int fetchID() noexcept(false)
Definition: ODSRPConfig.cc:243
ODSRPConfig::getSRP0BunchAdjustPosition
int getSRP0BunchAdjustPosition() const
Definition: ODSRPConfig.h:44
IODConfig.h
ODSRPConfig::prepareWrite
void prepareWrite() noexcept(false) override
Definition: ODSRPConfig.cc:109
DDAxes::x
ODSRPConfig::setConfigFile
void setConfigFile(std::string x)
Definition: ODSRPConfig.h:46
ODSRPConfig::setAutomaticSrpSelect
void setAutomaticSrpSelect(int x)
Definition: ODSRPConfig.h:40
ODSRPConfig::getTable
std::string getTable() override
Definition: ODSRPConfig.h:23
ODSRPConfig::getSRPClob
unsigned char * getSRPClob() const
Definition: ODSRPConfig.h:50
ODSRPConfig::fetchNextId
int fetchNextId() noexcept(false)
Definition: ODSRPConfig.cc:37
ODSRPConfig::m_size
unsigned int m_size
Definition: ODSRPConfig.h:73
ODSRPConfig::setDebugMode
void setDebugMode(int x)
Definition: ODSRPConfig.h:28
ODSRPConfig::m_auto_srp
int m_auto_srp
Definition: ODSRPConfig.h:71
ODSRPConfig::~ODSRPConfig
~ODSRPConfig() override
Definition: ODSRPConfig.cc:35
ODSRPConfig::setParameters
void setParameters(const std::map< std::string, std::string > &my_keys_map)
Definition: ODSRPConfig.cc:56
ODSRPConfig::fetchData
void fetchData(ODSRPConfig *result) noexcept(false)
Definition: ODSRPConfig.cc:185
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ODSRPConfig::m_bnch
int m_bnch
Definition: ODSRPConfig.h:72
ODSRPConfig::m_ID
int m_ID
Definition: ODSRPConfig.h:65
ODSRPConfig::m_srp_clob
unsigned char * m_srp_clob
Definition: ODSRPConfig.h:66
ODSRPConfig::getPatternDirectory
std::string getPatternDirectory() const
Definition: ODSRPConfig.h:35
ODSRPConfig::m_dummy
int m_dummy
Definition: ODSRPConfig.h:68
ODSRPConfig::getDummyMode
int getDummyMode() const
Definition: ODSRPConfig.h:32
ODSRPConfig::setDummyMode
void setDummyMode(int x)
Definition: ODSRPConfig.h:31
ODSRPConfig::setId
void setId(int id)
Definition: ODSRPConfig.h:25
IODConfig
Definition: IODConfig.h:18
ODSRPConfig::m_debug
int m_debug
Definition: ODSRPConfig.h:67
ODSRPConfig::setAutomaticMasks
void setAutomaticMasks(int x)
Definition: ODSRPConfig.h:37
ODSRPConfig::m_auto
int m_auto
Definition: ODSRPConfig.h:71
ODSRPConfig::clear
void clear()
Definition: ODSRPConfig.cc:25
ODSRPConfig::getDebugMode
int getDebugMode() const
Definition: ODSRPConfig.h:29
ODSRPConfig::setSRPClob
void setSRPClob(unsigned char *x)
Definition: ODSRPConfig.h:49
std
Definition: JetResolutionObject.h:76
ODSRPConfig::getSRPClobSize
unsigned int getSRPClobSize() const
Definition: ODSRPConfig.h:51
ODSRPConfig::writeDB
void writeDB() noexcept(false)
Definition: ODSRPConfig.cc:156
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ODSRPConfig::setPatternDirectory
void setPatternDirectory(std::string x)
Definition: ODSRPConfig.h:34
ODSRPConfig::getId
int getId() const
Definition: ODSRPConfig.h:26
ODSRPConfig::setSRP0BunchAdjustPosition
void setSRP0BunchAdjustPosition(int x)
Definition: ODSRPConfig.h:43
Oracle.h
mps_fire.result
result
Definition: mps_fire.py:303
ODSRPConfig::getConfigFile
std::string getConfigFile() const
Definition: ODSRPConfig.h:47
ODSRPConfig::m_file
std::string m_file
Definition: ODSRPConfig.h:69
ODSRPConfig
Definition: ODSRPConfig.h:16