00001 #ifndef MONLASERPULSEDAT_H 00002 #define MONLASERPULSEDAT_H 00003 00004 #include <vector> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h" 00009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00010 00011 class MonLaserPulseDat : public IDataItem { 00012 public: 00013 friend class EcalCondDBInterface; 00014 MonLaserPulseDat(); 00015 ~MonLaserPulseDat(); 00016 00017 // User data methods 00018 inline std::string getTable() { return "MON_LASER_PULSE_DAT"; } 00019 00020 inline void setPulseHeightMean(float p) { m_pulseHeightMean = p; } 00021 inline float getPulseHeightMean() const { return m_pulseHeightMean; } 00022 00023 inline void setPulseHeightRMS(float p) { m_pulseHeightRMS = p; } 00024 inline float getPulseHeightRMS() const { return m_pulseHeightRMS; } 00025 00026 inline void setPulseWidthMean(float p) { m_pulseWidthMean = p; } 00027 inline float getPulseWidthMean() const { return m_pulseWidthMean; } 00028 00029 inline void setPulseWidthRMS(float p) { m_pulseWidthRMS = p; } 00030 inline float getPulseWidthRMS() const { return m_pulseWidthRMS; } 00031 00032 private: 00033 void prepareWrite() 00034 throw(std::runtime_error); 00035 00036 void writeDB(const EcalLogicID* ecid, const MonLaserPulseDat* item, MonRunIOV* iov ) 00037 throw(std::runtime_error); 00038 00039 void writeArrayDB(const std::map< EcalLogicID, MonLaserPulseDat >* data, MonRunIOV* iov) 00040 throw(std::runtime_error); 00041 00042 void fetchData(std::map< EcalLogicID, MonLaserPulseDat >* fillMap, MonRunIOV* iov) 00043 throw(std::runtime_error); 00044 00045 // User data 00046 float m_pulseHeightMean; 00047 float m_pulseHeightRMS; 00048 float m_pulseWidthMean; 00049 float m_pulseWidthRMS; 00050 }; 00051 00052 #endif