Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONPNPEDDAT_H
0002 #define MONPNPEDDAT_H
0003 
0004 #include <map>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011 
0012 class MonPNPedDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonPNPedDat();
0016   ~MonPNPedDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_PN_PED_DAT"; }
0020 
0021   inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; }
0022   inline float getPedMeanG1() const { return m_pedMeanG1; }
0023 
0024   inline void setPedRMSG1(float mean) { m_pedRMSG1 = mean; }
0025   inline float getPedRMSG1() const { return m_pedRMSG1; }
0026 
0027   inline void setPedMeanG16(float mean) { m_pedMeanG16 = mean; }
0028   inline float getPedMeanG16() const { return m_pedMeanG16; }
0029 
0030   inline void setPedRMSG16(float mean) { m_pedRMSG16 = mean; }
0031   inline float getPedRMSG16() const { return m_pedRMSG16; }
0032 
0033   inline void setTaskStatus(bool status) { m_taskStatus = status; }
0034   inline bool getTaskStatus() const { return m_taskStatus; }
0035 
0036 private:
0037   void prepareWrite() noexcept(false) override;
0038 
0039   void writeDB(const EcalLogicID* ecid, const MonPNPedDat* item, MonRunIOV* iov) noexcept(false);
0040 
0041   void writeArrayDB(const std::map<EcalLogicID, MonPNPedDat>* data, MonRunIOV* iov) noexcept(false);
0042 
0043   void fetchData(std::map<EcalLogicID, MonPNPedDat>* fillVec, MonRunIOV* iov) noexcept(false);
0044 
0045   // User data
0046   float m_pedMeanG1;
0047   float m_pedRMSG1;
0048   float m_pedMeanG16;
0049   float m_pedRMSG16;
0050   bool m_taskStatus;
0051 };
0052 
0053 #endif