CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
MeasurementTrackerSiStripRefGetterProducer Class Reference

#include <MeasurementTrackerSiStripRefGetterProducer.h>

Inheritance diagram for MeasurementTrackerSiStripRefGetterProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Types

typedef edm::LazyGetter
< SiStripCluster
LazyGetter
 
typedef edm::RefGetter
< SiStripCluster
RefGetter
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

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 ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

18  :
19  inputModuleLabel_(conf.getParameter<edm::InputTag>("InputModuleLabel")),
20  cabling_(),
21  measurementTrackerName_(conf.getParameter<string>("measurementTrackerName"))
22 {
23  produces< RefGetter >();
24 }
T getParameter(std::string const &) const
edm::InputTag inputModuleLabel_
Input module label of SiStripLazyGetter.
edm::ESHandle< SiStripRegionCabling > cabling_
Cabling.
std::string measurementTrackerName_
name of the defined Measurement Tracker On Demand
MeasurementTrackerSiStripRefGetterProducer::~MeasurementTrackerSiStripRefGetterProducer ( )

Definition at line 27 of file MeasurementTrackerSiStripRefGetterProducer.cc.

27 {}

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

30  {
31  //get cabling
32  setup.get<SiStripRegionCablingRcd>().get(cabling_);
33 }
edm::ESHandle< SiStripRegionCabling > cabling_
Cabling.
const T & get() const
Definition: EventSetup.h:55
void MeasurementTrackerSiStripRefGetterProducer::endRun ( edm::Run ,
const edm::EventSetup  
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 36 of file MeasurementTrackerSiStripRefGetterProducer.cc.

36 {;}
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< class >::product().

41  {
42 
43  // Retrieve unpacking tool from event
44  edm::Handle< LazyGetter > lazygetter;
45  event.getByLabel(inputModuleLabel_,lazygetter);
46 
47  // Construct default RefGetter object
48  std::auto_ptr<RefGetter> refgetter(new RefGetter());
49 
50  //retreive the measurement tracker.
53 
54  //cast it to the proper type
55  const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
56 
57  if (!tOD){
58  edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
59  }
60  else{
61  //define the regions for each individual module
62  tOD->define(lazygetter, refgetter);
63  }
64 
65  // Add to event
66  event.put(refgetter);
67 }
edm::InputTag inputModuleLabel_
Input module label of SiStripLazyGetter.
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
std::string measurementTrackerName_
name of the defined Measurement Tracker On Demand
void define(const edm::Handle< edm::LazyGetter< SiStripCluster > > &, std::auto_ptr< RefGetter > &) const
OnDemandMeasurementTracker specific function to be called to define the region in the RefGetter accor...

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