Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONLASERPULSEDAT_H
0002 #define MONLASERPULSEDAT_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 MonLaserPulseDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;
0014   MonLaserPulseDat();
0015   ~MonLaserPulseDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "MON_LASER_PULSE_DAT"; }
0019 
0020   inline void setPulseHeightMean(float p) { m_pulseHeightMean = p; }
0021   inline float getPulseHeightMean() const { return m_pulseHeightMean; }
0022 
0023   inline void setPulseHeightRMS(float p) { m_pulseHeightRMS = p; }
0024   inline float getPulseHeightRMS() const { return m_pulseHeightRMS; }
0025 
0026   inline void setPulseWidthMean(float p) { m_pulseWidthMean = p; }
0027   inline float getPulseWidthMean() const { return m_pulseWidthMean; }
0028 
0029   inline void setPulseWidthRMS(float p) { m_pulseWidthRMS = p; }
0030   inline float getPulseWidthRMS() const { return m_pulseWidthRMS; }
0031 
0032 private:
0033   void prepareWrite() noexcept(false) override;
0034 
0035   void writeDB(const EcalLogicID* ecid, const MonLaserPulseDat* item, MonRunIOV* iov) noexcept(false);
0036 
0037   void writeArrayDB(const std::map<EcalLogicID, MonLaserPulseDat>* data, MonRunIOV* iov) noexcept(false);
0038 
0039   void fetchData(std::map<EcalLogicID, MonLaserPulseDat>* fillMap, MonRunIOV* iov) noexcept(false);
0040 
0041   // User data
0042   float m_pulseHeightMean;
0043   float m_pulseHeightRMS;
0044   float m_pulseWidthMean;
0045   float m_pulseWidthRMS;
0046 };
0047 
0048 #endif