00001 #ifndef LMFPNBLUEPRIMDAT_H 00002 #define LMFPNBLUEPRIMDAT_H 00003 00004 #include <map> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/LMFRunTag.h" 00009 #include "OnlineDB/EcalCondDB/interface/LMFRunIOV.h" 00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00011 00012 class LMFPNBluePrimDat : public IDataItem { 00013 public: 00014 friend class EcalCondDBInterface; 00015 LMFPNBluePrimDat(); 00016 ~LMFPNBluePrimDat(); 00017 00018 // User data methods 00019 inline std::string getTable() { return "LMF_Laser_blue_PN_PRIM_DAT"; } 00020 00021 inline void setMean(float mean) { m_Mean = mean; } 00022 inline float getMean() const { return m_Mean; } 00023 00024 inline void setRMS(float RMS) { m_RMS = RMS; } 00025 inline float getRMS() const { return m_RMS; } 00026 00027 inline void setPeak(float x) { m_Peak = x; } 00028 inline float getPeak() const { return m_Peak; } 00029 00030 inline void setFlag(int x) { m_Flag = x; } 00031 inline int getFlag() const { return m_Flag; } 00032 // 00033 inline void setPNAOverPNBMean(float mean) { m_PNAOverPNBMean = mean; } 00034 inline float getPNAOverPNBMean() const { return m_PNAOverPNBMean; } 00035 inline void setPNAOverPNBRMS(float mean) { m_PNAOverPNBRMS = mean; } 00036 inline float getPNAOverPNBRMS() const { return m_PNAOverPNBRMS; } 00037 inline void setPNAOverPNBPeak(float mean) { m_PNAOverPNBPeak = mean; } 00038 inline float getPNAOverPNBPeak() const { return m_PNAOverPNBPeak; } 00039 00040 00041 private: 00042 void prepareWrite() 00043 throw(std::runtime_error); 00044 00045 void writeDB(const EcalLogicID* ecid, const LMFPNBluePrimDat* item, LMFRunIOV* iov) 00046 throw(std::runtime_error); 00047 00048 void writeArrayDB(const std::map< EcalLogicID, LMFPNBluePrimDat >* data, LMFRunIOV* iov) 00049 throw(runtime_error); 00050 00051 void fetchData(std::map< EcalLogicID, LMFPNBluePrimDat >* fillVec, LMFRunIOV* iov) 00052 throw(std::runtime_error); 00053 00054 // User data 00055 int m_Flag; 00056 float m_RMS; 00057 float m_Mean; 00058 float m_Peak; 00059 float m_PNAOverPNBMean; 00060 float m_PNAOverPNBRMS; 00061 float m_PNAOverPNBPeak; 00062 00063 }; 00064 00065 #endif