CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
MaskedMeasurementTrackerEventProducer Class Referencefinal
Inheritance diagram for MaskedMeasurementTrackerEventProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MaskedMeasurementTrackerEventProducer (const edm::ParameterSet &iConfig)
 
 ~MaskedMeasurementTrackerEventProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > Phase2OTMask
 
typedef edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > PixelMask
 
typedef edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > StripMask
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< Phase2OTMaskmaskPhase2OTs_
 
edm::EDGetTokenT< PixelMaskmaskPixels_
 
edm::EDGetTokenT< StripMaskmaskStrips_
 
bool phase2skipClusters_
 
bool skipClusters_
 
edm::EDGetTokenT< MeasurementTrackerEventsrc_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 17 of file MaskedMeasurementTrackerEventProducer.cc.

Definition at line 16 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 30 of file MaskedMeasurementTrackerEventProducer.cc.

References HiRegitMuonDetachedTripletStep_cff::clustersToSkip, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), maskPhase2OTs_, maskPixels_, maskStrips_, ConversionStep_cff::phase2clustersToSkip, phase2skipClusters_, and skipClusters_.

30  :
31  src_(consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("src")))
32 {
33  //FIXME:temporary solution in order to use this class for both phase0/1 and phase2
34  if (iConfig.existsAs<edm::InputTag>("clustersToSkip")) {
35  skipClusters_ = true;
36  edm::InputTag clustersToSkip = iConfig.getParameter<edm::InputTag>("clustersToSkip");
37  maskPixels_ = consumes<PixelMask>(clustersToSkip);
38  maskStrips_ = consumes<StripMask>(clustersToSkip);
39  }
40  if (iConfig.existsAs<edm::InputTag>("phase2clustersToSkip")) {
41  phase2skipClusters_ = true;
42  edm::InputTag phase2clustersToSkip = iConfig.getParameter<edm::InputTag>("phase2clustersToSkip");
43  maskPixels_ = consumes<PixelMask>(phase2clustersToSkip);
44  maskPhase2OTs_ = consumes<Phase2OTMask>(phase2clustersToSkip);
45  }
46  produces<MeasurementTrackerEvent>();
47 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
edm::EDGetTokenT< MeasurementTrackerEvent > src_
MaskedMeasurementTrackerEventProducer::~MaskedMeasurementTrackerEventProducer ( )
inline

Member Function Documentation

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

Definition at line 50 of file MaskedMeasurementTrackerEventProducer.cc.

References DEFINE_FWK_MODULE, edm::Event::getByToken(), maskPhase2OTs_, maskPixels_, maskStrips_, eostools::move(), MillePedeFileConverter_cfg::out, phase2skipClusters_, edm::Event::put(), skipClusters_, and src_.

51 {
53  iEvent.getByToken(src_, mte);
54 
55  // prepare output
56  std::unique_ptr<MeasurementTrackerEvent> out;
57 
58  if (skipClusters_) {
59 
60  edm::Handle<PixelMask> maskPixels;
61  iEvent.getByToken(maskPixels_, maskPixels);
62  edm::Handle<StripMask> maskStrips;
63  iEvent.getByToken(maskStrips_, maskStrips);
64 
65  out = std::make_unique<MeasurementTrackerEvent>(*mte, *maskStrips, *maskPixels);
66 
67  } else if (phase2skipClusters_) {
68 
69  edm::Handle<PixelMask> maskPixels;
70  iEvent.getByToken(maskPixels_, maskPixels);
71  edm::Handle<Phase2OTMask> maskPhase2OTs;
72  iEvent.getByToken(maskPhase2OTs_, maskPhase2OTs);
73 
74  out = std::make_unique<MeasurementTrackerEvent>(*mte, *maskPixels, *maskPhase2OTs);
75  }
76 
77  // put into event
78  iEvent.put(std::move(out));
79 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
edm::EDGetTokenT< MeasurementTrackerEvent > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::EDGetTokenT<Phase2OTMask> MaskedMeasurementTrackerEventProducer::maskPhase2OTs_
private
edm::EDGetTokenT<PixelMask> MaskedMeasurementTrackerEventProducer::maskPixels_
private
edm::EDGetTokenT<StripMask> MaskedMeasurementTrackerEventProducer::maskStrips_
private
bool MaskedMeasurementTrackerEventProducer::phase2skipClusters_
private
bool MaskedMeasurementTrackerEventProducer::skipClusters_
private
edm::EDGetTokenT<MeasurementTrackerEvent> MaskedMeasurementTrackerEventProducer::src_
private

Definition at line 19 of file MaskedMeasurementTrackerEventProducer.cc.

Referenced by produce().