CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

MeasurementTrackerSiStripRefGetterProducer Class Reference

#include <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

Definition at line 38 of file MeasurementTrackerSiStripRefGetterProducer.h.

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.

                                                                                                                    :
  inputModuleLabel_(conf.getParameter<edm::InputTag>("InputModuleLabel")),
  cabling_(),
  measurementTrackerName_(conf.getParameter<string>("measurementTrackerName"))
{
  produces< RefGetter >();
}
MeasurementTrackerSiStripRefGetterProducer::~MeasurementTrackerSiStripRefGetterProducer ( )

Definition at line 27 of file MeasurementTrackerSiStripRefGetterProducer.cc.

{}

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

                                                                                               {
 //get cabling
  setup.get<SiStripRegionCablingRcd>().get(cabling_);
}
void MeasurementTrackerSiStripRefGetterProducer::endRun ( edm::Run ,
const edm::EventSetup  
) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 36 of file MeasurementTrackerSiStripRefGetterProducer.cc.

{;}
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().

                                                                         {

  // Retrieve unpacking tool from event
  edm::Handle< LazyGetter > lazygetter;
  event.getByLabel(inputModuleLabel_,lazygetter);
  
  // Construct default RefGetter object
  std::auto_ptr<RefGetter> refgetter(new RefGetter());

  //retreive the measurement tracker.
  edm::ESHandle<MeasurementTracker> mtESH;
  setup.get<CkfComponentsRecord>().get(measurementTrackerName_,mtESH);
  
  //cast it to the proper type
  const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
  
  if (!tOD){
    edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
  }
  else{
    //define the regions for each individual module
    tOD->define(lazygetter, refgetter);
  }

  // Add to event
  event.put(refgetter);
}

Member Data Documentation

Cabling.

Definition at line 54 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by beginRun().

Input module label of SiStripLazyGetter.

Definition at line 51 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().

name of the defined Measurement Tracker On Demand

Definition at line 57 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().