CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/OnlineDB/EcalCondDB/interface/MonPNRedDat.h

Go to the documentation of this file.
00001 #ifndef MONPNREDDAT_H
00002 #define MONPNREDDAT_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
00008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h"
00009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
00011 
00012 class MonPNRedDat : public IDataItem {
00013  public:
00014   friend class EcalCondDBInterface;
00015   MonPNRedDat();
00016   ~MonPNRedDat();
00017 
00018   // User data methods
00019   inline std::string getTable() { return "MON_PN_RED_DAT"; }
00020 
00021   inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; }
00022   inline float getADCMeanG1() const { return m_adcMeanG1; }
00023 
00024   inline void setADCRMSG1(float mean) { m_adcRMSG1 = mean; }
00025   inline float getADCRMSG1() const { return m_adcRMSG1; }
00026 
00027   inline void setADCMeanG16(float mean) { m_adcMeanG16 = mean; }
00028   inline float getADCMeanG16() const { return m_adcMeanG16; }
00029 
00030   inline void setADCRMSG16(float mean) { m_adcRMSG16 = mean; }
00031   inline float getADCRMSG16() const { return m_adcRMSG16; }
00032 
00033   inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; }
00034   inline float getPedMeanG1() const { return m_pedMeanG1; }
00035 
00036   inline void setPedRMSG1(float mean) { m_pedRMSG1 = mean; }
00037   inline float getPedRMSG1() const { return m_pedRMSG1; }
00038 
00039   inline void setPedMeanG16(float mean) { m_pedMeanG16 = mean; }
00040   inline float getPedMeanG16() const { return m_pedMeanG16; }
00041 
00042   inline void setPedRMSG16(float mean) { m_pedRMSG16 = mean; }
00043   inline float getPedRMSG16() const { return m_pedRMSG16; }
00044 
00045   inline void setTaskStatus(bool status) { m_taskStatus = status; }
00046   inline bool getTaskStatus() const { return m_taskStatus; }
00047   
00048  private:
00049   void prepareWrite() 
00050     throw(std::runtime_error);
00051 
00052   void writeDB(const EcalLogicID* ecid, const MonPNRedDat* item, MonRunIOV* iov)
00053     throw(std::runtime_error);
00054 
00055   void writeArrayDB(const std::map< EcalLogicID, MonPNRedDat >* data, MonRunIOV* iov)
00056     throw(std::runtime_error);
00057 
00058   void fetchData(std::map< EcalLogicID, MonPNRedDat >* fillVec, MonRunIOV* iov)
00059      throw(std::runtime_error);
00060 
00061   // User data
00062   float m_adcMeanG1;
00063   float m_adcRMSG1;
00064   float m_adcMeanG16;
00065   float m_adcRMSG16;
00066   float m_pedMeanG1;
00067   float m_pedRMSG1;
00068   float m_pedMeanG16;
00069   float m_pedRMSG16;
00070   bool m_taskStatus;
00071 };
00072 
00073 #endif