Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:57:18

0001 #ifndef MONLED1DAT_H
0002 #define MONLED1DAT_H
0003 
0004 #include <vector>
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 MonLed1Dat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonLed1Dat();
0016   ~MonLed1Dat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_LED1_DAT"; }
0020 
0021   inline void setVPTMean(float mean) { m_vptMean = mean; }
0022   inline float getVPTMean() const { return m_vptMean; }
0023 
0024   inline void setVPTRMS(float rms) { m_vptRMS = rms; }
0025   inline float getVPTRMS() const { return m_vptRMS; }
0026 
0027   inline void setVPTOverPNMean(float mean) { m_vptOverPNMean = mean; }
0028   inline float getVPTOverPNMean() const { return m_vptOverPNMean; }
0029 
0030   inline void setVPTOverPNRMS(float rms) { m_vptOverPNRMS = rms; }
0031   inline float getVPTOverPNRMS() const { return m_vptOverPNRMS; }
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 MonLed1Dat* item, MonRunIOV* iov) noexcept(false);
0040 
0041   void writeArrayDB(const std::map<EcalLogicID, MonLed1Dat>* data, MonRunIOV* iov) noexcept(false);
0042 
0043   void fetchData(std::map<EcalLogicID, MonLed1Dat>* fillMap, MonRunIOV* iov) noexcept(false);
0044 
0045   // User data
0046   float m_vptMean;
0047   float m_vptRMS;
0048   float m_vptOverPNMean;
0049   float m_vptOverPNRMS;
0050   bool m_taskStatus;
0051 };
0052 
0053 #endif