CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
edm::EDConsumerBase Class Reference

#include <EDConsumerBase.h>

Inheritance diagram for edm::EDConsumerBase:
edm::core::OutputModuleCore edm::EDLooperBase edm::global::EDAnalyzerBase edm::global::EDFilterBase edm::global::EDProducerBase edm::limited::EDAnalyzerBase edm::limited::EDFilterBase edm::limited::EDProducerBase edm::one::EDAnalyzerBase edm::one::EDFilterBase edm::one::EDProducerBase edm::stream::EDAnalyzerBase edm::stream::EDFilterBase edm::stream::EDProducerBase edm::SubProcess

Classes

struct  ESTokenLookupInfo
 
struct  LabelPlacement
 
struct  TokenLookupInfo
 

Public Types

typedef ProductLabels Labels
 

Public Member Functions

std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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 & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Types

enum  { kLookupInfo, kAlwaysGets, kLabels, kKind }
 
enum  { kESLookupInfo, kESResolverIndex }
 

Private Member Functions

edm::InputTag const & checkIfEmpty (edm::InputTag const &tag)
 
virtual void doSelectInputProcessBlocks (ProductRegistry const &, ProcessBlockHelperBase const &)
 
virtual void extendUpdateLookup (BranchType iBranchType, ProductResolverIndexHelper const &)
 
const char * labelFor (ESTokenIndex) const
 
unsigned int recordConsumes (BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
 
ESTokenIndex recordESConsumes (Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
 
virtual void registerLateConsumes (eventsetup::ESRecordsToProductResolverIndices const &)
 
void throwBadToken (edm::TypeID const &iType, EDGetToken iToken) const
 
void throwBranchMismatch (BranchType, EDGetToken) const
 
void throwConsumesCallAfterFrozen (TypeToGet const &, InputTag const &) const
 
void throwESConsumesCallAfterFrozen (eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
 
void throwESConsumesInProcessBlock () const
 
void throwTypeMismatch (edm::TypeID const &, EDGetToken) const
 

Private Attributes

bool containsCurrentProcessAlias_
 
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
 
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
 
bool frozen_
 
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypesitemsToGetFromBranch_
 
edm::SoATuple< ESTokenLookupInfo, ESResolverIndexm_esTokenInfo
 
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfTypem_tokenInfo
 
std::vector< char > m_tokenLabels
 

Friends

class ConsumesCollector
 
template<BranchType B>
class EDConsumerBaseAdaptor
 
template<Transition Tr>
class EDConsumerBaseESAdaptor
 
template<Transition Tr>
class EDConsumerBaseWithTagESAdaptor
 
template<typename T >
class WillGetIfMatch
 

Detailed Description

Description: Allows declaration of what data is being consumed

Usage: The EDM modules all inherit from this base class

Definition at line 72 of file EDConsumerBase.h.

Member Typedef Documentation

◆ Labels

Definition at line 110 of file EDConsumerBase.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

◆ anonymous enum

anonymous enum
private
Enumerator
kESLookupInfo 
kESResolverIndex 

Definition at line 301 of file EDConsumerBase.h.

Constructor & Destructor Documentation

◆ EDConsumerBase() [1/3]

EDConsumerBase::EDConsumerBase ( )

Definition at line 40 of file EDConsumerBase.cc.

41  : m_tokenLabels{makeEmptyTokenLabels()}, frozen_(false), containsCurrentProcessAlias_(false) {}
std::vector< char > m_tokenLabels

◆ ~EDConsumerBase()

EDConsumerBase::~EDConsumerBase ( )
virtualnoexcept

Definition at line 43 of file EDConsumerBase.cc.

43 {}

◆ EDConsumerBase() [2/3]

edm::EDConsumerBase::EDConsumerBase ( EDConsumerBase const &  )
delete

◆ EDConsumerBase() [3/3]

edm::EDConsumerBase::EDConsumerBase ( EDConsumerBase &&  )
default

Member Function Documentation

◆ checkIfEmpty()

edm::InputTag const & EDConsumerBase::checkIfEmpty ( edm::InputTag const &  tag)
private

Definition at line 55 of file EDConsumerBase.cc.

References kWasEmpty, and edm::InputTag::label().

Referenced by consumes(), and mayConsume().

55  {
56  if (iTag.label().empty()) {
57  return kWasEmpty;
58  }
59  return iTag;
60 }
static const edm::InputTag kWasEmpty("@EmptyLabel@")

◆ consumes() [1/4]

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

Definition at line 159 of file EDConsumerBase.h.

References B, checkIfEmpty(), recordConsumes(), and makeGlobalPositionRcd_cfg::tag.

Referenced by AlCaECALRecHitReducer::AlCaECALRecHitReducer(), CAHitNtupletCUDAT< TrackerTraits >::CAHitNtupletCUDAT(), pat::CandidateSummaryTable::CandidateSummaryTable(), CrossingFramePSimHitToPSimHitsConverter::CrossingFramePSimHitToPSimHitsConverter(), EgammaElectronTkIsolationProducer::EgammaElectronTkIsolationProducer(), EgammaIsoDetIdCollectionProducer< T1 >::EgammaIsoDetIdCollectionProducer(), EgammaIsoESDetIdCollectionProducer::EgammaIsoESDetIdCollectionProducer(), EgammaPhotonTkIsolationProducer::EgammaPhotonTkIsolationProducer(), EgammaPhotonTkNumIsolationProducer::EgammaPhotonTkNumIsolationProducer(), edm::EventContentAnalyzer::EventContentAnalyzer(), edmtest::ExistingDictionaryTestAnalyzer::ExistingDictionaryTestAnalyzer(), EcalDQMonitorTask::formSchedule(), edm::GenericConsumer::GenericConsumer(), HGCalValidator::HGCalValidator(), HLTMuonIsoFilter::HLTMuonIsoFilter(), HLTMuonPFIsoFilter::HLTMuonPFIsoFilter(), JetCollectionReducerT< T >::JetCollectionReducerT(), edm::SubProcess::keepThisBranch(), edm::core::OutputModuleCore::keepThisBranch(), L1Filter::L1Filter(), MaskedRctInputDigiProducer::MaskedRctInputDigiProducer(), MkFitEventOfHitsProducer::MkFitEventOfHitsProducer(), MkFitProducer::MkFitProducer(), MultiplicityCorrelator::MultiplicityCorrelator(), MultiTrackValidator::MultiTrackValidator(), pat::PATPackedCandidateProducer::PATPackedCandidateProducer(), PixelTrackDumpCUDAT< TrackerTraits >::PixelTrackDumpCUDAT(), PixelVertexProducerCUDAT< TrackerTraits >::PixelVertexProducerCUDAT(), PPSDiamondSampicTimingCalibrationPCLWorker::PPSDiamondSampicTimingCalibrationPCLWorker(), PPSTimingCalibrationPCLWorker::PPSTimingCalibrationPCLWorker(), ptHatFilter::ptHatFilter(), ShiftedParticleMETcorrInputProducer::ShiftedParticleMETcorrInputProducer(), SiStripApprox2Clusters::SiStripApprox2Clusters(), SiStripMonitorDigi::SiStripMonitorDigi(), edm::SwitchProducer::SwitchProducer(), TestAlpakaHostDeviceCompare::TestAlpakaHostDeviceCompare(), edmtest::TestFindProduct::TestFindProduct(), TestHits::TestHits(), TestSmoothHits::TestSmoothHits(), TrackingParticleNumberOfLayersProducer::TrackingParticleNumberOfLayersProducer(), and l1tVertexFinder::VertexNTupler::VertexNTupler().

159  {
160  TypeToGet tid = TypeToGet::make<ProductType>();
161  return EDGetTokenT<ProductType>{recordConsumes(B, tid, checkIfEmpty(tag), true)};
162  }
Definition: APVGainStruct.h:7
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)

◆ consumes() [2/4]

template<BranchType B = InEvent>
EDConsumerBaseAdaptor<B> edm::EDConsumerBase::consumes ( edm::InputTag  tag)
inlineprotectednoexcept

Definition at line 165 of file EDConsumerBase.h.

References eostools::move(), and makeGlobalPositionRcd_cfg::tag.

165  {
166  return EDConsumerBaseAdaptor<B>(this, std::move(tag));
167  }
def move(src, dest)
Definition: eostools.py:511

◆ consumes() [3/4]

EDGetToken edm::EDConsumerBase::consumes ( const TypeToGet id,
edm::InputTag const &  tag 
)
inlineprotected

Definition at line 169 of file EDConsumerBase.h.

References checkIfEmpty(), edm::InEvent, recordConsumes(), and makeGlobalPositionRcd_cfg::tag.

169  {
170  return EDGetToken{recordConsumes(InEvent, id, checkIfEmpty(tag), true)};
171  }
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)

◆ consumes() [4/4]

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

Definition at line 174 of file EDConsumerBase.h.

References B, checkIfEmpty(), recordConsumes(), and makeGlobalPositionRcd_cfg::tag.

174  {
175  return EDGetToken{recordConsumes(B, id, checkIfEmpty(tag), true)};
176  }
Definition: APVGainStruct.h:7
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)

