Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:53

0001 #ifndef FECONFPARAMDAT_H
0002 #define FECONFPARAMDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class FEConfigParamDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   FEConfigParamDat();
0015   ~FEConfigParamDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_CONFIG_PARAM_DAT"; }
0019 
0020   inline void setETSat(float x) { m_etsat = x; }
0021   inline void setTTThreshlow(float x) { m_tthreshlow = x; }
0022   inline void setTTThreshhigh(float x) { m_tthreshhigh = x; }
0023   inline void setFGlowthresh(float x) { m_fglowthresh = x; }
0024   inline void setFGhighthresh(float x) { m_fghighthresh = x; }
0025   inline void setFGlowratio(float x) { m_lowratio = x; }
0026   inline void setFGhighratio(float x) { m_highratio = x; }
0027 
0028   inline float getETSat() const { return m_etsat; }
0029   inline float getTTThreshlow() const { return m_tthreshlow; }
0030   inline float getTTThreshhigh() const { return m_tthreshhigh; }
0031   inline float getFGlowthresh() const { return m_fglowthresh; }
0032   inline float getFGhighthresh() const { return m_fghighthresh; }
0033   inline float getFGlowratio() const { return m_lowratio; }
0034   inline float getFGhighratio() const { return m_highratio; }
0035 
0036 private:
0037   void prepareWrite() noexcept(false) override;
0038 
0039   void writeDB(const EcalLogicID* ecid, const FEConfigParamDat* item, FEConfigLinInfo* iconf) noexcept(false);
0040 
0041   void writeArrayDB(const std::map<EcalLogicID, FEConfigParamDat>* data, FEConfigLinInfo* iconf) noexcept(false);
0042 
0043   void fetchData(std::map<EcalLogicID, FEConfigParamDat>* fillMap, FEConfigLinInfo* iconf) noexcept(false);
0044 
0045   // User data
0046   float m_etsat;
0047   float m_tthreshlow;
0048   float m_tthreshhigh;
0049   float m_fglowthresh;
0050   float m_fghighthresh;
0051   float m_lowratio;
0052   float m_highratio;
0053 };
0054 
0055 #endif