Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:49

0001 #ifndef FECONFFGRGROUPDAT_H
0002 #define FECONFFGRGROUPDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class FEConfigFgrGroupDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   FEConfigFgrGroupDat();
0015   ~FEConfigFgrGroupDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_CONFIG_FGR_PER_GROUP_DAT"; }
0019 
0020   inline void setFgrGroupId(int x) { m_group_id = x; }
0021   inline int getFgrGroupId() const { return m_group_id; }
0022 
0023   inline void setThreshLow(float x) { m_thresh_low = x; }
0024   inline float getThreshLow() const { return m_thresh_low; }
0025   inline void setThreshHigh(float x) { m_thresh_high = x; }
0026   inline float getThreshHigh() const { return m_thresh_high; }
0027   inline void setRatioLow(float x) { m_ratio_low = x; }
0028   inline float getRatioLow() const { return m_ratio_low; }
0029   inline void setRatioHigh(float x) { m_ratio_high = x; }
0030   inline float getRatioHigh() const { return m_ratio_high; }
0031   inline void setLUTValue(int x) { m_lut = x; }
0032   inline int getLUTValue() const { return m_lut; }
0033 
0034 private:
0035   void prepareWrite() noexcept(false) override;
0036 
0037   void writeDB(const EcalLogicID* ecid, const FEConfigFgrGroupDat* item, FEConfigFgrInfo* iconf) noexcept(false);
0038 
0039   void writeArrayDB(const std::map<EcalLogicID, FEConfigFgrGroupDat>* data, FEConfigFgrInfo* iconf) noexcept(false);
0040 
0041   void fetchData(std::map<EcalLogicID, FEConfigFgrGroupDat>* fillMap, FEConfigFgrInfo* iconf) noexcept(false);
0042 
0043   // User data
0044   int m_group_id;
0045   float m_thresh_low;
0046   float m_thresh_high;
0047   float m_ratio_low;
0048   float m_ratio_high;
0049   int m_lut;
0050 };
0051 
0052 #endif