File indexing completed on 2024-04-06 12:22:53
0001 #ifndef ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTGROUPDAT_H
0002 #define ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTGROUPDAT_H
0003
0004 #include <vector>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigOddWeightInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010
0011 class FEConfigOddWeightGroupDat : public IDataItem {
0012 public:
0013 friend class EcalCondDBInterface;
0014 FEConfigOddWeightGroupDat();
0015 ~FEConfigOddWeightGroupDat() override;
0016
0017
0018 inline std::string getTable() override { return "FE_WEIGHT2_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 inline void setWeight5(float x) { m_w5 = x; }
0034 inline float getWeight5() const { return m_w5; }
0035
0036 private:
0037 void prepareWrite() noexcept(false) override;
0038
0039 void writeDB(const EcalLogicID* ecid,
0040 const FEConfigOddWeightGroupDat* item,
0041 FEConfigOddWeightInfo* iconf) noexcept(false);
0042
0043 void writeArrayDB(const std::map<EcalLogicID, FEConfigOddWeightGroupDat>* data,
0044 FEConfigOddWeightInfo* iconf) noexcept(false);
0045
0046 void fetchData(std::map<EcalLogicID, FEConfigOddWeightGroupDat>* fillMap,
0047 FEConfigOddWeightInfo* iconf) noexcept(false);
0048
0049
0050 int m_group_id;
0051 float m_w0;
0052 float m_w1;
0053 float m_w2;
0054 float m_w3;
0055 float m_w4;
0056 float m_w5;
0057 };
0058
0059 #endif