File indexing completed on 2024-04-06 12:22:56
0001 #ifndef ODCCSCONFIG_H
0002 #define ODCCSCONFIG_H
0003
0004 #include <map>
0005 #include <string>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008
0009 class ODCCSConfig : public IODConfig {
0010 public:
0011 friend class EcalCondDBInterface;
0012 ODCCSConfig();
0013 ~ODCCSConfig() override;
0014
0015
0016 inline std::string getTable() override { return "ECAL_CCS_CONFIGURATION"; }
0017
0018 inline void setId(int id) { m_ID = id; }
0019 inline int getId() const { return m_ID; }
0020
0021 inline void setDaccal(int x) { m_daccal = x; }
0022 inline int getDaccal() const { return m_daccal; }
0023
0024 inline void setDelay(int x) { m_delay = x; }
0025 inline int getDelay() const { return m_delay; }
0026
0027 inline void setGain(std::string x) { m_gain = x; }
0028 inline std::string getGain() const { return m_gain; }
0029
0030 inline void setMemGain(std::string x) { m_memgain = x; }
0031 inline std::string getMemGain() const { return m_memgain; }
0032
0033 inline void setOffsetHigh(int x) { m_offset_high = x; }
0034 inline int getOffsetHigh() const { return m_offset_high; }
0035
0036 inline void setOffsetLow(int x) { m_offset_low = x; }
0037 inline int getOffsetLow() const { return m_offset_low; }
0038
0039 inline void setOffsetMid(int x) { m_offset_mid = x; }
0040 inline int getOffsetMid() const { return m_offset_mid; }
0041
0042 inline void setTrgMode(std::string x) { m_trg_mode = x; }
0043 inline std::string getTrgMode() const { return m_trg_mode; }
0044
0045 inline void setTrgFilter(std::string x) { m_trg_filter = x; }
0046 inline std::string getTrgFilter() const { return m_trg_filter; }
0047
0048 inline void setClock(int x) { m_clock = x; }
0049 inline int getClock() const { return m_clock; }
0050 inline void setBGOSource(std::string x) { m_bgo = x; }
0051 inline std::string getBGOSource() const { return m_bgo; }
0052 inline void setTTSMask(int x) { m_tts_mask = x; }
0053 inline int getTTSMask() const { return m_tts_mask; }
0054 inline void setDAQBCIDPreset(int x) { m_daq = x; }
0055 inline int getDAQBCIDPreset() const { return m_daq; }
0056 inline void setTrgBCIDPreset(int x) { m_trg = x; }
0057 inline int getTrgBCIDPreset() const { return m_trg; }
0058 inline void setBC0Counter(int x) { m_bc0 = x; }
0059 inline int getBC0Counter() const { return m_bc0; }
0060 inline int getBC0Delay() const { return m_bc0_delay; }
0061 inline void setBC0Delay(int x) { m_bc0_delay = x; }
0062 inline int getTEDelay() const { return m_te_delay; }
0063 inline void setTEDelay(int x) { m_te_delay = x; }
0064
0065 int fetchNextId() noexcept(false);
0066 void setParameters(const std::map<std::string, std::string>& my_keys_map);
0067
0068 private:
0069 void prepareWrite() noexcept(false) override;
0070
0071 void writeDB() noexcept(false);
0072
0073 void clear();
0074
0075 void fetchData(ODCCSConfig* result) noexcept(false);
0076
0077 int fetchID() noexcept(false);
0078
0079
0080 int m_ID;
0081 int m_daccal;
0082 int m_delay;
0083 std::string m_gain;
0084 std::string m_memgain;
0085 int m_offset_high;
0086 int m_offset_low;
0087 int m_offset_mid;
0088 std::string m_pedestal_offset_release;
0089 std::string m_system;
0090 std::string m_trg_mode;
0091 std::string m_trg_filter;
0092 int m_clock;
0093 std::string m_bgo;
0094 int m_tts_mask;
0095 int m_daq;
0096 int m_trg;
0097 int m_bc0;
0098 int m_bc0_delay;
0099 int m_te_delay;
0100 };
0101
0102 #endif