#include <ProductRegistry.h>
Classes | |
struct | Transients |
Public Types | |
typedef std::map< BranchKey, BranchDescription const > | ConstProductList |
typedef std::map< BranchKey, BranchDescription > | ProductList |
Public Member Functions | |
void | addLabelAlias (BranchDescription const &productdesc, std::string const &labelAlias, std::string const &instanceAlias) |
void | addProduct (BranchDescription const &productdesc, bool iFromListener=false) |
std::vector< std::string > | aliasToModules (KindOfType kindOfType, TypeID const &type, std::string_view moduleLabel, std::string_view productInstanceName) const |
std::vector< BranchDescription const * > | allBranchDescriptions () const |
std::vector< std::string > | allBranchNames () const |
bool | anyProductProduced () const |
bool | anyProducts (BranchType const brType) const |
template<typename T > | |
void | callForEachBranch (T const &iFunc) |
void | copyProduct (BranchDescription const &productdesc) |
bool | frozen () const |
ProductResolverIndex const & | getNextIndexValue (BranchType branchType) const |
ProductResolverIndex | indexFrom (BranchID const &iID) const |
void | initializeTransients () |
std::string | merge (ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive) |
void | print (std::ostream &os) const |
ProductList const & | productList () const |
ProductList & | productListUpdator () |
std::shared_ptr< ProductResolverIndexHelper > | productLookup (BranchType branchType) |
std::shared_ptr< ProductResolverIndexHelper const > | productLookup (BranchType branchType) const |
bool | productProduced (BranchType branchType) const |
ProductRegistry () | |
ProductRegistry (ProductList const &productList, bool toBeFrozen=true) | |
void | setFrozen (bool initializeLookupInfo=true) |
void | setFrozen (std::set< TypeID > const &productTypesConsumed, std::set< TypeID > const &elementTypesConsumed, std::string const &processName) |
void | setUnscheduledProducts (std::set< std::string > const &unscheduledLabels) |
ProductList::size_type | size () const |
void | updateFromInput (ProductList const &other) |
void | updateFromInput (std::vector< BranchDescription > const &other) |
virtual | ~ProductRegistry () |
Private Member Functions | |
virtual void | addCalled (BranchDescription const &, bool iFromListener) |
void | addElementTypesForAliases (std::set< TypeID > const *elementTypesConsumed, std::map< TypeID, TypeID > const &containedTypeMap, std::map< TypeID, std::vector< TypeWithDict >> const &containedTypeToBaseTypesMap) |
void | checkDictionariesOfConsumedTypes (std::set< TypeID > const *productTypesConsumed, std::set< TypeID > const *elementTypesConsumed, std::map< TypeID, TypeID > const &containedTypeMap, std::map< TypeID, std::vector< TypeWithDict >> &containedTypeToBaseTypesMap) |
void | checkForDuplicateProcessName (BranchDescription const &desc, std::string const *processName) const |
void | freezeIt (bool frozen=true) |
void | initializeLookupTables (std::set< TypeID > const *productTypesConsumed, std::set< TypeID > const *elementTypesConsumed, std::string const *processName) |
ProductResolverIndex & | nextIndexValue (BranchType branchType) |
void | setProductProduced (BranchType branchType) |
void | throwIfFrozen () const |
void | throwIfNotFrozen () const |
Private Attributes | |
ProductList | productList_ |
Transients | transient_ |
\original author Stefano ARGIRO \current author Bill Tanenbaum
Definition at line 37 of file ProductRegistry.h.
typedef std::map<BranchKey, BranchDescription const> edm::ProductRegistry::ConstProductList |
Definition at line 50 of file ProductRegistry.h.
typedef std::map<BranchKey, BranchDescription> edm::ProductRegistry::ProductList |
Definition at line 39 of file ProductRegistry.h.
edm::ProductRegistry::ProductRegistry | ( | ) |
Definition at line 32 of file ProductRegistry.cc.
|
explicit |
Definition at line 63 of file ProductRegistry.cc.
References freezeIt().
|
inlinevirtual |
Definition at line 48 of file ProductRegistry.h.
|
privatevirtual |
Reimplemented in edm::SignallingProductRegistry.
Definition at line 187 of file ProductRegistry.cc.
Referenced by addLabelAlias(), and addProduct().
|
private |
Definition at line 465 of file ProductRegistry.cc.
References cms::Exception::addContext(), edm::ProductRegistry::Transients::aliasToOriginal_, edm::ELEMENT_TYPE, B2GTnPMonitor_cfi::item, edm::errors::LogicError, transient_, and edm::TypeWithDict::typeInfo().
Referenced by initializeLookupTables().
void edm::ProductRegistry::addLabelAlias | ( | BranchDescription const & | productdesc, |
std::string const & | labelAlias, | ||
std::string const & | instanceAlias | ||
) |
Definition at line 108 of file ProductRegistry.cc.
References addCalled(), edm::ProductRegistry::Transients::aliasToOriginal_, cms::cuda::assert(), edm::BranchDescription::branchID(), edm::BranchID::isValid(), edm::BranchDescription::moduleLabel(), edm::BranchDescription::produced(), edm::PRODUCT_TYPE, productList_, runTheMatrix::ret, throwIfFrozen(), transient_, and edm::BranchDescription::unwrappedTypeID().
void edm::ProductRegistry::addProduct | ( | BranchDescription const & | productdesc, |
bool | iFromListener = false |
||
) |
Definition at line 68 of file ProductRegistry.cc.
References addCalled(), cms::cuda::assert(), edm::BranchDescription::branchType(), edm::errors::Configuration, Exception, edm::errors::LogicError, callgraph::previous, edm::BranchDescription::processName(), edm::BranchDescription::produced(), productList_, runTheMatrix::ret, and throwIfFrozen().
Referenced by edm::ProductRegistryHelper::addToRegistry().
std::vector< std::string > edm::ProductRegistry::aliasToModules | ( | KindOfType | kindOfType, |
TypeID const & | type, | ||
std::string_view | moduleLabel, | ||
std::string_view | productInstanceName | ||
) | const |
Definition at line 613 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::aliasToOriginal_, newFWLiteAna::found, B2GTnPMonitor_cfi::item, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, HerwigMaxPtPartonFilter_cfi::moduleLabel, runTheMatrix::ret, filterCSVwithJSON::target, and transient_.
std::vector< BranchDescription const * > edm::ProductRegistry::allBranchDescriptions | ( | ) | const |
Definition at line 199 of file ProductRegistry.cc.
References productList(), mps_fire::result, and size().
Referenced by edm::RootFile::dropOnInput(), edm::SubProcess::selectProducts(), edm::global::OutputModuleBase::selectProducts(), edm::limited::OutputModuleBase::selectProducts(), edm::one::OutputModuleBase::selectProducts(), and edm::PrincipalGetAdapter::throwUnregisteredPutException().
std::vector< std::string > edm::ProductRegistry::allBranchNames | ( | ) | const |
Definition at line 189 of file ProductRegistry.cc.
References productList(), mps_fire::result, and size().
|
inline |
Definition at line 122 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::anyProductProduced_, and transient_.
Referenced by edm::SubProcess::processAsync().
bool edm::ProductRegistry::anyProducts | ( | BranchType const | brType | ) | const |
Definition at line 135 of file ProductRegistry.cc.
References productList_, and throwIfNotFrozen().
|
inline |
Definition at line 100 of file ProductRegistry.h.
References productList_.
Referenced by edm::ProducerBase::registerProducts(), edm::stream::EDAnalyzerBase::registerProductsAndCallbacks(), edm::EDAnalyzer::registerProductsAndCallbacks(), edm::one::EDAnalyzerBase::registerProductsAndCallbacks(), edm::global::EDAnalyzerBase::registerProductsAndCallbacks(), and edm::limited::EDAnalyzerBase::registerProductsAndCallbacks().
|
private |
Definition at line 514 of file ProductRegistry.cc.
References edm::TypeWithDict::byName(), edm::checkClassDictionaries(), edm::checkDictionary(), edm::TypeID::className(), edm::productholderindexhelper::getContainedTypeFromWrapper(), edm::public_base_classes(), AlCaHLTBitMon_QueryRunRegistry::string, edm::throwMissingDictionariesException(), pfClustersFromHGC3DClusters_cfi::wp, and edm::wrappedClassName().
Referenced by initializeLookupTables().
|
private |
Definition at line 594 of file ProductRegistry.cc.
References edm::errors::Configuration, submitPVResolutionJobs::desc, Exception, and SimL1EmulatorRepack_CalouGT_cff::processName.
Referenced by initializeLookupTables().
void edm::ProductRegistry::copyProduct | ( | BranchDescription const & | productdesc | ) |
Definition at line 122 of file ProductRegistry.cc.
References cms::cuda::assert(), edm::combinable(), dqmdumpme::k, edm::BranchDescription::produced(), productList_, and throwIfFrozen().
Referenced by edm::DaqProvenanceHelper::daqInit(), edm::LHEProvenanceHelper::LHEProvenanceHelper(), edm::RootFile::RootFile(), and updateFromInput().
|
inlineprivate |
Definition at line 168 of file ProductRegistry.h.
References frozen(), edm::ProductRegistry::Transients::frozen_, and transient_.
Referenced by ProductRegistry(), and setFrozen().
|
inline |
Definition at line 140 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::frozen_, and transient_.
Referenced by freezeIt(), edm::StreamerInputSource::mergeIntoRegistry(), setFrozen(), throwIfFrozen(), and throwIfNotFrozen().
ProductResolverIndex const & edm::ProductRegistry::getNextIndexValue | ( | BranchType | branchType | ) | const |
Definition at line 642 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::nextIndexValues_, and transient_.
Referenced by initializeLookupTables(), and merge().
ProductResolverIndex edm::ProductRegistry::indexFrom | ( | BranchID const & | iID | ) | const |
Definition at line 605 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::branchIDToIndex_, edm::ProductResolverIndexInvalid, and transient_.
|
private |
Definition at line 295 of file ProductRegistry.cc.
References addElementTypesForAliases(), edm::ProductRegistry::Transients::branchIDToIndex_, edm::checkClassDictionaries(), checkDictionariesOfConsumedTypes(), edm::checkDictionary(), edm::checkDictionaryOfWrappedType(), checkForDuplicateProcessName(), submitPVResolutionJobs::desc, edm::productholderindexhelper::getContainedTypeFromWrapper(), getNextIndexValue(), edm::eventsetup::heterocontainer::insert(), nextIndexValue(), edm::ProductRegistry::Transients::nextIndexValues_, SimL1EmulatorRepack_CalouGT_cff::processName, productList_, productLookup(), edm::ProductRegistry::Transients::productLookups_, edm::public_base_classes(), setProductProduced(), AlCaHLTBitMon_QueryRunRegistry::string, edm::throwMissingDictionariesException(), and transient_.
Referenced by setFrozen().
|
inline |
Definition at line 138 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::reset(), and transient_.
std::string edm::ProductRegistry::merge | ( | ProductRegistry const & | other, |
std::string const & | fileName, | ||
BranchDescription::MatchMode | branchesMustMatch = BranchDescription::Permissive |
||
) |
Definition at line 250 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::branchIDToIndex_, MillePedeFileConverter_cfg::e, MillePedeFileConverter_cfg::fileName, getNextIndexValue(), mps_fire::i, dqmiolumiharvest::j, edm::match(), nextIndexValue(), trackingPlots::other, productList_, alignCSCRings::s, edm::BranchDescription::Strict, AlCaHLTBitMon_QueryRunRegistry::string, and transient_.
Referenced by edm::StreamerInputSource::mergeIntoRegistry(), edm::RootPrimaryFileSequence::nextFile(), and edm::RootPrimaryFileSequence::previousFile().
|
private |
Definition at line 646 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::nextIndexValues_, and transient_.
Referenced by initializeLookupTables(), and merge().
void edm::ProductRegistry::print | ( | std::ostream & | os | ) | const |
|
inline |
Definition at line 76 of file ProductRegistry.h.
References productList_.
Referenced by edm::Principal::adjustToNewProductRegistry(), allBranchDescriptions(), allBranchNames(), edm::ProductSelector::fillDroppedToKept(), edm::ThinningProducer< Collection, Selector >::registerThinnedAssociations(), edm::RootFile::RootFile(), edm::SubProcess::selectProducts(), edm::global::OutputModuleBase::selectProducts(), edm::limited::OutputModuleBase::selectProducts(), edm::one::OutputModuleBase::selectProducts(), edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts(), edm::ProductProvenanceRetriever::setupEntryInfoSet(), edm::SubProcessParentageHelper::update(), and edm::BranchIDListHelper::updateFromRegistry().
|
inline |
Definition at line 81 of file ProductRegistry.h.
References productList_, and throwIfFrozen().
Referenced by edm::RootFile::dropOnInput(), edm::PoolSource::PoolSource(), edm::RootFile::RootFile(), fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), fwlite::internal::BranchMapReaderStrategyV1::updateMap(), and ProvenanceDumper::work_().
std::shared_ptr< ProductResolverIndexHelper > edm::ProductRegistry::productLookup | ( | BranchType | branchType | ) |
Definition at line 149 of file ProductRegistry.cc.
References edm::get_underlying_safe(), edm::ProductRegistry::Transients::productLookups_, and transient_.
std::shared_ptr< ProductResolverIndexHelper const > edm::ProductRegistry::productLookup | ( | BranchType | branchType | ) | const |
Definition at line 145 of file ProductRegistry.cc.
References edm::get_underlying_safe(), edm::ProductRegistry::Transients::productLookups_, and transient_.
Referenced by edm::WorkerManager::beginJob(), edm::Schedule::changeModule(), initializeLookupTables(), and edm::EDConsumerBase::modulesWhoseProductsAreConsumed().
|
inline |
Definition at line 121 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::productProduced_, and transient_.
void edm::ProductRegistry::setFrozen | ( | bool | initializeLookupInfo = true | ) |
Definition at line 153 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::aliasToOriginal_, freezeIt(), frozen(), initializeLookupTables(), edm::sort_all(), and transient_.
Referenced by fwlite::internal::BranchMapReaderStrategyV8::updateFile(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), and fwlite::internal::BranchMapReaderStrategyV1::updateMap().
void edm::ProductRegistry::setFrozen | ( | std::set< TypeID > const & | productTypesConsumed, |
std::set< TypeID > const & | elementTypesConsumed, | ||
std::string const & | processName | ||
) |
Definition at line 163 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::aliasToOriginal_, freezeIt(), frozen(), initializeLookupTables(), SimL1EmulatorRepack_CalouGT_cff::processName, edm::sort_all(), and transient_.
|
inlineprivate |
Definition at line 163 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::anyProductProduced_, edm::ProductRegistry::Transients::productProduced_, and transient_.
Referenced by initializeLookupTables().
void edm::ProductRegistry::setUnscheduledProducts | ( | std::set< std::string > const & | unscheduledLabels | ) |
Definition at line 221 of file ProductRegistry.cc.
References edm::InEvent, dumpMFGeometry_cfg::prod, productList_, jetUpdater_cfi::sort, and throwIfFrozen().
Referenced by edm::SecondaryEventProvider::SecondaryEventProvider().
|
inline |
Definition at line 109 of file ProductRegistry.h.
References productList_.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), allBranchDescriptions(), and allBranchNames().
|
private |
Definition at line 173 of file ProductRegistry.cc.
References Exception, and frozen().
Referenced by addLabelAlias(), addProduct(), copyProduct(), productListUpdator(), and setUnscheduledProducts().
|
private |
Definition at line 180 of file ProductRegistry.cc.
References Exception, and frozen().
Referenced by anyProducts().
void edm::ProductRegistry::updateFromInput | ( | ProductList const & | other | ) |
Definition at line 209 of file ProductRegistry.cc.
References copyProduct(), and trackingPlots::other.
Referenced by edm::StreamerInputSource::mergeIntoRegistry(), edm::RepeatingCachedRootSource::RepeatingCachedRootSource(), edm::RootEmbeddedFileSequence::RootEmbeddedFileSequence(), edm::RootPrimaryFileSequence::RootPrimaryFileSequence(), and edm::RootSecondaryFileSequence::RootSecondaryFileSequence().
void edm::ProductRegistry::updateFromInput | ( | std::vector< BranchDescription > const & | other | ) |
Definition at line 215 of file ProductRegistry.cc.
References copyProduct(), and trackingPlots::other.
|
private |
Definition at line 190 of file ProductRegistry.h.
Referenced by addLabelAlias(), addProduct(), anyProducts(), callForEachBranch(), copyProduct(), initializeLookupTables(), merge(), print(), productList(), productListUpdator(), setUnscheduledProducts(), and size().
|
private |
Definition at line 191 of file ProductRegistry.h.
Referenced by addElementTypesForAliases(), addLabelAlias(), aliasToModules(), anyProductProduced(), freezeIt(), frozen(), getNextIndexValue(), indexFrom(), initializeLookupTables(), initializeTransients(), merge(), nextIndexValue(), productLookup(), productProduced(), setFrozen(), and setProductProduced().