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::EDConsumerBase 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 &, const edm::EventSetup &) override
 
 MeasurementTrackerSiStripRefGetterProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 ~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 &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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.4
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 &  ,
const edm::EventSetup setup 
)
overridevirtual

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::produce ( edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 37 of file MeasurementTrackerSiStripRefGetterProducer.cc.

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

38  {
39 
40  // Retrieve unpacking tool from event
41  edm::Handle< LazyGetter > lazygetter;
42  event.getByLabel(inputModuleLabel_,lazygetter);
43 
44  // Construct default RefGetter object
45  std::auto_ptr<RefGetter> refgetter(new RefGetter());
46 
47  //retreive the measurement tracker.
50 
51  //cast it to the proper type
52  const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
53 
54  if (!tOD){
55  edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
56  }
57  else{
58  //define the regions for each individual module
59  tOD->define(lazygetter, refgetter);
60  }
61 
62  // Add to event
63  event.put(refgetter);
64 }
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 53 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by beginRun().

edm::InputTag MeasurementTrackerSiStripRefGetterProducer::inputModuleLabel_
private

Input module label of SiStripLazyGetter.

Definition at line 50 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().

std::string MeasurementTrackerSiStripRefGetterProducer::measurementTrackerName_
private

name of the defined Measurement Tracker On Demand

Definition at line 56 of file MeasurementTrackerSiStripRefGetterProducer.h.

Referenced by produce().