◆ consumesCollector()

ConsumesCollector EDConsumerBase::consumesCollector ( )
protected

Use a ConsumesCollector to gather consumes information from helper functions.

Definition at line 48 of file EDConsumerBase.cc.

References HltBtagPostValidation_cff::c.

Referenced by AlcaBeamMonitor::AlcaBeamMonitor(), AlcaBeamSpotProducer::AlcaBeamSpotProducer(), AlignmentMonitorAsAnalyzer::AlignmentMonitorAsAnalyzer(), IsolatedParticlesGeneratedJets::analyze(), OverlapValidation::analyze(), BeamMonitor::BeamMonitor(), BeamMonitorBx::BeamMonitorBx(), BeamSpotAnalyzer::BeamSpotAnalyzer(), CaloParticleDebugger::CaloParticleDebugger(), cms::CkfDebugTrackCandidateMaker::CkfDebugTrackCandidateMaker(), ConfigurableAnalysis::ConfigurableAnalysis(), CosmicSplitterValidation::CosmicSplitterValidation(), CSCMonitorModule::CSCMonitorModule(), edm::core::OutputModuleCore::doPreallocate_(), DTResidualCalibration::DTResidualCalibration(), DTT0Correction::DTT0Correction(), DTTPAnalyzer::DTTPAnalyzer(), DTTrigTest::DTTrigTest(), DTTTrigCorrection::DTTTrigCorrection(), DTTTrigOffsetCalibration::DTTTrigOffsetCalibration(), DTVDriftSegmentCalibration::DTVDriftSegmentCalibration(), DTVDriftWriter::DTVDriftWriter(), EcalCosmicsHists::EcalCosmicsHists(), EcalDQMonitorClient::EcalDQMonitorClient(), EcalDQMonitorTask::EcalDQMonitorTask(), EcalMEFormatter::EcalMEFormatter(), EcalMixingModuleValidation::EcalMixingModuleValidation(), EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation(), EcalTPGDBCopy::EcalTPGDBCopy(), EDMtoMEConverter::EDMtoMEConverter(), EgammaHLTClusterShapeProducer::EgammaHLTClusterShapeProducer(), EgammaHLTR9IDProducer::EgammaHLTR9IDProducer(), EGEnergyAnalyzer::EGEnergyAnalyzer(), ElectronIdMVAProducer::ElectronIdMVAProducer(), ElectronMVANtuplizer::ElectronMVANtuplizer(), EopTreeWriter::EopTreeWriter(), EventWithHistoryEDFilter::EventWithHistoryEDFilter(), FFTJetCorrectorDBReader::FFTJetCorrectorDBReader(), edm::FilterWrapper< T >::FilterWrapper(), edm::HadronizerFilter< HAD, DEC >::HadronizerFilter(), HcalIsoTrkAnalyzer::HcalIsoTrkAnalyzer(), HcalIsoTrkSimAnalyzer::HcalIsoTrkSimAnalyzer(), HcalOfflineHarvesting::HcalOfflineHarvesting(), HcalOnlineHarvesting::HcalOnlineHarvesting(), HLTBitAnalyzer::HLTBitAnalyzer(), HLTExoticaValidator::HLTExoticaValidator(), HLTMuonIsoFilter::HLTMuonIsoFilter(), IsolatedTracksCone::IsolatedTracksCone(), IsolatedTracksNxN::IsolatedTracksNxN(), L1CondDBPayloadWriterExt::L1CondDBPayloadWriterExt(), L1EventTreeProducer::L1EventTreeProducer(), L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger(), LogMessageMonitor::LogMessageMonitor(), MomentumConstraintProducer::MomentumConstraintProducer(), MultiplicityCorrelator::MultiplicityCorrelator(), MultiplicityInvestigator::MultiplicityInvestigator(), MultiplicityTimeCorrelations::MultiplicityTimeCorrelations(), MultiTrackValidator::MultiTrackValidator(), MuScleFit::MuScleFit(), OMTFPatternMaker::OMTFPatternMaker(), edm::core::OutputModuleCore::OutputModuleCore(), OverlapValidation::OverlapValidation(), edm::PathStatusFilter::PathStatusFilter(), PhotonIDValueMapProducer::PhotonIDValueMapProducer(), PhotonMVANtuplizer::PhotonMVANtuplizer(), PlottingDevice::PlottingDevice(), QuickTrackAssociatorByHitsProducer::QuickTrackAssociatorByHitsProducer(), ResidualRefitting::ResidualRefitting(), edm::SecSourceAnalyzer::SecSourceAnalyzer(), SingleTopTChannelLeptonDQM::SingleTopTChannelLeptonDQM(), SingleTopTChannelLeptonDQM_miniAOD::SingleTopTChannelLeptonDQM_miniAOD(), cms::SiPixelCondObjAllPayloadsReader::SiPixelCondObjAllPayloadsReader(), cms::SiPixelCondObjForHLTReader::SiPixelCondObjForHLTReader(), cms::SiPixelCondObjOfflineReader::SiPixelCondObjOfflineReader(), SiPixelStatusHarvester::SiPixelStatusHarvester(), SiStripAnalyser::SiStripAnalyser(), SiStripBadComponentInfo::SiStripBadComponentInfo(), SiStripDCSFilter::SiStripDCSFilter(), SiStripFineDelayHit::SiStripFineDelayHit(), SiStripMonitorCondDataOnDemandExample::SiStripMonitorCondDataOnDemandExample(), SiStripMonitorDigi::SiStripMonitorDigi(), SiStripQualityStatistics::SiStripQualityStatistics(), edm::SubProcess::SubProcess(), TagProbeFitTreeProducer::TagProbeFitTreeProducer(), TopDiLeptonOfflineDQM::TopDiLeptonOfflineDQM(), TopSingleLeptonDQM::TopSingleLeptonDQM(), TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(), TriggerResultsFilter::TriggerResultsFilter(), and ValidIsoTrkCalib::ValidIsoTrkCalib().

◆ consumesInfo()

std::vector< ConsumesInfo > EDConsumerBase::consumesInfo ( ) const

Definition at line 567 of file EDConsumerBase.cc.

References cms::cuda::assert(), kAlwaysGets, kKind, kLabels, kLookupInfo, m_tokenInfo, m_tokenLabels, and mps_fire::result.

567  {
568  std::vector<ConsumesInfo> result;
569  auto itAlways = m_tokenInfo.begin<kAlwaysGets>();
570  auto itKind = m_tokenInfo.begin<kKind>();
571  auto itLabels = m_tokenInfo.begin<kLabels>();
572  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
573  ++itInfo, ++itKind, ++itLabels, ++itAlways) {
574  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
575  const char* consumedModuleLabel = &(m_tokenLabels[labelStart]);
576  const char* consumedInstance = consumedModuleLabel + itLabels->m_deltaToProductInstance;
577  const char* consumedProcessName = consumedModuleLabel + itLabels->m_deltaToProcessName;
578 
579  assert(*consumedModuleLabel != '\0');
580 
581  // Just copy the information into the ConsumesInfo data structure
582  result.emplace_back(itInfo->m_type,
583  consumedModuleLabel,
584  consumedInstance,
585  consumedProcessName,
586  itInfo->m_branchType,
587  *itKind,
588  *itAlways,
589  itInfo->m_index.skipCurrentProcess());
590  }
591  return result;
592 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
assert(be >=bs)
std::vector< char > m_tokenLabels

◆ convertCurrentProcessAlias()

