File indexing completed on 2024-04-06 12:22:55
0001 #ifndef MONPEDESTALSONLINEDAT_H
0002 #define MONPEDESTALSONLINEDAT_H
0003
0004 #include <map>
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 MonPedestalsOnlineDat : public IDataItem {
0013 public:
0014 friend class EcalCondDBInterface;
0015 MonPedestalsOnlineDat();
0016 ~MonPedestalsOnlineDat() override;
0017
0018
0019 inline std::string getTable() override { return "MON_PEDESTALS_ONLINE_DAT"; }
0020
0021 inline void setADCMeanG12(float mean) { m_adcMeanG12 = mean; }
0022 inline float getADCMeanG12() const { return m_adcMeanG12; }
0023
0024 inline void setADCRMSG12(float rms) { m_adcRMSG12 = rms; }
0025 inline float getADCRMSG12() const { return m_adcRMSG12; }
0026
0027 inline void setTaskStatus(bool status) { m_taskStatus = status; }
0028 inline bool getTaskStatus() const { return m_taskStatus; }
0029
0030 private:
0031 void prepareWrite() noexcept(false) override;
0032
0033 void writeDB(const EcalLogicID* ecid, const MonPedestalsOnlineDat* item, MonRunIOV* iov) noexcept(false);
0034
0035 void writeArrayDB(const std::map<EcalLogicID, MonPedestalsOnlineDat>* data, MonRunIOV* iov) noexcept(false);
0036
0037 void fetchData(std::map<EcalLogicID, MonPedestalsOnlineDat>* fillMap, MonRunIOV* iov) noexcept(false);
0038
0039
0040 float m_adcMeanG12;
0041 float m_adcRMSG12;
0042 bool m_taskStatus;
0043 };
0044
0045 #endif