#include <EventFilter/EcalRawToDigi/src/EcalRawToRecHitFacility.cc>
Public Types | |
typedef edm::LazyGetter < EcalRecHit > | EcalRecHitLazyGetter |
typedef edm::RefGetter < EcalRecHit > | EcalRecHitRefGetter |
Public Member Functions | |
EcalRawToRecHitFacility (const edm::ParameterSet &) | |
~EcalRawToRecHitFacility () | |
Private Member Functions | |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
bool | global_ |
edm::InputTag | sourceTag_ |
std::string | workerName_ |
Implementation: <Notes on="" implementation>="">
Definition at line 49 of file EcalRawToRecHitFacility.h.
Definition at line 54 of file EcalRawToRecHitFacility.h.
Definition at line 55 of file EcalRawToRecHitFacility.h.
EcalRawToRecHitFacility::EcalRawToRecHitFacility | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 3 of file EcalRawToRecHitFacility.cc.
References edm::ParameterSet::getParameter(), LogDebug, sourceTag_, and workerName_.
00004 { 00005 sourceTag_=iConfig.getParameter<edm::InputTag>("sourceTag"); 00006 workerName_=iConfig.getParameter<std::string>("workerName"); 00007 00008 //the lazy getter 00009 produces<EcalRecHitLazyGetter>(); 00010 00011 LogDebug("EcalRawToRecHit|Facility")<<"{ctor} ready to read raw data from: "<<sourceTag_ 00012 <<"\n using unpacker worker: "<<workerName_ 00013 <<"\n producing a lazy getter."; 00014 }
EcalRawToRecHitFacility::~EcalRawToRecHitFacility | ( | ) |
void EcalRawToRecHitFacility::beginJob | ( | const edm::EventSetup & | ) | [private, virtual] |
void EcalRawToRecHitFacility::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 27 of file EcalRawToRecHitFacility.cc.
References collection, edm::EventSetup::get(), edm::Event::getByLabel(), MyWatcher::lap(), LogDebug, EcalRegionCabling::maxElementIndex(), edm::Event::put(), sourceTag_, parseConfig::worker, and workerName_.
00028 { 00029 MyWatcher watcher("Facility"); 00030 LogDebug("EcalRawToRecHit|Facility")<<watcher.lap(); 00031 00032 // get raw data 00033 edm::Handle<FEDRawDataCollection> buffers; 00034 iEvent.getByLabel(sourceTag_, buffers); 00035 LogDebug("EcalRawToRecHit|Facility")<<"raw data from: "<<sourceTag_<<" retrieved." 00036 << watcher.lap(); 00037 00038 // retreive cabling 00039 edm::ESHandle<EcalRegionCabling> cabling; 00040 iSetup.get<EcalRegionCablingRecord>().get(cabling); 00041 LogDebug("EcalRawToRecHit|Facility")<<"cabling retrieved." 00042 << watcher.lap(); 00043 00044 //retreive worker 00045 edm::ESHandle<EcalUnpackerWorker> worker; 00046 iSetup.get<EcalUnpackerWorkerRecord>().get(workerName_, worker); 00047 LogDebug("EcalRawToRecHit|Facility")<<"worker retrieved." 00048 << watcher.lap(); 00049 00050 //need to set the event because the worker will be accessing data from the event 00051 worker->update(iEvent); 00052 LogDebug("EcalRawToRecHit|Facility")<<"worker updated." 00053 << watcher.lap(); 00054 00055 //construct a lazy unpacker 00056 boost::shared_ptr<EcalRawToRecHitLazyUnpacker> unpacker(new EcalRawToRecHitLazyUnpacker(*cabling, *worker, *buffers)); 00057 LogDebug("EcalRawToRecHit|Facility")<<"lazy unpacker created." 00058 << watcher.lap(); 00059 00060 //store the lazy getter 00061 std::auto_ptr<EcalRecHitLazyGetter> collection(new EcalRecHitLazyGetter(EcalRegionCabling::maxElementIndex(),unpacker)); 00062 LogDebug("EcalRawToRecHit|Facility")<<"lazy getter created." 00063 << watcher.lap(); 00064 00065 edm::OrphanHandle<EcalRecHitLazyGetter> lgetter = iEvent.put(collection); 00066 LogDebug("EcalRawToRecHit|Facility")<<"lazy getter put in the event." 00067 << watcher.lap(); 00068 }
bool EcalRawToRecHitFacility::global_ [private] |
Definition at line 69 of file EcalRawToRecHitFacility.h.
Definition at line 63 of file EcalRawToRecHitFacility.h.
Referenced by EcalRawToRecHitFacility(), and produce().
std::string EcalRawToRecHitFacility::workerName_ [private] |
Definition at line 66 of file EcalRawToRecHitFacility.h.
Referenced by EcalRawToRecHitFacility(), and produce().