00001 #ifndef LMFPNBLUEDAT_H 00002 #define LMFPNBLUEDAT_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 LMFPNBlueDat : public IDataItem { 00013 public: 00014 friend class EcalCondDBInterface; 00015 LMFPNBlueDat(); 00016 ~LMFPNBlueDat(); 00017 00018 // User data methods 00019 inline std::string getTable() { return "LMF_PN_BLUE_DAT"; } 00020 00021 inline void setPNPeak(float peak) { m_pnPeak = peak; } 00022 inline float getPNPeak() const { return m_pnPeak; } 00023 00024 inline void setPNErr(float err) { m_pnErr = err; } 00025 inline float getPNErr() const { return m_pnErr; } 00026 00027 00028 private: 00029 void prepareWrite() 00030 throw(std::runtime_error); 00031 00032 void writeDB(const EcalLogicID* ecid, const LMFPNBlueDat* item, LMFRunIOV* iov) 00033 throw(std::runtime_error); 00034 00035 void writeArrayDB(const std::map< EcalLogicID, LMFPNBlueDat >* data, LMFRunIOV* iov) 00036 throw(runtime_error); 00037 00038 void fetchData(std::map< EcalLogicID, LMFPNBlueDat >* fillVec, LMFRunIOV* iov) 00039 throw(std::runtime_error); 00040 00041 // User data 00042 float m_pnPeak; 00043 float m_pnErr; 00044 00045 }; 00046 00047 #endif