#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::pair< std::string, std::string > > const & | aliasToOriginal () 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 const > | productLookup (BranchType branchType) const |
std::shared_ptr< ProductResolverIndexHelper > | productLookup (BranchType branchType) |
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 | 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_ |
author Stefano ARGIRO author Bill Tanenbaum
Definition at line 34 of file ProductRegistry.h.
typedef std::map<BranchKey, BranchDescription const> edm::ProductRegistry::ConstProductList |
Definition at line 48 of file ProductRegistry.h.
typedef std::map<BranchKey, BranchDescription> edm::ProductRegistry::ProductList |
Definition at line 37 of file ProductRegistry.h.
edm::ProductRegistry::ProductRegistry | ( | ) |
Definition at line 33 of file ProductRegistry.cc.
|
explicit |
Definition at line 71 of file ProductRegistry.cc.
References freezeIt().
|
inlinevirtual |
Definition at line 46 of file ProductRegistry.h.
|
privatevirtual |
Reimplemented in edm::SignallingProductRegistry.
Definition at line 212 of file ProductRegistry.cc.
Referenced by addLabelAlias(), addProduct(), and freezeIt().
void edm::ProductRegistry::addLabelAlias | ( | BranchDescription const & | productdesc, |
std::string const & | labelAlias, | ||
std::string const & | instanceAlias | ||
) |
Definition at line 120 of file ProductRegistry.cc.
References addCalled(), edm::ProductRegistry::Transients::aliasToOriginal_, edm::BranchDescription::branchID(), edm::BranchID::isValid(), edm::BranchDescription::moduleLabel(), edm::BranchDescription::produced(), productList_, throwIfFrozen(), and transient_.
void edm::ProductRegistry::addProduct | ( | BranchDescription const & | productdesc, |
bool | iFromListener = false |
||
) |
Definition at line 78 of file ProductRegistry.cc.
References addCalled(), edm::BranchDescription::branchType(), edm::errors::Configuration, Exception, edm::errors::LogicError, edm::BranchDescription::processName(), edm::BranchDescription::produced(), productList_, and throwIfFrozen().
Referenced by edm::ProductRegistryHelper::addToRegistry().
|
inline |
Definition at line 120 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::aliasToOriginal_, getNextIndexValue(), and transient_.
Referenced by edm::EDConsumerBase::throwConsumesCallAfterFrozen().
std::vector< BranchDescription const * > edm::ProductRegistry::allBranchDescriptions | ( | ) | const |
Definition at line 227 of file ProductRegistry.cc.
References productList(), mps_fire::result, and size().
Referenced by edm::RootFile::dropOnInput(), productListUpdator(), edm::SubProcess::selectProducts(), edm::OutputModule::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 216 of file ProductRegistry.cc.
References productList(), mps_fire::result, and size().
Referenced by productListUpdator().
|
inline |
Definition at line 118 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 150 of file ProductRegistry.cc.
References productList_, and throwIfNotFrozen().
Referenced by size().
|
inline |
Definition at line 96 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 496 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(), and edm::wrappedClassName().
Referenced by freezeIt(), and initializeLookupTables().
|
private |
Definition at line 576 of file ProductRegistry.cc.
References edm::errors::Configuration, Exception, edm::BranchDescription::processName(), and edm::BranchDescription::produced().
Referenced by freezeIt(), and initializeLookupTables().
void edm::ProductRegistry::copyProduct | ( | BranchDescription const & | productdesc | ) |
Definition at line 136 of file ProductRegistry.cc.
References edm::combinable(), gen::k, edm::BranchDescription::produced(), productList_, and throwIfFrozen().
Referenced by edm::DaqProvenanceHelper::daqInit(), edm::LHEProvenanceHelper::LHEProvenanceHelper(), edm::RootFile::RootFile(), and updateFromInput().
|
inlineprivate |
Definition at line 165 of file ProductRegistry.h.
References addCalled(), checkDictionariesOfConsumedTypes(), checkForDuplicateProcessName(), frozen(), edm::ProductRegistry::Transients::frozen_, initializeLookupTables(), genParticles_cff::map, nextIndexValue(), modifiedElectrons_cfi::processName, AlCaHLTBitMon_QueryRunRegistry::string, throwIfFrozen(), throwIfNotFrozen(), and transient_.
Referenced by ProductRegistry(), and setFrozen().
|
inline |
Definition at line 128 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 605 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::eventNextIndexValue_, edm::InEvent, edm::InLumi, edm::ProductRegistry::Transients::lumiNextIndexValue_, edm::ProductRegistry::Transients::runNextIndexValue_, and transient_.
Referenced by aliasToOriginal(), initializeLookupTables(), and merge().
ProductResolverIndex edm::ProductRegistry::indexFrom | ( | BranchID const & | iID | ) | const |
Definition at line 590 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::branchIDToIndex_, edm::ProductResolverIndexInvalid, and transient_.
Referenced by size().
|
private |
Definition at line 329 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::branchIDToIndex_, edm::checkClassDictionaries(), checkDictionariesOfConsumedTypes(), edm::checkDictionary(), edm::checkDictionaryOfWrappedType(), checkForDuplicateProcessName(), edm::ProductRegistry::Transients::eventNextIndexValue_, edm::productholderindexhelper::getContainedTypeFromWrapper(), getNextIndexValue(), edm::InEvent, edm::InLumi, edm::InRun, edm::eventsetup::heterocontainer::insert(), edm::ProductRegistry::Transients::lumiNextIndexValue_, nextIndexValue(), productList_, productLookup(), edm::public_base_classes(), edm::ProductRegistry::Transients::runNextIndexValue_, setProductProduced(), AlCaHLTBitMon_QueryRunRegistry::string, edm::throwMissingDictionariesException(), and transient_.
Referenced by freezeIt(), and setFrozen().
|
inline |
Definition at line 126 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 284 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::branchIDToIndex_, MillePedeFileConverter_cfg::e, getNextIndexValue(), mps_fire::i, edm::match(), nextIndexValue(), productList(), 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 612 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::eventNextIndexValue_, edm::InEvent, edm::InLumi, edm::ProductRegistry::Transients::lumiNextIndexValue_, edm::ProductRegistry::Transients::runNextIndexValue_, and transient_.
Referenced by freezeIt(), initializeLookupTables(), and merge().
void edm::ProductRegistry::print | ( | std::ostream & | os | ) | const |
Definition at line 598 of file ProductRegistry.cc.
References productList_.
Referenced by edm::operator<<(), and size().
|
inline |
Definition at line 72 of file ProductRegistry.h.
References productList_.
Referenced by edm::Principal::adjustToNewProductRegistry(), allBranchDescriptions(), allBranchNames(), edm::ProductSelector::fillDroppedToKept(), merge(), edm::operator==(), edm::ThinningProducer< Collection, Selector >::registerThinnedAssociations(), edm::RootFile::RootFile(), edm::SubProcess::selectProducts(), edm::OutputModule::selectProducts(), edm::global::OutputModuleBase::selectProducts(), edm::limited::OutputModuleBase::selectProducts(), edm::one::OutputModuleBase::selectProducts(), edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts(), edm::SubProcessParentageHelper::update(), and edm::BranchIDListHelper::updateFromRegistry().
|
inline |
Definition at line 77 of file ProductRegistry.h.
References allBranchDescriptions(), allBranchNames(), productList_, and throwIfFrozen().
Referenced by edm::RootFile::dropOnInput(), edm::ProvenanceAdaptor::fixProcessHistory(), 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 const > edm::ProductRegistry::productLookup | ( | BranchType | branchType | ) | const |
Definition at line 162 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::eventProductLookup(), edm::InEvent, edm::InLumi, edm::ProductRegistry::Transients::lumiProductLookup(), edm::ProductRegistry::Transients::runProductLookup(), and transient_.
Referenced by edm::WorkerManager::beginJob(), edm::Schedule::changeModule(), initializeLookupTables(), edm::EDConsumerBase::modulesWhoseProductsAreConsumed(), and size().
std::shared_ptr< ProductResolverIndexHelper > edm::ProductRegistry::productLookup | ( | BranchType | branchType | ) |
Definition at line 169 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::eventProductLookup(), edm::InEvent, edm::InLumi, edm::ProductRegistry::Transients::lumiProductLookup(), edm::ProductRegistry::Transients::runProductLookup(), and transient_.
|
inline |
Definition at line 117 of file ProductRegistry.h.
References revisionDML::branchType(), edm::ProductRegistry::Transients::productProduced_, and transient_.
void edm::ProductRegistry::setFrozen | ( | bool | initializeLookupInfo = true | ) |
Definition at line 176 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 186 of file ProductRegistry.cc.
References edm::ProductRegistry::Transients::aliasToOriginal_, freezeIt(), frozen(), initializeLookupTables(), edm::sort_all(), and transient_.
|
inlineprivate |
Definition at line 160 of file ProductRegistry.h.
References edm::ProductRegistry::Transients::anyProductProduced_, revisionDML::branchType(), edm::ProductRegistry::Transients::productProduced_, and transient_.
Referenced by initializeLookupTables().
void edm::ProductRegistry::setUnscheduledProducts | ( | std::set< std::string > const & | unscheduledLabels | ) |
Definition at line 252 of file ProductRegistry.cc.
References edm::InEvent, parseEventContent::prod, productList_, jetUpdater_cfi::sort, AlCaHLTBitMon_QueryRunRegistry::string, and throwIfFrozen().
Referenced by edm::SecondaryEventProvider::SecondaryEventProvider().
|
inline |
Definition at line 105 of file ProductRegistry.h.
References anyProducts(), revisionDML::branchType(), indexFrom(), print(), productList_, and productLookup().
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), allBranchDescriptions(), and allBranchNames().
|
private |
Definition at line 196 of file ProductRegistry.cc.
References Exception, and frozen().
Referenced by addLabelAlias(), addProduct(), copyProduct(), freezeIt(), productListUpdator(), and setUnscheduledProducts().
|
private |
Definition at line 204 of file ProductRegistry.cc.
References Exception, and frozen().
Referenced by anyProducts(), and freezeIt().
void edm::ProductRegistry::updateFromInput | ( | ProductList const & | other | ) |
Definition at line 238 of file ProductRegistry.cc.
References copyProduct().
Referenced by edm::StreamerInputSource::mergeIntoRegistry(), edm::RootEmbeddedFileSequence::RootEmbeddedFileSequence(), edm::RootPrimaryFileSequence::RootPrimaryFileSequence(), and edm::RootSecondaryFileSequence::RootSecondaryFileSequence().
void edm::ProductRegistry::updateFromInput | ( | std::vector< BranchDescription > const & | other | ) |
Definition at line 245 of file ProductRegistry.cc.
References copyProduct().
|
private |
Definition at line 185 of file ProductRegistry.h.
Referenced by addLabelAlias(), addProduct(), anyProducts(), callForEachBranch(), copyProduct(), initializeLookupTables(), merge(), print(), productList(), productListUpdator(), setUnscheduledProducts(), and size().
|
private |
Definition at line 186 of file ProductRegistry.h.
Referenced by addLabelAlias(), aliasToOriginal(), anyProductProduced(), freezeIt(), frozen(), getNextIndexValue(), indexFrom(), initializeLookupTables(), initializeTransients(), merge(), nextIndexValue(), productLookup(), productProduced(), setFrozen(), and setProductProduced().