void EDConsumerBase::convertCurrentProcessAlias ( std::string const &  processName)

Convert "@currentProcess" in InputTag process names to the actual current process name.

Definition at line 521 of file EDConsumerBase.cc.

References containsCurrentProcessAlias_, frozen_, edm::InputTag::kCurrentProcess, kLabels, m_tokenInfo, m_tokenLabels, eostools::move(), SimL1EmulatorRepack_CalouGT_cff::processName, and AlCaHLTBitMon_QueryRunRegistry::string.

521  {
522  frozen_ = true;
523 
526 
527  auto newTokenLabels = makeEmptyTokenLabels();
528 
529  // first calculate the size of the new vector and reserve memory for it
530  std::vector<char>::size_type newSize = newTokenLabels.size();
531  std::string newProcessName;
532  for (auto iter = m_tokenInfo.begin<kLabels>(), itEnd = m_tokenInfo.end<kLabels>(); iter != itEnd; ++iter) {
533  newProcessName = &m_tokenLabels[iter->m_startOfModuleLabel + iter->m_deltaToProcessName];
534  if (newProcessName == InputTag::kCurrentProcess) {
535  newProcessName = processName;
536  }
537  newSize += (iter->m_deltaToProcessName + newProcessName.size() + 1);
538  }
539  newTokenLabels.reserve(newSize);
540 
541  unsigned int newStartOfModuleLabel = newTokenLabels.size();
542  for (auto iter = m_tokenInfo.begin<kLabels>(), itEnd = m_tokenInfo.end<kLabels>(); iter != itEnd; ++iter) {
543  unsigned int startOfModuleLabel = iter->m_startOfModuleLabel;
544  unsigned short deltaToProcessName = iter->m_deltaToProcessName;
545 
546  iter->m_startOfModuleLabel = newStartOfModuleLabel;
547 
548  newProcessName = &m_tokenLabels[startOfModuleLabel + deltaToProcessName];
549  if (newProcessName == InputTag::kCurrentProcess) {
550  newProcessName = processName;
551  }
552 
553  newStartOfModuleLabel += (deltaToProcessName + newProcessName.size() + 1);
554 
555  // Copy in both the module label and instance, they are the same
556  newTokenLabels.insert(newTokenLabels.end(),
557  m_tokenLabels.begin() + startOfModuleLabel,
558  m_tokenLabels.begin() + (startOfModuleLabel + deltaToProcessName));
559 
560  newTokenLabels.insert(newTokenLabels.end(), newProcessName.begin(), newProcessName.end());
561  newTokenLabels.push_back('\0');
562  }
563  m_tokenLabels = std::move(newTokenLabels);
564  }
565 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
uint16_t size_type
static const std::string kCurrentProcess
Definition: InputTag.h:54
std::vector< char > m_tokenLabels
def move(src, dest)
Definition: eostools.py:511

◆ doSelectInputProcessBlocks()

void EDConsumerBase::doSelectInputProcessBlocks ( ProductRegistry const &  ,
ProcessBlockHelperBase const &   
)
privatevirtual

Definition at line 384 of file EDConsumerBase.cc.

Referenced by selectInputProcessBlocks().

384 {}

◆ esConsumes() [1/5]

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

Definition at line 193 of file EDConsumerBase.h.

Referenced by edmtest::ESTestAnalyzerIncorrectConsumes::analyze(), APVShotsFilter::APVShotsFilter(), BeamConditionsMonitor::BeamConditionsMonitor(), BeamSpotOnlineShifter::BeamSpotOnlineShifter(), DD4hep_TrackingMaterialAnalyser::DD4hep_TrackingMaterialAnalyser(), DisplayGeom::DisplayGeom(), DTConfigTester::DTConfigTester(), DTEtaPatternLutTester::DTEtaPatternLutTester(), DTExtLutTester::DTExtLutTester(), DTPhiLutTester::DTPhiLutTester(), DTPtaLutTester::DTPtaLutTester(), DTQualPatternLutTester::DTQualPatternLutTester(), DTTFMasksTester::DTTFMasksTester(), DTTFParametersTester::DTTFParametersTester(), DTVDriftCalibration::DTVDriftCalibration(), EcalLaserCondTools::EcalLaserCondTools(), module::EcalSRCondTools::EcalSRCondTools(), EgammaHLTBcHcalIsolationProducersRegional::EgammaHLTBcHcalIsolationProducersRegional(), EgammaHLTExtraProducer::EgammaHLTExtraProducer(), EgammaHLTHcalVarProducerFromRecHit::EgammaHLTHcalVarProducerFromRecHit(), EgammaHLTPhase2ExtraProducer::EgammaHLTPhase2ExtraProducer(), ElectronRegressionEnergyProducer::ElectronRegressionEnergyProducer(), FactorizedJetCorrectorDemo::FactorizedJetCorrectorDemo(), GlobalDigisProducer::GlobalDigisProducer(), HLTScoutingEgammaProducer::HLTScoutingEgammaProducer(), JetCorrectorDBReader::JetCorrectorDBReader(), JetCorrectorDemo::JetCorrectorDemo(), JetResolutionDBReader::JetResolutionDBReader(), JetResolutionDemo::JetResolutionDemo(), JetResolutionScaleFactorDBReader::JetResolutionScaleFactorDBReader(), L1CondDBIOVWriter::L1CondDBIOVWriter(), L1CondDBIOVWriterExt::L1CondDBIOVWriterExt(), L1GctConfigDump::L1GctConfigDump(), L1GtDataEmulAnalyzer::L1GtDataEmulAnalyzer(), L1GtVhdlWriter::L1GtVhdlWriter(), L1KeyListWriter::L1KeyListWriter(), L1KeyWriter::L1KeyWriter(), L1MuCSCTFParametersTester::L1MuCSCTFParametersTester(), L1O2OTestAnalyzer::L1O2OTestAnalyzer(), L1O2OTestAnalyzerExt::L1O2OTestAnalyzerExt(), L1TCaloParamsUpdater::L1TCaloParamsUpdater(), L1TCaloParamsViewer::L1TCaloParamsViewer(), L1TCaloStage2ParamsWriter::L1TCaloStage2ParamsWriter(), L1TGlobalPrescalesVetosViewer::L1TGlobalPrescalesVetosViewer(), L1TGlobalPrescalesVetosWriter::L1TGlobalPrescalesVetosWriter(), L1TMuonBarrelParamsWriter::L1TMuonBarrelParamsWriter(), L1TMuonEndCapForestWriter::L1TMuonEndCapForestWriter(), L1TMuonEndCapParamsWriter::L1TMuonEndCapParamsWriter(), L1TMuonGlobalParamsWriter::L1TMuonGlobalParamsWriter(), L1TMuonOverlapParamsWriter::L1TMuonOverlapParamsWriter(), L1TriggerKeyExtViewer::L1TriggerKeyExtViewer(), L1TriggerKeyListExtReader::L1TriggerKeyListExtReader(), MuonGeometryDBConverter::MuonGeometryDBConverter(), QGLikelihoodDBReader::QGLikelihoodDBReader(), QGLikelihoodSystematicsDBReader::QGLikelihoodSystematicsDBReader(), QGTagger::QGTagger(), RPCGeometryServTest::RPCGeometryServTest(), edmtest::RunLumiESAnalyzer::RunLumiESAnalyzer(), SiPixelGainCalibScaler::SiPixelGainCalibScaler(), SiStripApprox2Clusters::SiStripApprox2Clusters(), SiStripCommissioningSource::SiStripCommissioningSource(), SiStripCondVisualizer::SiStripCondVisualizer(), SiStripFineDelayHit::SiStripFineDelayHit(), SiStripGainPayloadCopyAndExclude::SiStripGainPayloadCopyAndExclude(), SiStripGainRandomCalculator::SiStripGainRandomCalculator(), SiStripGainsCalibTreeWorker::SiStripGainsCalibTreeWorker(), SiStripGainsPCLWorker::SiStripGainsPCLWorker(), SiStripHitResolFromCalibTree::SiStripHitResolFromCalibTree(), SiStripMonitorDigi::SiStripMonitorDigi(), TestHits::TestHits(), TestSmoothHits::TestSmoothHits(), TestTrackHits::TestTrackHits(), TrackingMaterialAnalyser::TrackingMaterialAnalyser(), ValidateGeometry::ValidateGeometry(), edmtest::WhatsItAnalyzer::WhatsItAnalyzer(), and WriteTotemDAQMapping::WriteTotemDAQMapping().

