Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONTESTPULSEDAT_H
0002 #define MONTESTPULSEDAT_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 MonTestPulseDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonTestPulseDat();
0016   ~MonTestPulseDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_TEST_PULSE_DAT"; }
0020 
0021   inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; }
0022   inline float getADCMeanG1() const { return m_adcMeanG1; }
0023 
0024   inline void setADCRMSG1(float rms) { m_adcRMSG1 = rms; }
0025   inline float getADCRMSG1() const { return m_adcRMSG1; }
0026 
0027   inline void setADCMeanG6(float mean) { m_adcMeanG6 = mean; }
0028   inline float getADCMeanG6() const { return m_adcMeanG6; }
0029 
0030   inline void setADCRMSG6(float rms) { m_adcRMSG6 = rms; }
0031   inline float getADCRMSG6() const { return m_adcRMSG6; }
0032 
0033   inline void setADCMeanG12(float mean) { m_adcMeanG12 = mean; }
0034   inline float getADCMeanG12() const { return m_adcMeanG12; }
0035 
0036   inline void setADCRMSG12(float rms) { m_adcRMSG12 = rms; }
0037   inline float getADCRMSG12() const { return m_adcRMSG12; }
0038 
0039   inline void setTaskStatus(bool status) { m_taskStatus = status; }
0040   inline bool getTaskStatus() const { return m_taskStatus; }
0041 
0042 private:
0043   void prepareWrite() noexcept(false) override;
0044 
0045   void writeDB(const EcalLogicID* ecid, const MonTestPulseDat* item, MonRunIOV* iov) noexcept(false);
0046 
0047   void writeArrayDB(const std::map<EcalLogicID, MonTestPulseDat>* data, MonRunIOV* iov) noexcept(false);
0048 
0049   void fetchData(std::map<EcalLogicID, MonTestPulseDat>* fillMap, MonRunIOV* iov) noexcept(false);
0050 
0051   // User data
0052   float m_adcMeanG1;
0053   float m_adcRMSG1;
0054   float m_adcMeanG6;
0055   float m_adcRMSG6;
0056   float m_adcMeanG12;
0057   float m_adcRMSG12;
0058   bool m_taskStatus;
0059 };
0060 
0061 #endif