#include <CalibCalorimetry/EcalLaserCorrection/plugins/EcalLaserCorrectionService.h>
Public Member Functions | |
void | alphaCallback (const EcalLaserAlphasRcd &fRecord) |
void | apdpnCallback (const EcalLaserAPDPNRatiosRcd &fRecord) |
void | apdpnRefCallback (const EcalLaserAPDPNRatiosRefRcd &fRecord) |
EcalLaserCorrectionService (const edm::ParameterSet &) | |
boost::shared_ptr < EcalLaserDbService > | produce (const EcalLaserDbRecord &) |
~EcalLaserCorrectionService () | |
Private Attributes | |
boost::shared_ptr < EcalLaserDbService > | mService_ |
Definition at line 21 of file EcalLaserCorrectionService.h.
EcalLaserCorrectionService::EcalLaserCorrectionService | ( | const edm::ParameterSet & | fConfig | ) |
Definition at line 21 of file EcalLaserCorrectionService.cc.
References alphaCallback(), apdpnCallback(), apdpnRefCallback(), edm::eventsetup::dependsOn(), and edm::ESProducer::setWhatProduced().
00022 : ESProducer(), 00023 mService_ ( new EcalLaserDbService ()) 00024 // mDumpRequest (), 00025 // mDumpStream(0) 00026 { 00027 //the following line is needed to tell the framework what 00028 // data is being produced 00029 // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionService::apdpnCallback))); 00030 00031 setWhatProduced (this, (dependsOn (&EcalLaserCorrectionService::alphaCallback) & 00032 (&EcalLaserCorrectionService::apdpnRefCallback) & 00033 (&EcalLaserCorrectionService::apdpnCallback) ) 00034 ); 00035 00036 //now do what ever other initialization is needed 00037 00038 // mDumpRequest = fConfig.getUntrackedParameter <std::vector <std::string> > ("dump", std::vector<std::string>()); 00039 // if (!mDumpRequest.empty()) { 00040 // std::string otputFile = fConfig.getUntrackedParameter <std::string> ("file", ""); 00041 // mDumpStream = otputFile.empty () ? &std::cout : new std::ofstream (otputFile.c_str()); 00042 // } 00043 }
EcalLaserCorrectionService::~EcalLaserCorrectionService | ( | ) |
Definition at line 46 of file EcalLaserCorrectionService.cc.
00047 { 00048 00049 // do anything here that needs to be done at desctruction time 00050 // (e.g. close files, deallocate resources etc.) 00051 // if (mDumpStream != &std::cout) delete mDumpStream; 00052 }
void EcalLaserCorrectionService::alphaCallback | ( | const EcalLaserAlphasRcd & | fRecord | ) |
Definition at line 65 of file EcalLaserCorrectionService.cc.
References edm::eventsetup::EventSetupRecordImplementation< T >::get(), mService_, and edm::ESHandle< T >::product().
Referenced by EcalLaserCorrectionService().
00065 { 00066 edm::ESHandle <EcalLaserAlphas> item; 00067 fRecord.get (item); 00068 mService_->setAlphaData (item.product ()); 00069 }
void EcalLaserCorrectionService::apdpnCallback | ( | const EcalLaserAPDPNRatiosRcd & | fRecord | ) |
Definition at line 77 of file EcalLaserCorrectionService.cc.
References edm::eventsetup::EventSetupRecordImplementation< T >::get(), mService_, and edm::ESHandle< T >::product().
Referenced by EcalLaserCorrectionService().
00077 { 00078 edm::ESHandle <EcalLaserAPDPNRatios> item; 00079 fRecord.get (item); 00080 mService_->setAPDPNData (item.product ()); 00081 }
void EcalLaserCorrectionService::apdpnRefCallback | ( | const EcalLaserAPDPNRatiosRefRcd & | fRecord | ) |
Definition at line 71 of file EcalLaserCorrectionService.cc.
References edm::eventsetup::EventSetupRecordImplementation< T >::get(), mService_, and edm::ESHandle< T >::product().
Referenced by EcalLaserCorrectionService().
00071 { 00072 edm::ESHandle <EcalLaserAPDPNRatiosRef> item; 00073 fRecord.get (item); 00074 mService_->setAPDPNRefData (item.product ()); 00075 }
boost::shared_ptr< EcalLaserDbService > EcalLaserCorrectionService::produce | ( | const EcalLaserDbRecord & | ) |
Definition at line 60 of file EcalLaserCorrectionService.cc.
References mService_.
00061 { 00062 return mService_; 00063 }
boost::shared_ptr<EcalLaserDbService> EcalLaserCorrectionService::mService_ [private] |
Definition at line 35 of file EcalLaserCorrectionService.h.
Referenced by alphaCallback(), apdpnCallback(), apdpnRefCallback(), and produce().