File indexing completed on 2024-04-06 12:22:53
0001 #ifndef FECONFWEIGHTGROUPDAT_H
0002 #define FECONFWEIGHTGROUPDAT_H
0003
0004 #include <vector>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010
0011 class FEConfigWeightGroupDat : public IDataItem {
0012 public:
0013 friend class EcalCondDBInterface;
0014 FEConfigWeightGroupDat();
0015 ~FEConfigWeightGroupDat() override;
0016
0017
0018 inline std::string getTable() override { return "FE_CONFIG_WEIGHT_PER_GROUP_DAT"; }
0019
0020 inline void setWeightGroupId(int x) { m_group_id = x; }
0021 inline int getWeightGroupId() const { return m_group_id; }
0022
0023 inline void setWeight0(float x) { m_w0 = x; }
0024 inline float getWeight0() const { return m_w0; }
0025 inline void setWeight1(float x) { m_w1 = x; }
0026 inline float getWeight1() const { return m_w1; }
0027 inline void setWeight2(float x) { m_w2 = x; }
0028 inline float getWeight2() const { return m_w2; }
0029 inline void setWeight3(float x) { m_w3 = x; }
0030 inline float getWeight3() const { return m_w3; }
0031 inline void setWeight4(float x) { m_w4 = x; }
0032 inline float getWeight4() const { return m_w4; }
0033
0034 private:
0035 void prepareWrite() noexcept(false) override;
0036
0037 void writeDB(const EcalLogicID* ecid, const FEConfigWeightGroupDat* item, FEConfigWeightInfo* iconf) noexcept(false);
0038
0039 void writeArrayDB(const std::map<EcalLogicID, FEConfigWeightGroupDat>* data,
0040 FEConfigWeightInfo* iconf) noexcept(false);
0041
0042 void fetchData(std::map<EcalLogicID, FEConfigWeightGroupDat>* fillMap, FEConfigWeightInfo* iconf) noexcept(false);
0043
0044
0045 int m_group_id;
0046 float m_w0;
0047 float m_w1;
0048 float m_w2;
0049 float m_w3;
0050 float m_w4;
0051 };
0052
0053 #endif