CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::ConsumesCollector Class Reference

#include "FWCore/Framework/interface/ConsumesCollector.h"

Public Member Functions

EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
 ConsumesCollector ()=delete
 
 ConsumesCollector (ConsumesCollector &&)=default
 
 ConsumesCollector (ConsumesCollector const &)
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &key, ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
ConsumesCollectoroperator= (ConsumesCollector &&)=default
 
ConsumesCollectoroperator= (ConsumesCollector const &)
 

Private Member Functions

 ConsumesCollector (EDConsumerBase *iConsumer)
 

Private Attributes

edm::propagate_const< EDConsumerBase * > m_consumer
 

Friends

class EDConsumerBase
 

Detailed Description

Description: Helper class to gather consumes information for EDConsumerBase class.

Usage: The constructor of a module can get an instance of edm::ConsumesCollector by calling its consumesCollector() method. This instance can then be passed to helper classes in order to register the data the helper will request from an Event, LuminosityBlock or Run on behalf of the module.

 WARNING: The ConsumesCollector should be used during the time that modules are being

constructed. It should not be saved and used later. It will not work if it is used to call the consumes function during beginJob, beginRun, beginLuminosity block, event processing or at any later time. It can be used while the module constructor is running or be contained in a functor passed to the Framework with a call to callWhenNewProductsRegistered.

Definition at line 39 of file ConsumesCollector.h.

Constructor & Destructor Documentation

◆ ConsumesCollector() [1/4]

edm::ConsumesCollector::ConsumesCollector ( )
delete

◆ ConsumesCollector() [2/4]

edm::ConsumesCollector::ConsumesCollector ( ConsumesCollector const &  other)

Definition at line 5 of file ConsumesCollector.cc.

5 : m_consumer(get_underlying(other.m_consumer)) {}

◆ ConsumesCollector() [3/4]

edm::ConsumesCollector::ConsumesCollector ( ConsumesCollector &&  )
default

◆ ConsumesCollector() [4/4]

edm::ConsumesCollector::ConsumesCollector ( EDConsumerBase iConsumer)
inlineprivate

Definition at line 104 of file ConsumesCollector.h.

104 : m_consumer(iConsumer) {}

Member Function Documentation

◆ consumes() [1/3]

EDGetToken edm::ConsumesCollector::consumes ( const TypeToGet id,
edm::InputTag const &  tag 
)
inline

Definition at line 53 of file ConsumesCollector.h.

53 { return m_consumer->consumes(id, tag); }

References m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ consumes() [2/3]

template<typename ProductType , BranchType B = InEvent>
EDGetTokenT<ProductType> edm::ConsumesCollector::consumes ( edm::InputTag const &  tag)
inline

Definition at line 49 of file ConsumesCollector.h.

49  {
50  return m_consumer->consumes<ProductType, B>(tag);
51  }

