File indexing completed on 2024-04-06 12:22:56
0001 #ifndef ODJBH4CONFIG_H
0002 #define ODJBH4CONFIG_H
0003
0004 #include <map>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008
0009 class ODJBH4Config : public IODConfig {
0010 public:
0011 friend class EcalCondDBInterface;
0012 ODJBH4Config();
0013 ~ODJBH4Config() override;
0014
0015
0016 inline std::string getTable() override { return "ECAL_JBH4_CONFIGURATION"; }
0017
0018 inline void setId(int id) { m_ID = id; }
0019 inline int getId() const { return m_ID; }
0020
0021 inline void setUseBuffer(int x) { m_use_buffer = x; }
0022 inline int getUseBuffer() const { return m_use_buffer; }
0023
0024 inline void setHalModuleFile(std::string x) { m_hal_mod_file = x; }
0025 inline std::string getHalModuleFile() const { return m_hal_mod_file; }
0026
0027 inline void setHalAddressTableFile(std::string x) { m_hal_add_file = x; }
0028 inline std::string getHalAddressTableFile() const { return m_hal_add_file; }
0029
0030 inline void setHalStaticTableFile(std::string x) { m_hal_tab_file = x; }
0031 inline std::string getHalStaticTableFile() const { return m_hal_tab_file; }
0032
0033 inline void setCbd8210SerialNumber(std::string x) { m_serial = x; }
0034 inline std::string getCbd8210SerialNumber() const { return m_serial; }
0035
0036 inline void setCaenBridgeType(std::string x) { m_caen1 = x; }
0037 inline std::string getCaenBridgeType() const { return m_caen1; }
0038
0039 inline void setCaenLinkNumber(int x) { m_caen2 = x; }
0040 inline int getCaenLinkNumber() const { return m_caen2; }
0041
0042 inline void setCaenBoardNumber(int x) { m_caen3 = x; }
0043 inline int getCaenBoardNumber() const { return m_caen3; }
0044
0045 private:
0046 void prepareWrite() noexcept(false) override;
0047 void writeDB() noexcept(false);
0048 void clear();
0049 void fetchData(ODJBH4Config* result) noexcept(false);
0050 int fetchID() noexcept(false);
0051 int fetchNextId() noexcept(false);
0052
0053
0054 int m_ID;
0055
0056 int m_use_buffer;
0057 std::string m_hal_mod_file;
0058 std::string m_hal_add_file;
0059 std::string m_hal_tab_file;
0060 std::string m_serial;
0061 std::string m_caen1;
0062 int m_caen2;
0063 int m_caen3;
0064 };
0065
0066 #endif