LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "Principal.h"
Public Types | |
using | GroupCollection = std::map< ProductID, std::unique_ptr< Group >> |
using | const_iterator = GroupCollection::const_iterator |
using | ProcessNameConstIterator = ProcessHistory::const_iterator |
using | GroupQueryResultVec = std::vector< GroupQueryResult > |
using | size_type = GroupCollection::size_type |
using | ProcessName = std::string |
Protected Member Functions | |
BranchMapper & | branchMapper () |
DelayedReader & | productReader () |
void | fillGroup (std::unique_ptr< Group > &&group) |
int | tryNextSecondaryFile () const |
cet::exempt_ptr< Group const > | getGroupForPtr (ProductID const pid) const |
cet::exempt_ptr< Group const > | getGroup (ProductID const pid) const |
cet::exempt_ptr< Group const > | getResolvedGroup (ProductID const pid, bool resolveProd) const |
Private Member Functions | |
virtual ProcessHistoryID const & | processHistoryID () const =0 |
virtual void | setProcessHistoryID (ProcessHistoryID const &)=0 |
GroupQueryResultVec | matchingSequenceFromInputFile (SelectorBase const &) const |
GroupQueryResultVec | findGroupsForProduct (WrappedTypeID const &wrapped, SelectorBase const &, bool stopIfProcessHasMatch) const |
size_t | findGroupsFromInputFile (WrappedTypeID const &wrapped, SelectorBase const &, GroupQueryResultVec &results, bool stopIfProcessHasMatch) const |
size_t | findGroups (ProcessLookup const &, SelectorBase const &, GroupQueryResultVec &results, bool stopIfProcessHasMatch, TypeID wanted_wrapper=TypeID{}) const |
size_t | findGroupsForProcess (std::vector< ProductID > const &vpid, SelectorBase const &selector, GroupQueryResultVec &results, TypeID wanted_wrapper) const |
bool | presentFromSource (ProductID) const |
EDProductGetter const * | deferredGetter_ (ProductID const pid) const |
EDProductGetter const * | getEDProductGetterImpl (ProductID const pid) const final override |
Private Attributes | |
ProcessHistory | processHistory_ {} |
ProcessConfiguration const & | processConfiguration_ |
cet::exempt_ptr< ProductTable const > | presentProducts_ |
cet::exempt_ptr< ProductTable const > | producedProducts_ {nullptr} |
std::map< ProductID, std::shared_ptr< DeferredProductGetter const > > | deferredGetters_ {} |
bool | processHistoryModified_ {false} |
GroupCollection | groups_ {} |
std::unique_ptr< BranchMapper > | branchMapperPtr_ |
std::unique_ptr< DelayedReader > | store_ |
std::vector< std::unique_ptr< Principal > > | secondaryPrincipals_ {} |
int | nextSecondaryFileIdx_ {} |
Definition at line 48 of file Principal.h.
using art::Principal::const_iterator = GroupCollection::const_iterator |
Definition at line 52 of file Principal.h.
using art::Principal::GroupCollection = std::map<ProductID, std::unique_ptr<Group>> |
Definition at line 51 of file Principal.h.
using art::Principal::GroupQueryResultVec = std::vector<GroupQueryResult> |
Definition at line 54 of file Principal.h.
using art::Principal::ProcessName = std::string |
Definition at line 56 of file Principal.h.
Definition at line 53 of file Principal.h.
using art::Principal::size_type = GroupCollection::size_type |
Definition at line 55 of file Principal.h.
|
virtualdefaultnoexcept |
|
delete |
Principal::Principal | ( | ProcessConfiguration const & | pc, |
ProcessHistoryID const & | hist, | ||
cet::exempt_ptr< ProductTable const > | presentProducts, | ||
std::unique_ptr< BranchMapper > && | mapper, | ||
std::unique_ptr< DelayedReader > && | reader | ||
) |
Definition at line 59 of file Principal.cc.
References branchMapperPtr_, art::thread_safe_registry_via_id< K, M >::empty(), art::thread_safe_registry_via_id< K, M >::get(), hist, presentProducts_, processHistory_, store_, and std::swap().
|
inline |
Definition at line 100 of file Principal.h.
References secondaryPrincipals_.
void Principal::addToProcessHistory | ( | ) |
Definition at line 80 of file Principal.cc.
References art::errors::Configuration, art::thread_safe_registry_via_id< K, M >::emplace(), processConfiguration_, processHistory_, processHistoryModified_, art::ProcessConfiguration::processName(), and setProcessHistoryID().
Referenced by cend(), art::EventPrincipal::EventPrincipal(), art::RunPrincipal::RunPrincipal(), art::SubRunPrincipal::SubRunPrincipal(), art::RootOutput::write(), art::RootOutput::writeRun(), and art::RootOutput::writeSubRun().
|
inline |
|
inline |
Definition at line 144 of file Principal.h.
References branchMapperPtr_.
Referenced by fillGroup(), art::detail::KeptProvenance::insertAncestors(), art::ResultsPrincipal::put(), art::RunPrincipal::put(), art::SubRunPrincipal::put(), and art::EventPrincipal::put().
|
inlineprotected |
Definition at line 192 of file Principal.h.
References branchMapperPtr_.
|
pure virtual |
Implemented in art::EventPrincipal, art::SubRunPrincipal, art::RunPrincipal, and art::ResultsPrincipal.
Referenced by cend(), art::get_ProductDescription(), and art::SourceHelper::makePtr().
|
inline |
|
inline |
Definition at line 174 of file Principal.h.
References addToProcessHistory(), branchType(), fillGroup(), groups_, and seenRanges().
|
private |
Definition at line 412 of file Principal.cc.
References deferredGetters_.
Referenced by fillGroup(), and productGetter().
|
inline |
|
pure virtual |
Implemented in art::EventPrincipal, art::SubRunPrincipal, art::RunPrincipal, and art::ResultsPrincipal.
Referenced by cend(), art::ResultsPrincipal::fillGroup(), art::RunPrincipal::fillGroup(), art::SubRunPrincipal::fillGroup(), art::EventPrincipal::fillGroup(), art::RootInputTree::fillGroups(), art::ResultsPrincipal::put(), art::RunPrincipal::put(), art::SubRunPrincipal::put(), and art::EventPrincipal::put().
|
inlineprotected |
Definition at line 205 of file Principal.h.
References branchMapper(), deferredGetter_(), findGroups(), findGroupsForProcess(), findGroupsForProduct(), findGroupsFromInputFile(), art::BranchDescription::friendlyClassName(), getGroup(), getGroupForPtr(), getResolvedGroup(), groups_, matchingSequenceFromInputFile(), art::BranchDescription::moduleLabel(), presentFromSource(), processHistoryID(), art::BranchDescription::processName(), art::BranchDescription::producedClassName(), art::BranchDescription::productID(), setProcessHistoryID(), store_, and tryNextSecondaryFile().
|
private |
Definition at line 355 of file Principal.cc.
References findGroupsForProcess(), and processHistory().
Referenced by fillGroup(), findGroupsForProduct(), findGroupsFromInputFile(), getMatchingSequence(), and matchingSequenceFromInputFile().
|
private |
Definition at line 377 of file Principal.cc.
References getGroup(), and art::SelectorBase::match().
Referenced by fillGroup(), and findGroups().
|
private |
Definition at line 278 of file Principal.cc.
References findGroups(), findGroupsFromInputFile(), art::TypeID::friendlyClassName(), producedProducts_, art::WrappedTypeID::product_type, secondaryPrincipals_, tryNextSecondaryFile(), and art::WrappedTypeID::wrapped_product_type.
Referenced by fillGroup(), getByLabel(), getBySelector(), and getMany().
|
private |
Definition at line 334 of file Principal.cc.
References findGroups(), art::TypeID::friendlyClassName(), presentProducts_, art::WrappedTypeID::product_type, and art::WrappedTypeID::wrapped_product_type.
Referenced by fillGroup(), and findGroupsForProduct().
GroupQueryResult Principal::getByLabel | ( | WrappedTypeID const & | wrapped, |
std::string const & | label, | ||
std::string const & | productInstanceName, | ||
std::string const & | processName | ||
) | const |
Definition at line 143 of file Principal.cc.
References findGroupsForProduct(), art::WrappedTypeID::product_type, and art::errors::ProductNotFound.
Referenced by art::DataViewImpl::getByLabel_().
GroupQueryResult Principal::getByProductID | ( | ProductID const | pid | ) | const |
Definition at line 131 of file Principal.cc.
References getGroupForPtr(), and art::errors::ProductNotFound.
Referenced by art::DataViewImpl::getByProductID_(), getEDProductGetterImpl(), and productGetter().
GroupQueryResult Principal::getBySelector | ( | WrappedTypeID const & | wrapped, |
SelectorBase const & | sel | ||
) | const |
Definition at line 110 of file Principal.cc.
References findGroupsForProduct(), art::WrappedTypeID::product_type, and art::errors::ProductNotFound.
Referenced by art::DataViewImpl::get_().
|
inlineinherited |
Definition at line 25 of file EDProductGetterFinder.h.
References art::EDProductGetterFinder::getEDProductGetterImpl().
|
inlinefinaloverrideprivatevirtual |
Implements art::EDProductGetterFinder.
Definition at line 263 of file Principal.h.
References getByProductID(), and art::GroupQueryResult::result().
OutputHandle Principal::getForOutput | ( | ProductID const | pid, |
bool | resolveProd | ||
) | const |
Definition at line 424 of file Principal.cc.
References getResolvedGroup(), art::OutputHandle::invalid(), and art::OutputHandle::rangeOfValidity().
Referenced by art::RootOutputFile::fillBranches(), art::detail::KeptProvenance::insertAncestors(), and art::ProvenanceCheckerOutput::write().
Definition at line 525 of file Principal.cc.
References groups_.
Referenced by fillGroup(), findGroupsForProcess(), getGroupForPtr(), art::EventPrincipal::history(), removeCachedProduct(), and art::EventPrincipal::throwIfExistingGroup().
Definition at line 481 of file Principal.cc.
References getGroup(), presentFromSource(), producedProducts_, secondaryPrincipals_, and tryNextSecondaryFile().
Referenced by fillGroup(), getByProductID(), and getResolvedGroup().
Principal::GroupQueryResultVec Principal::getMany | ( | WrappedTypeID const & | wrapped, |
SelectorBase const & | sel | ||
) | const |
Definition at line 178 of file Principal.cc.
References findGroupsForProduct().
Referenced by art::DataViewImpl::getMany_().
Principal::GroupQueryResultVec Principal::getMatchingSequence | ( | SelectorBase const & | selector | ) | const |
Definition at line 195 of file Principal.cc.
References findGroups(), matchingSequenceFromInputFile(), producedProducts_, secondaryPrincipals_, and tryNextSecondaryFile().
Referenced by art::DataViewImpl::getMatchingSequenceByLabel_().
|
protected |
Definition at line 452 of file Principal.cc.
References getGroupForPtr().
Referenced by fillGroup(), and getForOutput().
|
private |
Definition at line 247 of file Principal.cc.
References findGroups(), and presentProducts_.
Referenced by fillGroup(), and getMatchingSequence().
|
private |
Definition at line 470 of file Principal.cc.
References art::productstatus::present(), and presentProducts_.
Referenced by fillGroup(), and getGroupForPtr().
|
inline |
Definition at line 138 of file Principal.h.
References processConfiguration_.
Referenced by art::get_ProductDescription().
|
inline |
Definition at line 132 of file Principal.h.
References processHistory_.
Referenced by findGroups(), and art::DataViewImpl::processHistory().
|
privatepure virtual |
Implemented in art::EventPrincipal, art::SubRunPrincipal, art::RunPrincipal, and art::ResultsPrincipal.
Referenced by fillGroup().
EDProductGetter const * Principal::productGetter | ( | ProductID const | pid | ) | const |
Definition at line 532 of file Principal.cc.
References deferredGetter_(), getByProductID(), and art::GroupQueryResult::result().
Referenced by art::SourceHelper::makePtr(), art::Results::productGetter(), art::Run::productGetter(), art::SubRun::productGetter(), and art::Event::productGetter().
|
inlineprotected |
Definition at line 198 of file Principal.h.
References store_.
Referenced by art::EventPrincipal::EventPrincipal(), art::ResultsPrincipal::ResultsPrincipal(), art::RunPrincipal::RunPrincipal(), and art::SubRunPrincipal::SubRunPrincipal().
|
inline |
Definition at line 112 of file Principal.h.
References groups_, and readProvenanceImmediate().
|
inline |
Definition at line 123 of file Principal.h.
References branchMapperPtr_, and groups_.
Referenced by readImmediate().
void Principal::removeCachedProduct | ( | ProductID const | pid | ) | const |
Definition at line 259 of file Principal.cc.
References getGroup(), art::errors::ProductNotFound, and secondaryPrincipals_.
Referenced by art::DataViewImpl::removeCachedProduct_().
|
pure virtual |
Implemented in art::EventPrincipal, art::SubRunPrincipal, art::RunPrincipal, and art::ResultsPrincipal.
Referenced by cend(), and art::RootOutputFile::fillBranches().
|
privatepure virtual |
Implemented in art::EventPrincipal, art::SubRunPrincipal, art::RunPrincipal, and art::ResultsPrincipal.
Referenced by addToProcessHistory(), and fillGroup().
|
inline |
Definition at line 106 of file Principal.h.
References producedProducts_.
|
inline |
Definition at line 150 of file Principal.h.
References groups_.
Referenced by art::DataViewImpl::size().
|
protected |
Definition at line 184 of file Principal.cc.
References nextSecondaryFileIdx_, and store_.
Referenced by fillGroup(), findGroupsForProduct(), getGroupForPtr(), and getMatchingSequence().
|
private |
Definition at line 284 of file Principal.h.
Referenced by branchMapper(), Principal(), and readProvenanceImmediate().
|
mutableprivate |
Definition at line 275 of file Principal.h.
Referenced by deferredGetter_().
|
private |
Definition at line 280 of file Principal.h.
Referenced by begin(), cbegin(), cend(), end(), fillGroup(), getGroup(), readImmediate(), readProvenanceImmediate(), and size().
|
mutableprivate |
Definition at line 297 of file Principal.h.
Referenced by tryNextSecondaryFile().
|
private |
Definition at line 271 of file Principal.h.
Referenced by findGroupsFromInputFile(), matchingSequenceFromInputFile(), presentFromSource(), and Principal().
|
private |
Definition at line 270 of file Principal.h.
Referenced by addToProcessHistory(), and processConfiguration().
|
private |
Definition at line 268 of file Principal.h.
Referenced by addToProcessHistory(), Principal(), and processHistory().
|
mutableprivate |
Definition at line 277 of file Principal.h.
Referenced by addToProcessHistory().
|
private |
Definition at line 272 of file Principal.h.
Referenced by findGroupsForProduct(), getGroupForPtr(), getMatchingSequence(), and setProducedProducts().
|
private |
Definition at line 293 of file Principal.h.
Referenced by addSecondaryPrincipal(), findGroupsForProduct(), getGroupForPtr(), getMatchingSequence(), and removeCachedProduct().
|
private |
Definition at line 288 of file Principal.h.
Referenced by fillGroup(), Principal(), productReader(), and tryNextSecondaryFile().