00001 // 00002 // Toyoko Orimoto (Caltech), 10 July 2007 00003 // 00004 00005 #ifndef EcalLaserDbService_h 00006 #define EcalLaserDbService_h 00007 00008 #include <memory> 00009 #include <map> 00010 00011 #include "DataFormats/DetId/interface/DetId.h" 00012 #include "DataFormats/EcalDetId/interface/EBDetId.h" 00013 #include "DataFormats/EcalDetId/interface/EEDetId.h" 00014 #include "DataFormats/Provenance/interface/Timestamp.h" 00015 00016 #include "FWCore/Framework/interface/ModuleFactory.h" 00017 #include "FWCore/Framework/interface/ESProducer.h" 00018 00019 #include "CondFormats/EcalObjects/interface/EcalLaserAlphas.h" 00020 #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatiosRef.h" 00021 #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatios.h" 00022 #include "CondFormats/EcalObjects/interface/EcalLinearCorrections.h" 00023 00024 00025 class EcalLaserDbService { 00026 public: 00027 EcalLaserDbService (); 00028 EcalLaserDbService (const edm::ParameterSet&); 00029 00030 const EcalLaserAlphas* getAlphas () const; 00031 const EcalLaserAPDPNRatiosRef* getAPDPNRatiosRef () const; 00032 const EcalLaserAPDPNRatios* getAPDPNRatios () const; 00033 const EcalLinearCorrections* getLinearCorrections () const; 00034 float getLaserCorrection (DetId const & xid, edm::Timestamp const & iTime) const; 00035 00036 void setAlphaData (const EcalLaserAlphas* fItem) {mAlphas_ = fItem;} 00037 void setAPDPNRefData (const EcalLaserAPDPNRatiosRef* fItem) {mAPDPNRatiosRef_ = fItem;} 00038 void setAPDPNData (const EcalLaserAPDPNRatios* fItem) {mAPDPNRatios_ = fItem;} 00039 void setLinearCorrectionsData (const EcalLinearCorrections* fItem) {mLinearCorrections_ = fItem;} 00040 00041 private: 00042 00043 const EcalLaserAlphas* mAlphas_; 00044 const EcalLaserAPDPNRatiosRef* mAPDPNRatiosRef_; 00045 const EcalLaserAPDPNRatios* mAPDPNRatios_; 00046 const EcalLinearCorrections* mLinearCorrections_; 00047 00048 }; 00049 00050 #endif