CMS 3D CMS Logo

MeasurementTrackerSiStripRefGetterProducer Class Reference

module to allow for unpack on demand retrieves a SiStripLazyGetter from the event retrieves a MeasurementTrackerOD from the event produces a SiStripRefGetter, defined by MeasurementTrackerOD::define(. More...

#include <RecoTracker/MeasurementDet/plugins/MeasurementTrackerSiStripRefGetterProducer.h>

Inheritance diagram for MeasurementTrackerSiStripRefGetterProducer:

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

List of all members.

Public Types

typedef edm::LazyGetter
< SiStripCluster
LazyGetter
typedef edm::RefGetter
< SiStripCluster
RefGetter

Public Member Functions

virtual void beginRun (edm::Run &, const edm::EventSetup &)
virtual void endRun (edm::Run &, const edm::EventSetup &)
 MeasurementTrackerSiStripRefGetterProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~MeasurementTrackerSiStripRefGetterProducer ()

Private Attributes

edm::ESHandle
< SiStripRegionCabling
cabling_
 Cabling.
edm::InputTag inputModuleLabel_
 Input module label of SiStripLazyGetter.
std::string measurementTrackerName_
 name of the defined Measurement Tracker On Demand


Detailed Description

module to allow for unpack on demand retrieves a SiStripLazyGetter from the event retrieves a MeasurementTrackerOD from the event produces a SiStripRefGetter, defined by MeasurementTrackerOD::define(.

..)

Dates
2007/09/21 13:28
Revision
1.3

Author:
Jean-Roch Vlimant UCSB

Definition at line 34 of file MeasurementTrackerSiStripRefGetterProducer.h.


Member Typedef Documentation

typedef edm::LazyGetter<SiStripCluster> MeasurementTrackerSiStripRefGetterProducer::LazyGetter

Definition at line 38 of file MeasurementTrackerSiStripRefGetterProducer.h.

typedef edm::RefGetter<SiStripCluster> MeasurementTrackerSiStripRefGetterProducer::RefGetter

Definition at line 39 of file MeasurementTrackerSiStripRefGetterProducer.h.


Constructor & Destructor Documentation

MeasurementTrackerSiStripRefGetterProducer::MeasurementTrackerSiStripRefGetterProducer ( const edm::ParameterSet conf  ) 

Definition at line 18 of file MeasurementTrackerSiStripRefGetterProducer.cc.

00018                                                                                                                     :
00019   inputModuleLabel_(conf.getParameter<edm::InputTag>("InputModuleLabel")),
00020   cabling_(),
00021   measurementTrackerName_(conf.getParameter<string>("measurementTrackerName"))
00022 {
00023   produces< RefGetter >();
00024 }

MeasurementTrackerSiStripRefGetterProducer::~MeasurementTrackerSiStripRefGetterProducer (  ) 

Definition at line 27 of file MeasurementTrackerSiStripRefGetterProducer.cc.

00027 {}


Member Function Documentation

void MeasurementTrackerSiStripRefGetterProducer::beginRun ( edm::Run ,
const edm::EventSetup setup 
) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 30 of file MeasurementTrackerSiStripRefGetterProducer.cc.

References cabling_, and edm::EventSetup::get().

00030                                                                                                {
00031  //get cabling
00032   setup.get<SiStripRegionCablingRcd>().get(cabling_);
00033 }

void MeasurementTrackerSiStripRefGetterProducer::endRun ( edm::Run ,
const edm::EventSetup  
) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 36 of file MeasurementTrackerSiStripRefGetterProducer.cc.

00036 {;}

void MeasurementTrackerSiStripRefGetterProducer::produce ( edm::Event event,
const edm::EventSetup setup 
) [virtual]

Implements edm::EDProducer.

Definition at line 40 of file MeasurementTrackerSiStripRefGetterProducer.cc.

References OnDemandMeasurementTracker::define(), edm::EventSetup::get(), inputModuleLabel_, measurementTrackerName_, and edm::ESHandle< T >::product().

00041                                                                          {
00042 
00043   // Retrieve unpacking tool from event
00044   edm::Handle< LazyGetter > lazygetter;
00045   event.getByLabel(inputModuleLabel_,lazygetter);
00046   
00047   // Construct default RefGetter object
00048   std::auto_ptr<RefGetter> refgetter(new RefGetter());
00049 
00050   //retreive the measurement tracker.
00051   edm::ESHandle<MeasurementTracker> mtESH;
00052   setup.get<CkfComponentsRecord>().get(measurementTrackerName_,mtESH);
00053   
00054   //cast it to the proper type
00055   const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
00056   
00057   if (!tOD){
00058     edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
00059   }
00060   else{
00061     //define the regions for each individual module
00062     tOD->define(lazygetter, refgetter);
00063   }
00064 
00065   // Add to event
00066   event.put(refgetter);
00067 }


Member Data Documentation

edm::ESHandle<SiStripRegionCabling> MeasurementTrackerSiStripRefGetterProducer::cabling_ [private]

Cabling.

Definition at line 54 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by beginRun().

edm::InputTag MeasurementTrackerSiStripRefGetterProducer::inputModuleLabel_ [private]

Input module label of SiStripLazyGetter.

Definition at line 51 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().

std::string MeasurementTrackerSiStripRefGetterProducer::measurementTrackerName_ [private]

name of the defined Measurement Tracker On Demand

Definition at line 57 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().


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