References TtFullHadDaughter::B, m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by tnp::BaseTreeFiller::addBranches_(), AlignmentGlobalTrackSelector::AlignmentGlobalTrackSelector(), AlignmentTrackSelector::AlignmentTrackSelector(), AlignmentTwoBodyDecayTrackSelector::AlignmentTwoBodyDecayTrackSelector(), AreaSeededTrackingRegionsBuilder::AreaSeededTrackingRegionsBuilder(), tnp::BaseTreeFiller::BaseTreeFiller(), HLTHiggsSubAnalysis::bookobjects(), MuonTrackingRegionBuilder::build(), CaloParticleDebugger::CaloParticleDebugger(), CaloTruthAccumulator::CaloTruthAccumulator(), CastorDigiProducer::CastorDigiProducer(), ClusterChecker::ClusterChecker(), ConversionSeedFinder::ConversionSeedFinder(), CosmicSplitterValidation::CosmicSplitterValidation(), CutBasedElectronID::CutBasedElectronID(), DTSegmentSelector::DTSegmentSelector(), DualByL2TSG::DualByL2TSG(), EcalTBDigiProducer::EcalTBDigiProducer(), ExpressionVariable< Object, label >::ExpressionVariable(), FastTSGFromIOHit::FastTSGFromIOHit(), GenericSimClusterMapper::GenericSimClusterMapper(), GetLumi::GetLumi(), GlobalCosmicMuonTrajectoryBuilder::GlobalCosmicMuonTrajectoryBuilder(), GlobalMuonRefitter::GlobalMuonRefitter(), GlobalMuonTrajectoryBuilder::GlobalMuonTrajectoryBuilder(), GlobalTrackingRegionProducerFromBeamSpot::GlobalTrackingRegionProducerFromBeamSpot(), HcalDigitizer::HcalDigitizer(), HcalTBDigiProducer::HcalTBDigiProducer(), HGCDigitizer::HGCDigitizer(), HLTBitComputer::HLTBitComputer(), HLTEventSelector::HLTEventSelector(), edm::pathStatusExpression::Operand::init(), PVFitter::initialize(), JetMETDQMDCSFilter::JetMETDQMDCSFilter(), L1BitComputer::L1BitComputer(), L1GtUtilsHelper::L1GtUtilsHelper(), L1JPTOffsetCorrectorImplMaker::L1JPTOffsetCorrectorImplMaker(), l1t::L1TGlobalUtilHelper::L1TGlobalUtilHelper(), L3MuonTrajectoryBuilder::L3MuonTrajectoryBuilder(), TrackAssociatorParameters::loadParameters(), reco::modules::ParameterAdapter< MCMatchCandRefSelector >::make(), MomentumConstraintProducer::MomentumConstraintProducer(), MTDDetLayerMeasurements::MTDDetLayerMeasurements(), MTDDigitizerBase::MTDDigitizerBase(), MuonCosmicCompatibilityFiller::MuonCosmicCompatibilityFiller(), MuonDetLayerMeasurements::MuonDetLayerMeasurements(), MuonSegmentMatcher::MuonSegmentMatcher(), MuonShowerInformationFiller::MuonShowerInformationFiller(), MuonTrackLoader::MuonTrackLoader(), MuonTrackValidatorBase::MuonTrackValidatorBase(), MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor(), L1GtUtilsHelper::operator()(), OverlapValidation::OverlapValidation(), pat::PATUserDataMerger< pat::Jet, pat::helper::AddUserInt >::PATUserDataMerger(), PF_PU_AssoMapAlgos::PF_PU_AssoMapAlgos(), PFClusterFromHGCalMultiCluster::PFClusterFromHGCalMultiCluster(), PFEcalBarrelRecHitCreator::PFEcalBarrelRecHitCreator(), PFEcalEndcapRecHitCreator::PFEcalEndcapRecHitCreator(), PFHBHERecHitCreator::PFHBHERecHitCreator(), PFHcalRecHitCreator< Digi, Geometry, Layer, Detector >::PFHcalRecHitCreator(), PFHFRecHitCreator::PFHFRecHitCreator(), PFHGCalRecHitCreator< DET, Layer, det, subdet >::PFHGCalRecHitCreator(), PFPSRecHitCreator::PFPSRecHitCreator(), cms::PileupVertexAccumulator::PileupVertexAccumulator(), PixelClusterShapeSeedComparitor::PixelClusterShapeSeedComparitor(), RazorComputer::RazorComputer(), RealisticSimClusterMapper::RealisticSimClusterMapper(), RecoTrackAccumulator::RecoTrackAccumulator(), RecoTrackSelectorBase::RecoTrackSelectorBase(), HLTExoticaSubAnalysis::registerConsumes(), SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(), SegmentsTrackAssociator::SegmentsTrackAssociator(), SETPatternRecognition::SETPatternRecognition(), CollHandle< EEDigiCollection >::setToken(), ecaldqm::TrigPrimTask::setTokens(), ecaldqm::ClusterTask::setTokens(), cms::SiPixelDigitizer::SiPixelDigitizer(), SiStripDCSStatus::SiStripDCSStatus(), SiStripDigitizer::SiStripDigitizer(), tadqm::TrackAnalyzer::TrackAnalyzer(), TrackerSeedCleaner::TrackerSeedCleaner(), TrackingSeedCandidates::TrackingSeedCandidates(), TrackingTruthAccumulator::TrackingTruthAccumulator(), TSGForRoadSearch::TSGForRoadSearch(), TSGFromPropagation::TSGFromPropagation(), METCorrectionAlgorithm::type2BinningEntryType::type2BinningEntryType(), ctfseeding::HitExtractorSTRP::useMatchedHits(), ctfseeding::HitExtractorSTRP::useRPhiHits(), ctfseeding::HitExtractorPIX::useSkipClusters_(), ctfseeding::HitExtractorSTRP::useSkipClusters_(), ctfseeding::HitExtractorSTRP::useStereoHits(), VertexBeamspotOrigins::VertexBeamspotOrigins(), VertexMonitor::VertexMonitor(), and WeightManager::WeightManager().

◆ consumes() [3/3]