193  {
194  return esConsumes<ESProduct, ESRecord, Tr>(ESInputTag{});
195  }

◆ esConsumes() [2/5]

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

Definition at line 198 of file EDConsumerBase.h.

References labelFor(), edm::eventsetup::EventSetupRecordKey::makeKey(), recordESConsumes(), and makeGlobalPositionRcd_cfg::tag.

198  {
199  auto index = recordESConsumes(Tr,
201  std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
202  eventsetup::default_record_t<ESHandleAdapter<ESProduct>>,
203  ESRecord>>(),
204  eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
205  tag);
206  return ESGetToken<ESProduct, ESRecord>{static_cast<unsigned int>(Tr), index, labelFor(index)};
207  }
const char * labelFor(ESTokenIndex) const
typename default_record< T >::RecordT default_record_t
static EventSetupRecordKey makeKey()
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)

◆ esConsumes() [3/5]

template<Transition Tr = Transition::Event>
constexpr auto edm::EDConsumerBase::esConsumes ( )
inlineprotected

Definition at line 210 of file EDConsumerBase.h.

210  {
211  return EDConsumerBaseESAdaptor<Tr>(this);
212  }

◆ esConsumes() [4/5]

template<Transition Tr = Transition::Event>
auto edm::EDConsumerBase::esConsumes ( ESInputTag  tag)
inlineprotected

Definition at line 215 of file EDConsumerBase.h.

References eostools::move(), and makeGlobalPositionRcd_cfg::tag.

215  {
216  return EDConsumerBaseWithTagESAdaptor<Tr>(this, std::move(tag));
217  }
def move(src, dest)
Definition: eostools.py:511

◆ esConsumes() [5/5]

template<Transition Tr = Transition::Event>
ESGetTokenGeneric edm::EDConsumerBase::esConsumes ( eventsetup::EventSetupRecordKey const &  iRecord,
eventsetup::DataKey const &  iKey 
)
inlineprotected

Used with EventSetupRecord::doGet.

Definition at line 221 of file EDConsumerBase.h.

References edm::eventsetup::DataKey::name(), recordESConsumes(), edm::eventsetup::EventSetupRecordKey::type(), edm::eventsetup::DataKey::type(), and edm::eventsetup::SimpleStringTag::value().

221  {
222  return ESGetTokenGeneric(static_cast<unsigned int>(Tr),
223  recordESConsumes(Tr, iRecord, iKey.type(), ESInputTag("", iKey.name().value())),
224  iRecord.type());
225  }
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)

◆ esGetTokenIndices()

ESResolverIndex const* edm::EDConsumerBase::esGetTokenIndices ( edm::Transition  iTrans) const
inline

Definition at line 124 of file EDConsumerBase.h.

References esItemsToGetFromTransition_, edm::NumberOfEventSetupTransitions, and findQualityFiles::v.

Referenced by edm::EDLooperBase::beginOfJob(), edm::global::EDFilterBase::doAcquire(), edm::global::EDProducerBase::doAcquire(), edm::one::EDAnalyzerBase::doBeginLuminosityBlock(), edm::EDLooperBase::doBeginLuminosityBlock(), edm::global::EDAnalyzerBase::doBeginLuminosityBlock(), edm::one::EDProducerBase::doBeginLuminosityBlock(), edm::one::EDFilterBase::doBeginLuminosityBlock(), edm::limited::EDAnalyzerBase::doBeginLuminosityBlock(), edm::limited::EDProducerBase::doBeginLuminosityBlock(), edm::global::EDProducerBase::doBeginLuminosityBlock(), edm::global::EDFilterBase::doBeginLuminosityBlock(), edm::limited::EDFilterBase::doBeginLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doBeginLuminosityBlock(), edm::one::EDAnalyzerBase::doBeginRun(), edm::EDLooperBase::doBeginRun(), edm::global::EDAnalyzerBase::doBeginRun(), edm::one::EDProducerBase::doBeginRun(), edm::one::EDFilterBase::doBeginRun(), edm::limited::EDAnalyzerBase::doBeginRun(), edm::limited::EDProducerBase::doBeginRun(), edm::global::EDProducerBase::doBeginRun(), edm::global::EDFilterBase::doBeginRun(), edm::limited::EDFilterBase::doBeginRun(), edm::stream::EDAnalyzerAdaptor< T >::doBeginRun(), edm::EDLooperBase::doDuringLoop(), edm::one::EDAnalyzerBase::doEndLuminosityBlock(), edm::EDLooperBase::doEndLuminosityBlock(), edm::global::EDAnalyzerBase::doEndLuminosityBlock(), edm::one::EDProducerBase::doEndLuminosityBlock(), edm::one::EDFilterBase::doEndLuminosityBlock(), edm::limited::EDAnalyzerBase::doEndLuminosityBlock(), edm::global::EDProducerBase::doEndLuminosityBlock(), edm::limited::EDProducerBase::doEndLuminosityBlock(), edm::global::EDFilterBase::doEndLuminosityBlock(), edm::limited::EDFilterBase::doEndLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doEndLuminosityBlock(), edm::EDLooperBase::doEndOfLoop(), edm::one::EDAnalyzerBase::doEndRun(), edm::EDLooperBase::doEndRun(), edm::global::EDAnalyzerBase::doEndRun(), edm::one::EDFilterBase::doEndRun(), edm::one::EDProducerBase::doEndRun(), edm::limited::EDAnalyzerBase::doEndRun(), edm::limited::EDProducerBase::doEndRun(), edm::global::EDProducerBase::doEndRun(), edm::global::EDFilterBase::doEndRun(), edm::limited::EDFilterBase::doEndRun(), edm::stream::EDAnalyzerAdaptor< T >::doEndRun(), edm::global::EDAnalyzerBase::doEvent(), edm::one::EDAnalyzerBase::doEvent(), edm::global::EDFilterBase::doEvent(), edm::one::EDProducerBase::doEvent(), edm::one::EDFilterBase::doEvent(), edm::global::EDProducerBase::doEvent(), edm::limited::EDAnalyzerBase::doEvent(), edm::limited::EDFilterBase::doEvent(), edm::limited::EDProducerBase::doEvent(), edm::global::EDAnalyzerBase::doStreamBeginLuminosityBlock(), edm::limited::EDAnalyzerBase::doStreamBeginLuminosityBlock(), edm::limited::EDProducerBase::doStreamBeginLuminosityBlock(), edm::global::EDProducerBase::doStreamBeginLuminosityBlock(), edm::global::EDFilterBase::doStreamBeginLuminosityBlock(), edm::limited::EDFilterBase::doStreamBeginLuminosityBlock(), edm::global::EDAnalyzerBase::doStreamBeginRun(), edm::limited::EDAnalyzerBase::doStreamBeginRun(), edm::global::EDProducerBase::doStreamBeginRun(), edm::limited::EDProducerBase::doStreamBeginRun(), edm::global::EDFilterBase::doStreamBeginRun(), edm::limited::EDFilterBase::doStreamBeginRun(), edm::global::EDAnalyzerBase::doStreamEndLuminosityBlock(), edm::limited::EDAnalyzerBase::doStreamEndLuminosityBlock(), edm::global::EDProducerBase::doStreamEndLuminosityBlock(), edm::limited::EDProducerBase::doStreamEndLuminosityBlock(), edm::global::EDFilterBase::doStreamEndLuminosityBlock(), edm::limited::EDFilterBase::doStreamEndLuminosityBlock(), edm::global::EDAnalyzerBase::doStreamEndRun(), edm::limited::EDAnalyzerBase::doStreamEndRun(), edm::global::EDProducerBase::doStreamEndRun(), edm::limited::EDProducerBase::doStreamEndRun(), edm::global::EDFilterBase::doStreamEndRun(), and edm::limited::EDFilterBase::doStreamEndRun().

124  {
126  auto const& v = esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)];
127  if (v.empty()) {
128  return nullptr;
129  }
130  return &(esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)].front());
131  }
132  return nullptr;
133  }
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_

◆ esGetTokenIndicesVector()

std::vector<ESResolverIndex> const& edm::EDConsumerBase::esGetTokenIndicesVector ( edm::Transition  iTrans) const
inline

