File indexing completed on 2024-04-06 12:22:55
0001 #ifndef MONLASERSTATUSDAT_H
0002 #define MONLASERSTATUSDAT_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 MonLaserStatusDat : public IDataItem {
0012 public:
0013 friend class EcalCondDBInterface;
0014 MonLaserStatusDat();
0015 ~MonLaserStatusDat() override;
0016
0017
0018 inline std::string getTable() override { return "MON_LASER_STATUS_DAT"; }
0019 inline void setLaserPower(float p) { m_laserPower = p; }
0020 inline float getLaserPower() const { return m_laserPower; }
0021
0022 inline void setLaserFilter(float p) { m_laserFilter = p; }
0023 inline float getLaserFilter() const { return m_laserFilter; }
0024
0025 inline void setLaserWavelength(float p) { m_laserWavelength = p; }
0026 inline float getLaserWavelength() const { return m_laserWavelength; }
0027
0028 inline void setLaserFanout(float p) { m_laserFanout = p; }
0029 inline float getLaserFanout() const { return m_laserFanout; }
0030
0031 private:
0032 void prepareWrite() noexcept(false) override;
0033
0034 void writeDB(const EcalLogicID* ecid, const MonLaserStatusDat* item, MonRunIOV* iov) noexcept(false);
0035
0036 void writeArrayDB(const std::map<EcalLogicID, MonLaserStatusDat>* data, MonRunIOV* iov) noexcept(false);
0037
0038 void fetchData(std::map<EcalLogicID, MonLaserStatusDat>* fillMap, MonRunIOV* iov) noexcept(false);
0039
0040
0041 float m_laserPower;
0042 float m_laserFilter;
0043 float m_laserWavelength;
0044 float m_laserFanout;
0045 };
0046
0047 #endif