File indexing completed on 2024-04-06 12:22:53
0001 #ifndef FECONFIGLIN_H
0002 #define FECONFIGLIN_H
0003
0004 #include <map>
0005 #include <string>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 #include "OnlineDB/EcalCondDB/interface/Tm.h"
0009 #include "OnlineDB/EcalCondDB/interface/DateHandler.h"
0010
0011 class FEConfigLinInfo : public IODConfig {
0012 public:
0013 friend class EcalCondDBInterface;
0014
0015 FEConfigLinInfo();
0016 ~FEConfigLinInfo() override;
0017
0018
0019 inline std::string getTable() override { return "FE_CONFIG_LIN_INFO"; }
0020
0021 inline void setIOVId(int iov_id) { m_iov_id = iov_id; }
0022 int getIOVId() const { return m_iov_id; }
0023
0024 inline void setId(int id) { m_ID = id; }
0025 inline int getId() const { return m_ID; }
0026
0027 void setID(int id) { setId(id); }
0028 int getID() { return getId(); }
0029
0030 inline void setVersion(int id) { m_version = id; }
0031 inline int getVersion() const { return m_version; }
0032
0033 Tm getDBTime() const { return m_db_time; }
0034 void setDBTime(const Tm& x) { m_db_time = x; }
0035
0036
0037 int fetchID() noexcept(false);
0038 int fetchNextId() noexcept(false);
0039 void setByID(int id) noexcept(false);
0040 void setParameters(const std::map<std::string, std::string>& my_keys_map);
0041
0042
0043 inline bool operator==(const FEConfigLinInfo& r) const { return (m_ID == r.m_ID); }
0044 inline bool operator!=(const FEConfigLinInfo& r) const { return !(*this == r); }
0045
0046 private:
0047
0048 int m_iov_id;
0049 int m_ID;
0050 Tm m_db_time;
0051 int m_version;
0052
0053 void prepareWrite() noexcept(false) override;
0054 void writeDB() noexcept(false);
0055 void clear();
0056 void fetchData(FEConfigLinInfo* result) noexcept(false);
0057 void fetchLastData(FEConfigLinInfo* result) noexcept(false);
0058 };
0059
0060 #endif