Definition at line 135 of file EDConsumerBase.h.

References cms::cuda::assert(), esItemsToGetFromTransition_, and edm::NumberOfEventSetupTransitions.

Referenced by edm::EDLooperBase::esPrefetchAsync().

135  {
137  return esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)];
138  }
assert(be >=bs)
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_

◆ esGetTokenRecordIndicesVector()

std::vector<ESRecordIndex> const& edm::EDConsumerBase::esGetTokenRecordIndicesVector ( edm::Transition  iTrans) const
inline

Definition at line 140 of file EDConsumerBase.h.

References cms::cuda::assert(), esRecordsToGetFromTransition_, and edm::NumberOfEventSetupTransitions.

Referenced by edm::EDLooperBase::esPrefetchAsync().

140  {
142  return esRecordsToGetFromTransition_[static_cast<unsigned int>(iTrans)];
143  }
assert(be >=bs)
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_

◆ extendUpdateLookup()

void EDConsumerBase::extendUpdateLookup ( BranchType  iBranchType,
ProductResolverIndexHelper const &   
)
privatevirtual

Reimplemented in edm::stream::impl::Transformer.

Definition at line 113 of file EDConsumerBase.cc.

Referenced by updateLookup().

113 {}

◆ indexFrom()

ProductResolverIndexAndSkipBit EDConsumerBase::indexFrom ( EDGetToken  iToken,
BranchType  iBranch,
TypeID const &  iType 
) const

Definition at line 227 of file EDConsumerBase.cc.

References edm::EDGetToken::index(), info(), kLookupInfo, LIKELY, m_tokenInfo, edm::ProductResolverIndexInvalid, throwBadToken(), throwBranchMismatch(), throwTypeMismatch(), and UNLIKELY.

Referenced by edm::PrincipalGetAdapter::getByToken_().

229  {
230  if (UNLIKELY(iToken.index() >= m_tokenInfo.size())) {
231  throwBadToken(iType, iToken);
232  }
233  const auto& info = m_tokenInfo.get<kLookupInfo>(iToken.index());
234  if (LIKELY(iBranch == info.m_branchType)) {
235  if (LIKELY(iType == info.m_type)) {
236  return info.m_index;
237  } else {
238  throwTypeMismatch(iType, iToken);
239  }
240  } else {
241  throwBranchMismatch(iBranch, iToken);
242  }
244 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
static const TGPicture * info(bool iBackgroundIsBlack)
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
#define LIKELY(x)
Definition: Likely.h:20
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
#define UNLIKELY(x)
Definition: Likely.h:21
void throwBranchMismatch(BranchType, EDGetToken) const

◆ itemsMayGet()

void EDConsumerBase::itemsMayGet ( BranchType  iBranch,
std::vector< ProductResolverIndexAndSkipBit > &  oIndices 
) const

Definition at line 282 of file EDConsumerBase.cc.

References submitPVResolutionJobs::count, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, kAlwaysGets, kLookupInfo, m_tokenInfo, and edm::ProductResolverIndexInvalid.

Referenced by updateLookup().

282  {
283  //how many are we adding?
284  unsigned int count = 0;
285  {
286  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
287  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
288  ++it, ++itAlwaysGet) {
289  if (iBranch == it->m_branchType) {
290  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
291  if (not *itAlwaysGet) {
292  ++count;
293  }
294  }
295  }
296  }
297  }
298  oIndices.reserve(oIndices.size() + count);
299  {
300  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
301  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
302  ++it, ++itAlwaysGet) {
303  if (iBranch == it->m_branchType) {
304  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
305  if (not *itAlwaysGet) {
306  oIndices.push_back(it->m_index);
307  }
308  }
309  }
310  }
311  }
312 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo

◆ itemsToGet()

void EDConsumerBase::itemsToGet ( BranchType  iBranch,
std::vector< ProductResolverIndexAndSkipBit > &  oIndices 
) const

Definition at line 250 of file EDConsumerBase.cc.

References submitPVResolutionJobs::count, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, kAlwaysGets, kLookupInfo, m_tokenInfo, and edm::ProductResolverIndexInvalid.

Referenced by updateLookup().

250  {
251  //how many are we adding?
252  unsigned int count = 0;
253  {
254  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
255  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
256  ++it, ++itAlwaysGet) {
257  if (iBranch == it->m_branchType) {
258  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
259  if (*itAlwaysGet) {
260  ++count;
261  }
262  }
263  }
264  }
265  }
266  oIndices.reserve(oIndices.size() + count);
267  {
268  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
269  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
270  ++it, ++itAlwaysGet) {
271  if (iBranch == it->m_branchType) {
272  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
273  if (*itAlwaysGet) {
274  oIndices.push_back(it->m_index);
275  }
276  }
277  }
278  }
279  }
280 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo

◆ itemsToGetFrom()

std::vector<ProductResolverIndexAndSkipBit> const& edm::EDConsumerBase::itemsToGetFrom ( BranchType  iType) const
inline

Definition at line 93 of file EDConsumerBase.h.

References itemsToGetFromBranch_.

Referenced by edm::EDLooperBase::edPrefetchAsync(), and edm::PrincipalGetAdapter::numberOfProductsConsumed().

93  {
94  return itemsToGetFromBranch_[iType];
95  }
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_

◆ labelFor()

const char * EDConsumerBase::labelFor ( ESTokenIndex  iIndex) const
private

Definition at line 594 of file EDConsumerBase.cc.

References kESLookupInfo, m_esTokenInfo, and edm::ESTokenIndex::value().

Referenced by esConsumes().

594  {
595  return m_esTokenInfo.get<kESLookupInfo>(iIndex.value()).m_key.name().value();
596 }
constexpr Value_t value() const noexcept
Definition: ESIndices.h:70
edm::SoATuple< ESTokenLookupInfo, ESResolverIndex > m_esTokenInfo

◆ labelsForToken()

void EDConsumerBase::labelsForToken ( EDGetToken  iToken,
Labels oLabels 
) const

Definition at line 314 of file EDConsumerBase.cc.

References edm::EDGetToken::index(), kLabels, SummaryClient_cfi::labels, m_tokenInfo, m_tokenLabels, edm::ProductLabels::module, edm::ProductLabels::process, edm::ProductLabels::productInstance, and command_line::start.

Referenced by AlCaElectronsTest::analyze(), ContainmentCorrectionAnalyzer::analyze(), EnergyScaleAnalyzer::analyze(), PhotonValidator::analyze(), HLTScalers::analyze(), edmtest::TestGetterOfProductsA::analyze(), TrackingNtuple::analyze(), EgammaObjects::analyzeElectrons(), EgammaObjects::analyzePhotons(), HLTVertexPerformanceAnalyzer::dqmBeginRun(), HLTBTagPerformanceAnalyzer::dqmBeginRun(), TriggerBxMonitor::dqmBeginRun(), TriggerRatesMonitor::dqmBeginRun(), edmtest::TestGetterOfProductsA::endLuminosityBlock(), edmtest::TestGetterOfProductsA::endRun(), TrackingNtuple::fillSeeds(), TrackingNtuple::fillTracks(), edmtest::TestGetterOfProducts::filter(), EcalSimpleUncalibRecHitFilter::filter(), EcalMIPRecHitFilter::filter(), HLTBTagPerformanceAnalyzer::HLTBTagPerformanceAnalyzer(), HLTVertexPerformanceAnalyzer::HLTVertexPerformanceAnalyzer(), edm::PrincipalGetAdapter::labelsForToken(), edm::PrincipalGetAdapter::makeFailToGetException(), MultiTrackValidator::MultiTrackValidator(), HIPixelTrackFilterProducer::produce(), HIProtoTrackFilterProducer::produce(), and edm::PrincipalGetAdapter::throwAmbiguousException().

314  {
315  unsigned int index = iToken.index();
316  auto labels = m_tokenInfo.get<kLabels>(index);
317  unsigned int start = labels.m_startOfModuleLabel;
318  oLabels.module = &(m_tokenLabels[start]);
319  oLabels.productInstance = oLabels.module + labels.m_deltaToProductInstance;
320  oLabels.process = oLabels.module + labels.m_deltaToProcessName;
321 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
Definition: start.py:1
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54
std::vector< char > m_tokenLabels

◆ mayConsume() [1/3]

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

Definition at line 179 of file EDConsumerBase.h.

References B, checkIfEmpty(), recordConsumes(), and makeGlobalPositionRcd_cfg::tag.

179  {
180  TypeToGet tid = TypeToGet::make<ProductType>();
181  return EDGetTokenT<ProductType>{recordConsumes(B, tid, checkIfEmpty(tag), false)};
182  }
Definition: APVGainStruct.h:7
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)