template<BranchType B>
EDGetToken edm::ConsumesCollector::consumes ( TypeToGet const &  id,
edm::InputTag const &  tag 
)
inline

Definition at line 56 of file ConsumesCollector.h.

56  {
57  return m_consumer->consumes<B>(id, tag);
58  }

References TtFullHadDaughter::B, triggerObjects_cff::id, m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ consumesMany() [1/3]

template<typename ProductType , BranchType B = InEvent>
void edm::ConsumesCollector::consumesMany ( )
inline

Definition at line 73 of file ConsumesCollector.h.

73  {
74  m_consumer->consumesMany<ProductType, B>();
75  }

References TtFullHadDaughter::B, and m_consumer.

◆ consumesMany() [2/3]

void edm::ConsumesCollector::consumesMany ( const TypeToGet id)
inline

Definition at line 77 of file ConsumesCollector.h.

77 { m_consumer->consumesMany(id); }

References m_consumer.

◆ consumesMany() [3/3]

template<BranchType B>
void edm::ConsumesCollector::consumesMany ( const TypeToGet id)
inline

Definition at line 80 of file ConsumesCollector.h.

80  {
81  m_consumer->consumesMany<B>(id);
82  }

References TtFullHadDaughter::B, triggerObjects_cff::id, and m_consumer.

◆ esConsumes() [1/3]

template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto edm::ConsumesCollector::esConsumes ( )
inline

◆ esConsumes() [2/3]

template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto edm::ConsumesCollector::esConsumes ( ESInputTag const &  tag)
inline

Definition at line 91 of file ConsumesCollector.h.

91  {
92  return m_consumer->esConsumes<ESProduct, ESRecord, Tr>(tag);
93  }

References m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ esConsumes() [3/3]

template<typename ESProduct , Transition Tr = Transition::Event>
auto edm::ConsumesCollector::esConsumes ( eventsetup::EventSetupRecordKey const &  key,
ESInputTag const &  tag 
)
inline

Definition at line 96 of file ConsumesCollector.h.

96  {
97  return m_consumer->esConsumes<ESProduct, Tr>(key, tag);
98  }

References crabWrapper::key, m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ mayConsume() [1/3]

EDGetToken edm::ConsumesCollector::mayConsume ( const TypeToGet id,
edm::InputTag const &  tag 
)
inline

Definition at line 65 of file ConsumesCollector.h.

65 { return m_consumer->mayConsume(id, tag); }

References m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ mayConsume() [2/3]

template<BranchType B>
EDGetToken edm::ConsumesCollector::mayConsume ( const TypeToGet id,
edm::InputTag const &  tag 
)
inline

Definition at line 68 of file ConsumesCollector.h.

68  {
69  return m_consumer->mayConsume<B>(id, tag);
70  }

References TtFullHadDaughter::B, triggerObjects_cff::id, m_consumer, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ mayConsume() [3/3]

template<typename ProductType , BranchType B = InEvent>
EDGetTokenT<ProductType> edm::ConsumesCollector::mayConsume ( edm::InputTag const &  tag)
inline

◆ operator=() [1/2]

ConsumesCollector& edm::ConsumesCollector::operator= ( ConsumesCollector &&  )
default

◆ operator=() [2/2]

ConsumesCollector & edm::ConsumesCollector::operator= ( ConsumesCollector const &  other)

Definition at line 7 of file ConsumesCollector.cc.

7  {
8  m_consumer = get_underlying(other.m_consumer);
9  return *this;
10  }

References edm::get_underlying(), m_consumer, and trackingPlots::other.

Friends And Related Function Documentation

◆ EDConsumerBase

friend class EDConsumerBase
friend

Definition at line 102 of file ConsumesCollector.h.

Member Data Documentation

◆ m_consumer

edm::propagate_const<EDConsumerBase*> edm::ConsumesCollector::m_consumer
private

Definition at line 107 of file ConsumesCollector.h.

Referenced by consumes(), consumesMany(), esConsumes(), mayConsume(), and operator=().

ESInputTag
edm::get_underlying
T & get_underlying(propagate_const< T > &)
Definition: propagate_const.h:103
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
trackingPlots.other
other
Definition: trackingPlots.py:1465
edm::ConsumesCollector::m_consumer
edm::propagate_const< EDConsumerBase * > m_consumer
Definition: ConsumesCollector.h:107
TtFullHadDaughter::B
static const std::string B
Definition: TtFullHadronicEvent.h:9
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
crabWrapper.key
key
Definition: crabWrapper.py:19