Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FECONFPEDDAT_H
0002 #define FECONFPEDDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0009 #include "OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h"
0010 
0011 class FEConfigPedDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;
0014   FEConfigPedDat();
0015   ~FEConfigPedDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_CONFIG_PED_DAT"; }
0019 
0020   inline void setId(int x) { m_ID = x; }
0021   inline int getId() const { return m_ID; }
0022 
0023   inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; }
0024   inline float getPedMeanG1() const { return m_pedMeanG1; }
0025 
0026   inline void setPedMeanG6(float mean) { m_pedMeanG6 = mean; }
0027   inline float getPedMeanG6() const { return m_pedMeanG6; }
0028 
0029   inline void setPedMeanG12(float mean) { m_pedMeanG12 = mean; }
0030   inline float getPedMeanG12() const { return m_pedMeanG12; }
0031 
0032 private:
0033   void prepareWrite() noexcept(false) override;
0034 
0035   void writeDB(const EcalLogicID* ecid, const FEConfigPedDat* item, FEConfigPedInfo* iconf) noexcept(false);
0036 
0037   void writeArrayDB(const std::map<EcalLogicID, FEConfigPedDat>* data, FEConfigPedInfo* iconf) noexcept(false);
0038 
0039   void fetchData(std::map<EcalLogicID, FEConfigPedDat>* fillMap, FEConfigPedInfo* iconf) noexcept(false);
0040 
0041   // User data
0042   float m_pedMeanG1;
0043   float m_pedMeanG6;
0044   float m_pedMeanG12;
0045   int m_ID;
0046 };
0047 
0048 #endif