CMS 3D CMS Logo

EcalRawToRecHitFacility Class Reference

Description: <one line="" class="" summary>="">. More...

#include <EventFilter/EcalRawToDigi/src/EcalRawToRecHitFacility.cc>

Inheritance diagram for EcalRawToRecHitFacility:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_


Detailed Description

Description: <one line="" class="" summary>="">.

Implementation: <Notes on="" implementation>="">

Definition at line 49 of file EcalRawToRecHitFacility.h.


Member Typedef Documentation

typedef edm::LazyGetter<EcalRecHit> EcalRawToRecHitFacility::EcalRecHitLazyGetter

Definition at line 54 of file EcalRawToRecHitFacility.h.

typedef edm::RefGetter<EcalRecHit> EcalRawToRecHitFacility::EcalRecHitRefGetter

Definition at line 55 of file EcalRawToRecHitFacility.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 16 of file EcalRawToRecHitFacility.cc.

00017 {
00018 }


Member Function Documentation

void EcalRawToRecHitFacility::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 72 of file EcalRawToRecHitFacility.cc.

00073 {
00074 }

void EcalRawToRecHitFacility::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 78 of file EcalRawToRecHitFacility.cc.

00078                                 {
00079 }

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 }


Member Data Documentation

bool EcalRawToRecHitFacility::global_ [private]

Definition at line 69 of file EcalRawToRecHitFacility.h.

edm::InputTag EcalRawToRecHitFacility::sourceTag_ [private]

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:48 2009 for CMSSW by  doxygen 1.5.4