◆ mayConsume() [2/3]

EDGetToken edm::EDConsumerBase::mayConsume ( const TypeToGet id,
edm::InputTag const &  tag 
)
inlineprotected

Definition at line 184 of file EDConsumerBase.h.

References l1ctLayer2EG_cff::id, and makeGlobalPositionRcd_cfg::tag.

184 { return mayConsume<InEvent>(id, tag); }

◆ mayConsume() [3/3]

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

Definition at line 187 of file EDConsumerBase.h.

References B, checkIfEmpty(), recordConsumes(), and makeGlobalPositionRcd_cfg::tag.

187  {
188  return EDGetToken{recordConsumes(B, id, checkIfEmpty(tag), false)};
189  }
Definition: APVGainStruct.h:7
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)

◆ modulesWhoseProductsAreConsumed()

void EDConsumerBase::modulesWhoseProductsAreConsumed ( std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &  modulesAll,
std::vector< ModuleProcessName > &  modulesInPreviousProcesses,
ProductRegistry const &  preg,
std::map< std::string, ModuleDescription const *> const &  labelsToDesc,
std::string const &  processName 
) const

Definition at line 442 of file EDConsumerBase.cc.

References cms::cuda::assert(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, dqmiolumiharvest::j, kKind, kLabels, kLookupInfo, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, m_tokenInfo, m_tokenLabels, oniaPATMuonsWithTrigger_cff::matches, callgraph::module, LaserDQM_cfg::process, SimL1EmulatorRepack_CalouGT_cff::processName, edm::ProductRegistry::productLookup(), and edm::ProductResolverIndexInvalid.

447  {
448  std::set<std::string> alreadyFound;
449 
450  auto modulesInPreviousProcessesEmplace = [&modulesInPreviousProcesses](std::string_view module,
451  std::string_view process) {
452  auto it = std::lower_bound(
453  modulesInPreviousProcesses.begin(), modulesInPreviousProcesses.end(), ModuleProcessName(module, process));
454  modulesInPreviousProcesses.emplace(it, module, process);
455  };
456 
457  auto itKind = m_tokenInfo.begin<kKind>();
458  auto itLabels = m_tokenInfo.begin<kLabels>();
459  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
460  ++itInfo, ++itKind, ++itLabels) {
461  ProductResolverIndexHelper const& helper = *preg.productLookup(itInfo->m_branchType);
462  std::vector<ModuleDescription const*>& modules = *modulesAll[itInfo->m_branchType];
463 
464  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
465  const char* const consumedModuleLabel = &(m_tokenLabels[labelStart]);
466  const char* const consumedProductInstance = consumedModuleLabel + itLabels->m_deltaToProductInstance;
467  const char* const consumedProcessName = consumedModuleLabel + itLabels->m_deltaToProcessName;
468 
469  if (not itInfo->m_index.skipCurrentProcess()) {
470  assert(*consumedModuleLabel != '\0'); // consumesMany used to create empty labels before we removed consumesMany
471  if (*consumedProcessName != '\0') { // process name is specified in consumes call
472  if (helper.index(*itKind, itInfo->m_type, consumedModuleLabel, consumedProductInstance, consumedProcessName) !=
474  if (processName == consumedProcessName) {
475  insertFoundModuleLabel(*itKind,
476  itInfo->m_type,
477  consumedModuleLabel,
478  consumedProductInstance,
479  modules,
480  alreadyFound,
481  labelsToDesc,
482  preg);
483  } else {
484  // Product explicitly from different process than the current process, so must refer to an earlier process (unless it ends up "not found")
485  modulesInPreviousProcessesEmplace(consumedModuleLabel, consumedProcessName);
486  }
487  }
488  } else { // process name was empty
489  auto matches = helper.relatedIndexes(*itKind, itInfo->m_type, consumedModuleLabel, consumedProductInstance);
490  for (unsigned int j = 0; j < matches.numberOfMatches(); ++j) {
491  if (processName == matches.processName(j)) {
492  insertFoundModuleLabel(*itKind,
493  itInfo->m_type,
494  consumedModuleLabel,
495  consumedProductInstance,
496  modules,
497  alreadyFound,
498  labelsToDesc,
499  preg);
500  } else {
501  // Product did not match to current process, so must refer to an earlier process (unless it ends up "not found")
502  // Recall that empty process name means "in the latest process" that can change event-by-event
503  modulesInPreviousProcessesEmplace(consumedModuleLabel, matches.processName(j));
504  }
505  }
506  }
507  } else {
508  // The skipCurrentProcess means the same as empty process name,
509  // except the current process is skipped. Therefore need to do
510  // the same matching as above.
511  auto matches = helper.relatedIndexes(*itKind, itInfo->m_type, consumedModuleLabel, consumedProductInstance);
512  for (unsigned int j = 0; j < matches.numberOfMatches(); ++j) {
513  if (processName != matches.processName(j)) {
514  modulesInPreviousProcessesEmplace(matches.moduleLabel(j), matches.processName(j));
515  }
516  }
517  }
518  }
519 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
Definition: helper.py:1
assert(be >=bs)
std::vector< char > m_tokenLabels

◆ operator=() [1/2]

EDConsumerBase const& edm::EDConsumerBase::operator= ( EDConsumerBase const &  )
delete

◆ operator=() [2/2]

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

◆ recordConsumes()

unsigned int EDConsumerBase::recordConsumes ( BranchType  iBranch,
TypeToGet const &  iType,
edm::InputTag const &  iTag,
bool  iAlwaysGets 
)
private

Definition at line 62 of file EDConsumerBase.cc.

References containsCurrentProcessAlias_, frozen_, edm::InputTag::instance(), edm::InputTag::kCurrentProcess, edm::TypeToGet::kind(), edm::InputTag::label(), visualization-live-secondInstance_cfg::m, m_tokenInfo, m_tokenLabels, edm::InputTag::process(), edm::ProductResolverIndexInvalid, AlCaHLTBitMon_QueryRunRegistry::string, throwConsumesCallAfterFrozen(), edm::TypeToGet::type(), and edm::InputTag::willSkipCurrentProcess().

Referenced by consumes(), and mayConsume().

65  {
66  if (frozen_) {
67  throwConsumesCallAfterFrozen(iType, iTag);
68  }
69 
70  unsigned int index = m_tokenInfo.size();
71 
72  bool skipCurrentProcess = iTag.willSkipCurrentProcess();
73 
74  const size_t labelSize = iTag.label().size();
75  const size_t productInstanceSize = iTag.instance().size();
76  unsigned int labelStart = m_tokenLabels.size();
77  unsigned short delta1 = labelSize + 1;
78  unsigned short delta2 = labelSize + 2 + productInstanceSize;
79  m_tokenInfo.emplace_back(TokenLookupInfo{iType.type(), ProductResolverIndexInvalid, skipCurrentProcess, iBranch},
80  iAlwaysGets,
81  LabelPlacement{labelStart, delta1, delta2},
82  iType.kind());
83 
84  const size_t additionalSize = skipCurrentProcess ? labelSize + productInstanceSize + 3
85  : labelSize + productInstanceSize + iTag.process().size() + 3;
86 
87  m_tokenLabels.reserve(m_tokenLabels.size() + additionalSize);
88  {
89  const std::string& m = iTag.label();
90  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
91  m_tokenLabels.push_back('\0');
92  }
93  {
94  const std::string& m = iTag.instance();
95  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
96  m_tokenLabels.push_back('\0');
97  }
98  {
99  const std::string& m = iTag.process();
100  if (m == InputTag::kCurrentProcess) {
102  }
103  if (!skipCurrentProcess) {
104  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
105  m_tokenLabels.push_back('\0');
106  } else {
107  m_tokenLabels.push_back('\0');
108  }
109  }
110  return index;
111 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
static const std::string kCurrentProcess
Definition: InputTag.h:54
std::vector< char > m_tokenLabels
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const

◆ recordESConsumes()

ESTokenIndex EDConsumerBase::recordESConsumes ( Transition  iTrans,
eventsetup::EventSetupRecordKey const &  iRecord,
eventsetup::heterocontainer::HCTypeTag const &  iDataType,
edm::ESInputTag const &  iTag 
)
private

Definition at line 189 of file EDConsumerBase.cc.

References edm::ESInputTag::data(), esItemsToGetFromTransition_, esRecordsToGetFromTransition_, frozen_, visualization-live-secondInstance_cfg::m, m_esTokenInfo, m_tokenLabels, edm::ESInputTag::module(), edm::NumberOfEventSetupTransitions, AlCaHLTBitMon_QueryRunRegistry::string, throwESConsumesCallAfterFrozen(), and throwESConsumesInProcessBlock().

Referenced by esConsumes().

192  {
193  if (frozen_) {
194  throwESConsumesCallAfterFrozen(iRecord, iDataType, iTag);
195  }
196 
197  //m_tokenLabels first entry is a null. Since most ES data requests have
198  // empty labels we will assume we can reuse the first entry
199  unsigned int startOfComponentName = 0;
200  if (not iTag.module().empty()) {
201  startOfComponentName = m_tokenLabels.size();
202 
203  m_tokenLabels.reserve(m_tokenLabels.size() + iTag.module().size() + 1);
204  {
205  const std::string& m = iTag.module();
206  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
207  m_tokenLabels.push_back('\0');
208  }
209  }
210 
211  auto index = static_cast<ESResolverIndex::Value_t>(m_esTokenInfo.size());
212  m_esTokenInfo.emplace_back(
213  ESTokenLookupInfo{iRecord, eventsetup::DataKey{iDataType, iTag.data().c_str()}, startOfComponentName},
214  ESResolverIndex{-1});
217  }
218  auto indexForToken = esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)].size();
219  esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)].emplace_back(-1 * (index + 1));
220  esRecordsToGetFromTransition_[static_cast<unsigned int>(iTrans)].emplace_back();
221  return ESTokenIndex{static_cast<ESTokenIndex::Value_t>(indexForToken)};
222 }
size
Write out results.
void throwESConsumesInProcessBlock() const
void throwESConsumesCallAfterFrozen(eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
std::vector< char > m_tokenLabels
edm::SoATuple< ESTokenLookupInfo, ESResolverIndex > m_esTokenInfo

◆ registeredToConsume()

bool EDConsumerBase::registeredToConsume ( ProductResolverIndex  iIndex,
bool  skipCurrentProcess,
BranchType  iBranch 
) const
Returns
true if the product corresponding to the index was registered via consumes or mayConsume call

Definition at line 323 of file EDConsumerBase.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, kLookupInfo, and m_tokenInfo.

325  {
326  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd; ++it) {
327  if (it->m_index.productResolverIndex() == iIndex and it->m_index.skipCurrentProcess() == skipCurrentProcess and
328  it->m_branchType == iBranch) {
329  return true;
330  }
331  }
332  return false;
333 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo

◆ registerLateConsumes()

virtual void edm::EDConsumerBase::registerLateConsumes ( eventsetup::ESRecordsToProductResolverIndices const &  )
inlineprivatevirtual

Reimplemented in FWLiteESRecordWriterAnalyzer, and edm::EventSetupRecordDataGetter.

Definition at line 232 of file EDConsumerBase.h.

Referenced by updateLookup().

232 {}

◆ resetItemsToGetFrom()

void edm::EDConsumerBase::resetItemsToGetFrom ( BranchType  iType)
inlineprotected

Definition at line 228 of file EDConsumerBase.h.

References itemsToGetFromBranch_.

Referenced by edm::core::OutputModuleCore::doBeginJob_().

228 { itemsToGetFromBranch_[iType].clear(); }
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_

◆ selectInputProcessBlocks()

void edm::EDConsumerBase::selectInputProcessBlocks ( ProductRegistry const &  productRegistry,
ProcessBlockHelperBase const &  processBlockHelperBase 
)
inline

Definition at line 105 of file EDConsumerBase.h.

References doSelectInputProcessBlocks().

106  {
107  doSelectInputProcessBlocks(productRegistry, processBlockHelperBase);
108  }
virtual void doSelectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &)

