File indexing completed on 2023-03-17 11:15:06
0001 #ifndef ODSCANCONFIG_H
0002 #define ODSCANCONFIG_H
0003
0004 #include <map>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008
0009 class ODScanConfig : public IODConfig {
0010 public:
0011 friend class EcalCondDBInterface;
0012 ODScanConfig();
0013 ~ODScanConfig() override;
0014
0015
0016 inline std::string getTable() override { return "ECAL_Scan_DAT"; }
0017
0018 inline void setId(int id) { m_ID = id; }
0019 inline int getId() const { return m_ID; }
0020
0021 inline void setTypeId(int x) { m_type_id = x; }
0022 inline int getTypeId() const { return m_type_id; }
0023
0024 inline void setScanType(std::string x) { m_type = x; }
0025 inline std::string getScanType() const { return m_type; }
0026
0027 inline void setFromVal(int x) { m_from_val = x; }
0028 inline int getFromVal() const { return m_from_val; }
0029
0030 inline void setToVal(int x) { m_to_val = x; }
0031 inline int getToVal() const { return m_to_val; }
0032
0033 inline void setStep(int x) { m_step = x; }
0034 inline int getStep() const { return m_step; }
0035 void setParameters(const std::map<std::string, std::string>& my_keys_map);
0036
0037 private:
0038 void prepareWrite() noexcept(false) override;
0039 void writeDB() noexcept(false);
0040 void clear();
0041 void fetchData(ODScanConfig* result) noexcept(false);
0042 int fetchID() noexcept(false);
0043 int fetchNextId() noexcept(false);
0044
0045
0046 int m_ID;
0047
0048 int m_type_id;
0049 std::string m_type;
0050 int m_from_val;
0051 int m_to_val;
0052 int m_step;
0053 };
0054
0055 #endif