Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONPEDESTALSDAT_H
0002 #define MONPEDESTALSDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class MonPedestalsDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   MonPedestalsDat();
0015   ~MonPedestalsDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "MON_PEDESTALS_DAT"; }
0019 
0020   inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; }
0021   inline float getPedMeanG1() const { return m_pedMeanG1; }
0022 
0023   inline void setPedMeanG6(float mean) { m_pedMeanG6 = mean; }
0024   inline float getPedMeanG6() const { return m_pedMeanG6; }
0025 
0026   inline void setPedMeanG12(float mean) { m_pedMeanG12 = mean; }
0027   inline float getPedMeanG12() const { return m_pedMeanG12; }
0028 
0029   inline void setPedRMSG1(float rms) { m_pedRMSG1 = rms; }
0030   inline float getPedRMSG1() const { return m_pedRMSG1; }
0031 
0032   inline void setPedRMSG6(float rms) { m_pedRMSG6 = rms; }
0033   inline float getPedRMSG6() const { return m_pedRMSG6; }
0034 
0035   inline void setPedRMSG12(float rms) { m_pedRMSG12 = rms; }
0036   inline float getPedRMSG12() const { return m_pedRMSG12; }
0037 
0038   inline void setTaskStatus(bool status) { m_taskStatus = status; }
0039   inline bool getTaskStatus() const { return m_taskStatus; }
0040 
0041 private:
0042   void prepareWrite() noexcept(false) override;
0043 
0044   void writeDB(const EcalLogicID* ecid, const MonPedestalsDat* item, MonRunIOV* iov) noexcept(false);
0045 
0046   void writeArrayDB(const std::map<EcalLogicID, MonPedestalsDat>* data, MonRunIOV* iov) noexcept(false);
0047 
0048   void fetchData(std::map<EcalLogicID, MonPedestalsDat>* fillMap, MonRunIOV* iov) noexcept(false);
0049 
0050   // User data
0051   float m_pedMeanG1;
0052   float m_pedMeanG6;
0053   float m_pedMeanG12;
0054   float m_pedRMSG1;
0055   float m_pedRMSG6;
0056   float m_pedRMSG12;
0057   bool m_taskStatus;
0058 };
0059 
0060 #endif