◆ throwBadToken()

void EDConsumerBase::throwBadToken ( edm::TypeID const &  iType,
EDGetToken  iToken 
) const
private

Definition at line 348 of file EDConsumerBase.cc.

References edm::TypeID::className(), Exception, edm::EDGetToken::index(), and edm::EDGetToken::isUninitialized().

Referenced by indexFrom().

348  {
349  if (iToken.isUninitialized()) {
350  throw cms::Exception("BadToken") << "A get using a EDGetToken with the C++ type '" << iType.className()
351  << "' was made using an uninitialized token.\n Please check that the variable is "
352  "being initialized from a 'consumes' call.";
353  }
354  throw cms::Exception("BadToken")
355  << "A get using a EDGetToken with the C++ type '" << iType.className() << "' was made using a token with a value "
356  << iToken.index()
357  << " which is beyond the range used by this module.\n Please check that the variable is being initialized from a "
358  "'consumes' call from this module.\n You can not share EDGetToken values between modules.";
359 }
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:55

◆ throwBranchMismatch()

void EDConsumerBase::throwBranchMismatch ( BranchType  iBranch,
EDGetToken  iToken 
) const
private

Definition at line 341 of file EDConsumerBase.cc.

References edm::BranchTypeToString(), Exception, edm::EDGetToken::index(), kLookupInfo, and m_tokenInfo.

Referenced by indexFrom().

