Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONPNBLUEDAT_H
0002 #define MONPNBLUEDAT_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 MonPNBlueDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonPNBlueDat();
0016   ~MonPNBlueDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_PN_BLUE_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 mean) { m_adcRMSG1 = mean; }
0025   inline float getADCRMSG1() const { return m_adcRMSG1; }
0026 
0027   inline void setADCMeanG16(float mean) { m_adcMeanG16 = mean; }
0028   inline float getADCMeanG16() const { return m_adcMeanG16; }
0029 
0030   inline void setADCRMSG16(float mean) { m_adcRMSG16 = mean; }
0031   inline float getADCRMSG16() const { return m_adcRMSG16; }
0032 
0033   inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; }
0034   inline float getPedMeanG1() const { return m_pedMeanG1; }
0035 
0036   inline void setPedRMSG1(float mean) { m_pedRMSG1 = mean; }
0037   inline float getPedRMSG1() const { return m_pedRMSG1; }
0038 
0039   inline void setPedMeanG16(float mean) { m_pedMeanG16 = mean; }
0040   inline float getPedMeanG16() const { return m_pedMeanG16; }
0041 
0042   inline void setPedRMSG16(float mean) { m_pedRMSG16 = mean; }
0043   inline float getPedRMSG16() const { return m_pedRMSG16; }
0044 
0045   inline void setTaskStatus(bool status) { m_taskStatus = status; }
0046   inline bool getTaskStatus() const { return m_taskStatus; }
0047 
0048 private:
0049   void prepareWrite() noexcept(false) override;
0050 
0051   void writeDB(const EcalLogicID* ecid, const MonPNBlueDat* item, MonRunIOV* iov) noexcept(false);
0052 
0053   void writeArrayDB(const std::map<EcalLogicID, MonPNBlueDat>* data, MonRunIOV* iov) noexcept(false);
0054 
0055   void fetchData(std::map<EcalLogicID, MonPNBlueDat>* fillVec, MonRunIOV* iov) noexcept(false);
0056 
0057   // User data
0058   float m_adcMeanG1;
0059   float m_adcRMSG1;
0060   float m_adcMeanG16;
0061   float m_adcRMSG16;
0062   float m_pedMeanG1;
0063   float m_pedRMSG1;
0064   float m_pedMeanG16;
0065   float m_pedRMSG16;
0066   bool m_taskStatus;
0067 };
0068 
0069 #endif