CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
MaskedMeasurementTrackerEventProducer Class Reference
Inheritance diagram for MaskedMeasurementTrackerEventProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MaskedMeasurementTrackerEventProducer (const edm::ParameterSet &iConfig)
 
 ~MaskedMeasurementTrackerEventProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef edm::ContainerMask
< edmNew::DetSetVector
< SiPixelCluster > > 
PixelMask
 
typedef edm::ContainerMask
< edm::LazyGetter
< SiStripCluster > > 
StripLazyMask
 
typedef edm::ContainerMask
< edmNew::DetSetVector
< SiStripCluster > > 
StripMask
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

edm::EDGetTokenT< PixelMaskmaskPixels_
 
edm::EDGetTokenT< StripMaskmaskStrips_
 
edm::EDGetTokenT< StripLazyMaskmaskStripsLazy_
 
bool onDemand_
 
edm::EDGetTokenT
< MeasurementTrackerEvent
src_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::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

Definition at line 8 of file MaskedMeasurementTrackerEventProducer.cc.

Member Typedef Documentation

Definition at line 16 of file MaskedMeasurementTrackerEventProducer.cc.

Definition at line 17 of file MaskedMeasurementTrackerEventProducer.cc.

Definition at line 15 of file MaskedMeasurementTrackerEventProducer.cc.

Constructor & Destructor Documentation

MaskedMeasurementTrackerEventProducer::MaskedMeasurementTrackerEventProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 28 of file MaskedMeasurementTrackerEventProducer.cc.

References edm::ParameterSet::getParameter(), maskPixels_, maskStrips_, maskStripsLazy_, and onDemand_.

28  :
29  src_(consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("src"))),
30  onDemand_(iConfig.getParameter<bool>("OnDemand"))
31 {
32  edm::InputTag clustersToSkip = iConfig.getParameter<edm::InputTag>("clustersToSkip");
33  if (onDemand_) {
34  maskStripsLazy_ = consumes<StripLazyMask>(clustersToSkip);
35  } else {
36  maskStrips_ = consumes<StripMask>(clustersToSkip);
37  }
38  maskPixels_ = consumes<PixelMask>(clustersToSkip);
39 
40  produces<MeasurementTrackerEvent>();
41 }
T getParameter(std::string const &) const
edm::EDGetTokenT< MeasurementTrackerEvent > src_
MaskedMeasurementTrackerEventProducer::~MaskedMeasurementTrackerEventProducer ( )
inline

Definition at line 11 of file MaskedMeasurementTrackerEventProducer.cc.

11 {}

Member Function Documentation

void MaskedMeasurementTrackerEventProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 44 of file MaskedMeasurementTrackerEventProducer.cc.

References edm::Event::getByToken(), maskPixels_, maskStrips_, maskStripsLazy_, IterativeTracking_cff::MeasurementTrackerEvent, onDemand_, dbtoconf::out, edm::Event::put(), and src_.

45 {
47  iEvent.getByToken(src_, mte);
48 
49  // prepare output
50  std::auto_ptr<MeasurementTrackerEvent> out;
51 
52  edm::Handle<PixelMask> maskPixels;
53  iEvent.getByToken(maskPixels_, maskPixels);
54 
55  if (onDemand_) {
56  edm::Handle<StripLazyMask> maskStripsLazy;
57  iEvent.getByToken(maskStripsLazy_, maskStripsLazy);
58  out.reset(new MeasurementTrackerEvent(*mte, *maskStripsLazy, *maskPixels));
59  } else {
60  edm::Handle<StripMask> maskStrips;
61  iEvent.getByToken(maskStrips_, maskStrips);
62  out.reset(new MeasurementTrackerEvent(*mte, *maskStrips, *maskPixels));
63  }
64 
65  // put into event
66  iEvent.put(out);
67 }
edm::EDGetTokenT< MeasurementTrackerEvent > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
tuple out
Definition: dbtoconf.py:99

Member Data Documentation

edm::EDGetTokenT<PixelMask> MaskedMeasurementTrackerEventProducer::maskPixels_
private
edm::EDGetTokenT<StripMask> MaskedMeasurementTrackerEventProducer::maskStrips_
private
edm::EDGetTokenT<StripLazyMask> MaskedMeasurementTrackerEventProducer::maskStripsLazy_
private
bool MaskedMeasurementTrackerEventProducer::onDemand_
private
edm::EDGetTokenT<MeasurementTrackerEvent> MaskedMeasurementTrackerEventProducer::src_
private

Definition at line 19 of file MaskedMeasurementTrackerEventProducer.cc.

Referenced by produce().