341  {
342  throw cms::Exception("BranchTypeMismatch")
343  << "A get using a EDGetToken was done in " << BranchTypeToString(iBranch) << " but the consumes call was for "
344  << BranchTypeToString(m_tokenInfo.get<kLookupInfo>(iToken.index()).m_branchType)
345  << ".\n Please modify the consumes call to use the correct branch type.";
346 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54
std::string const & BranchTypeToString(BranchType const &branchType)
Definition: BranchType.cc:93

◆ throwConsumesCallAfterFrozen()

void EDConsumerBase::throwConsumesCallAfterFrozen ( TypeToGet const &  typeToGet,
InputTag const &  inputTag 
) const
private

Definition at line 361 of file EDConsumerBase.cc.

References Exception, SimL1EmulatorRepack_Full_cff::inputTag, and edm::TypeToGet::type().

Referenced by recordConsumes().

361  {
362  throw cms::Exception("LogicError") << "A module declared it consumes a product after its constructor.\n"
363  << "This must be done in the contructor\n"
364  << "The product type was: " << typeToGet.type() << "\n"
365  << "and " << inputTag << "\n";
366 }

◆ throwESConsumesCallAfterFrozen()

void EDConsumerBase::throwESConsumesCallAfterFrozen ( eventsetup::EventSetupRecordKey const &  iRecord,
eventsetup::heterocontainer::HCTypeTag const &  iDataType,
edm::ESInputTag const &  iTag 
) const
private

Definition at line 368 of file EDConsumerBase.cc.

References Exception, edm::eventsetup::heterocontainer::HCTypeTag::name(), and edm::eventsetup::EventSetupRecordKey::type().

Referenced by recordESConsumes().

370  {
371  throw cms::Exception("LogicError") << "A module declared it consumes an EventSetup product after its constructor.\n"
372  << "This must be done in the contructor\n"
373  << "The product type was: " << iDataType.name() << " in record "
374  << iRecord.type().name() << "\n"
375  << "and ESInputTag was " << iTag << "\n";
376 }

◆ throwESConsumesInProcessBlock()

void EDConsumerBase::throwESConsumesInProcessBlock ( ) const
private

Definition at line 378 of file EDConsumerBase.cc.

References Exception.

Referenced by recordESConsumes().

378  {
379  throw cms::Exception("LogicError")
380  << "A module declared it consumes an EventSetup product during a ProcessBlock transition.\n"
381  << "EventSetup products can only be consumed in Event, Lumi, or Run transitions.\n";
382 }

◆ throwTypeMismatch()

void EDConsumerBase::throwTypeMismatch ( edm::TypeID const &  iType,
EDGetToken  iToken 
) const
private

Definition at line 335 of file EDConsumerBase.cc.

References edm::TypeID::className(), Exception, edm::EDGetToken::index(), kLookupInfo, and m_tokenInfo.

Referenced by indexFrom().

335  {
336  throw cms::Exception("TypeMismatch") << "A get using a EDGetToken used the C++ type '" << iType.className()
337  << "' but the consumes call was for type '"
338  << m_tokenInfo.get<kLookupInfo>(iToken.index()).m_type.className()
339  << "'.\n Please modify either the consumes or get call so the types match.";
340 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54

◆ uncheckedIndexFrom()

ProductResolverIndexAndSkipBit EDConsumerBase::uncheckedIndexFrom ( EDGetToken  iToken) const

Definition at line 246 of file EDConsumerBase.cc.

References edm::EDGetToken::index(), kLookupInfo, and m_tokenInfo.

Referenced by edm::core::OutputModuleCore::productsUsedBySelection().

246  {
247  return m_tokenInfo.get<kLookupInfo>(iToken.index()).m_index;
248 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
constexpr unsigned int index() const noexcept
Definition: EDGetToken.h:54

◆ updateLookup() [1/2]

void EDConsumerBase::updateLookup ( BranchType  iBranchType,
ProductResolverIndexHelper const &  iHelper,
bool  iPrefetchMayGet 
)

Definition at line 115 of file EDConsumerBase.cc.

References cms::cuda::assert(), containsCurrentProcessAlias_, extendUpdateLookup(), frozen_, edm::ProductResolverIndexHelper::index(), itemsMayGet(), itemsToGet(), itemsToGetFromBranch_, kKind, kLabels, kLookupInfo, m_tokenInfo, m_tokenLabels, and HerwigMaxPtPartonFilter_cfi::moduleLabel.

Referenced by edm::SubProcess::beginJob().

117  {
118  frozen_ = true;
120  extendUpdateLookup(iBranchType, iHelper);
121  {
122  auto itKind = m_tokenInfo.begin<kKind>();
123  auto itLabels = m_tokenInfo.begin<kLabels>();
124  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
125  ++itInfo, ++itKind, ++itLabels) {
126  if (itInfo->m_branchType == iBranchType) {
127  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
128  const char* moduleLabel = &(m_tokenLabels[labelStart]);
129  itInfo->m_index = ProductResolverIndexAndSkipBit(iHelper.index(*itKind,
130  itInfo->m_type,
131  moduleLabel,
132  moduleLabel + itLabels->m_deltaToProductInstance,
133  moduleLabel + itLabels->m_deltaToProcessName),
134  itInfo->m_index.skipCurrentProcess());
135  }
136  }
137  }
138 
139  m_tokenInfo.shrink_to_fit();
140 
141  itemsToGet(iBranchType, itemsToGetFromBranch_[iBranchType]);
142  if (iPrefetchMayGet) {
143  itemsMayGet(iBranchType, itemsToGetFromBranch_[iBranchType]);
144  }
145 }
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
virtual void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &)
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
assert(be >=bs)
std::vector< char > m_tokenLabels
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_

◆ updateLookup() [2/2]

void EDConsumerBase::updateLookup ( eventsetup::ESRecordsToProductResolverIndices const &  iPI)

Definition at line 147 of file EDConsumerBase.cc.

References edm::eventsetup::ESRecordsToProductResolverIndices::component(), esItemsToGetFromTransition_, esRecordsToGetFromTransition_, frozen_, edm::eventsetup::ESRecordsToProductResolverIndices::indexInRecord(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mps_monitormerge::items, kESLookupInfo, kESResolverIndex, m_esTokenInfo, m_tokenLabels, edm::eventsetup::ESRecordsToProductResolverIndices::missingResolverIndex(), edm::eventsetup::ESRecordsToProductResolverIndices::recordIndexFor(), and registerLateConsumes().

147  {
148  // temporarily unfreeze to allow late EventSetup consumes registration
149  frozen_ = false;
151  frozen_ = true;
152 
153  unsigned int index = 0;
154  for (auto it = m_esTokenInfo.begin<kESLookupInfo>(); it != m_esTokenInfo.end<kESLookupInfo>(); ++it, ++index) {
155  auto indexInRecord = iPI.indexInRecord(it->m_record, it->m_key);
157  const char* componentName = &(m_tokenLabels[it->m_startOfComponentName]);
158  if (*componentName) {
159  auto component = iPI.component(it->m_record, it->m_key);
160  if (component->label_.empty()) {
161  if (component->type_ != componentName) {
163  }
164  } else if (component->label_ != componentName) {
166  }
167  }
168  }
169  m_esTokenInfo.get<kESResolverIndex>(index) = indexInRecord;
170 
171  int negIndex = -1 * (index + 1);
172  for (auto& items : esItemsToGetFromTransition_) {
173  for (auto& itemIndex : items) {
174  if (itemIndex.value() == negIndex) {
175  itemIndex = indexInRecord;
176  esRecordsToGetFromTransition_[&items - &esItemsToGetFromTransition_.front()][&itemIndex - &items.front()] =
177  iPI.recordIndexFor(it->m_record);
178  negIndex = 1;
179  break;
180  }
181  }
182  if (negIndex > 0) {
183  break;
184  }
185  }
186  }
187 }
static constexpr ESResolverIndex missingResolverIndex() noexcept
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
std::vector< char > m_tokenLabels
virtual void registerLateConsumes(eventsetup::ESRecordsToProductResolverIndices const &)
edm::SoATuple< ESTokenLookupInfo, ESResolverIndex > m_esTokenInfo

Friends And Related Function Documentation

◆ ConsumesCollector

friend class ConsumesCollector
friend

Definition at line 146 of file EDConsumerBase.h.

◆ EDConsumerBaseAdaptor

template<BranchType B>
friend class EDConsumerBaseAdaptor
friend

Definition at line 152 of file EDConsumerBase.h.

◆ EDConsumerBaseESAdaptor

template<Transition Tr>
friend class EDConsumerBaseESAdaptor
friend

Definition at line 148 of file EDConsumerBase.h.

◆ EDConsumerBaseWithTagESAdaptor

template<Transition Tr>
friend class EDConsumerBaseWithTagESAdaptor
friend

Definition at line 150 of file EDConsumerBase.h.

◆ WillGetIfMatch

template<typename T >
friend class WillGetIfMatch
friend

Definition at line 154 of file EDConsumerBase.h.

Member Data Documentation

◆ containsCurrentProcessAlias_

bool edm::EDConsumerBase::containsCurrentProcessAlias_
private

Definition at line 308 of file EDConsumerBase.h.

Referenced by convertCurrentProcessAlias(), recordConsumes(), and updateLookup().

◆ esItemsToGetFromTransition_

std::array<std::vector<ESResolverIndex>, static_cast<unsigned int>edm::Transition::NumberOfEventSetupTransitions)> edm::EDConsumerBase::esItemsToGetFromTransition_
private

◆ esRecordsToGetFromTransition_

std::array<std::vector<ESRecordIndex>, static_cast<unsigned int>edm::Transition::NumberOfEventSetupTransitions)> edm::EDConsumerBase::esRecordsToGetFromTransition_
private

Definition at line 306 of file EDConsumerBase.h.

Referenced by esGetTokenRecordIndicesVector(), recordESConsumes(), and updateLookup().

◆ frozen_

bool edm::EDConsumerBase::frozen_
private

◆ itemsToGetFromBranch_

std::array<std::vector<ProductResolverIndexAndSkipBit>, edm::NumBranchTypes> edm::EDConsumerBase::itemsToGetFromBranch_
private

Definition at line 284 of file EDConsumerBase.h.

Referenced by itemsToGetFrom(), resetItemsToGetFrom(), and updateLookup().

◆ m_esTokenInfo

edm::SoATuple<ESTokenLookupInfo, ESResolverIndex> edm::EDConsumerBase::m_esTokenInfo
private

Definition at line 302 of file EDConsumerBase.h.

Referenced by labelFor(), recordESConsumes(), and updateLookup().

◆ m_tokenInfo

edm::SoATuple<TokenLookupInfo, bool, LabelPlacement, edm::KindOfType> edm::EDConsumerBase::m_tokenInfo
private

◆ m_tokenLabels

std::vector<char> edm::EDConsumerBase::m_tokenLabels
private