|
|
Go to the documentation of this file. 1 #ifndef FWCore_Framework_Principal_h
2 #define FWCore_Framework_Principal_h
33 #include "boost/iterator/filter_iterator.hpp"
43 class HistoryAppender;
44 class MergeableRunProductMetadata;
45 class ModuleCallingContext;
46 class ProductResolverIndexHelper;
49 class InputProductResolver;
60 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::const_iterator>
const_iterator;
61 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::iterator>
iterator;
70 Principal(std::shared_ptr<ProductRegistry const> reg,
71 std::shared_ptr<ProductResolverIndexHelper const>
productLookup,
75 bool isForPrimaryProcess =
true);
124 bool skipCurrentProcess,
131 bool skipCurrentProcess,
155 return const_cast<ProductResolverBase*>(const_cast<const Principal*>(
this)->
getProductResolver(oid));
205 void addProduct_(std::unique_ptr<ProductResolverBase> phb);
214 template <
typename F>
217 iFunc(resolver.get());
236 unsigned int)
const override;
238 std::vector<WrapperBase const*>&,
239 std::vector<unsigned int>&)
const override;
242 ProductID const& thinned)
const override;
244 void findProducts(std::vector<ProductResolverBase const*>
const& holders,
280 std::shared_ptr<ProductRegistry const>
preg_;
300 template <
typename PROD>
307 return std::shared_ptr<Wrapper<PROD>
const>();
310 if (!(
result->wrapper()->dynamicTypeInfo() ==
typeid(
PROD))) {
std::vector< propagate_const< std::shared_ptr< ProductResolverBase > > > ProductResolverCollection
unsigned int ProductResolverIndex
void findProducts(std::vector< ProductResolverBase const * > const &holders, TypeID const &typeID, BasicHandleVec &results, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
ProcessHistory::const_iterator ProcessNameConstIterator
bool operator()(propagate_const< std::shared_ptr< ProductResolverBase >> const &iObj)
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
bool adjustToNewProductRegistry(ProductRegistry const ®)
ProductResolverBase const * ConstProductResolverPtr
ProductData const * findProductByTag(TypeID const &typeID, InputTag const &tag, ModuleCallingContext const *mcc) const
void addSwitchProducerProduct(std::shared_ptr< BranchDescription const > bd)
ProcessHistory const & processHistory() const
const_iterator begin() const
boost::filter_iterator< FilledProductPtr, ProductResolverCollection::const_iterator > const_iterator
OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const override
void recombine(Principal &other, std::vector< BranchID > const &bids)
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
void addParentProcessProduct(std::shared_ptr< BranchDescription const > bd)
void adjustIndexesAfterProductRegistryAddition()
void addScheduledProduct(std::shared_ptr< BranchDescription const > bd)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Provenance getProvenance(BranchID const &bid, ModuleCallingContext const *mcc) const
void throwConvertTypeError(std::type_info const &expected, std::type_info const &actual)
void getThinnedProducts(ProductID const &, std::vector< WrapperBase const * > &, std::vector< unsigned int > &) const override
void getAllProvenance(std::vector< Provenance const * > &provenances) const
ProcessHistoryID const & processHistoryID() const
DelayedReader * reader() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
std::vector< BasicHandle > BasicHandleVec
BranchType const & branchType() const
ProcessHistoryID processHistoryIDBeforeConfig_
unsigned long CacheIdentifier_t
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
void prefetchAsync(WaitingTask *waitTask, ProductResolverIndex index, bool skipCurrentProcess, ServiceToken const &token, ModuleCallingContext const *mcc) const
const_iterator end() const
ProductResolverCollection::size_type size_type
ProductRegistry const & productRegistry() const
ProductResolverIndexHelper const & productLookup() const
collection_type::const_iterator const_iterator
void fillPrincipal(DelayedReader *reader)
std::shared_ptr< ProcessHistory const > processHistoryPtr_
ProductResolverBase * getModifiableProductResolver(BranchID const &oid)
ProcessConfiguration const * processConfiguration_
void addSwitchAliasProduct(std::shared_ptr< BranchDescription const > bd)
void setupUnscheduled(UnscheduledConfigurator const &)
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &, unsigned int) const override
ProductResolverBase * getExistingProduct(BranchID const &branchID)
std::vector< unsigned int > const & lookupProcessOrder() const
std::shared_ptr< ProductResolverBase > SharedProductPtr
static PFTauRenderPlugin instance
void addAliasedProduct(std::shared_ptr< BranchDescription const > bd)
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
BasicHandle getByToken(KindOfType kindOfType, TypeID const &typeID, ProductResolverIndex index, bool skipCurrentProcess, bool &ambiguous, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void addInputProduct(std::shared_ptr< BranchDescription const > bd)
ProductResolverCollection productResolvers_
EDProductGetter const * prodGetter() const
void getManyByType(TypeID const &typeID, BasicHandleVec &results, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
std::shared_ptr< ProductResolverIndexHelper const > productLookup_
boost::filter_iterator< FilledProductPtr, ProductResolverCollection::iterator > iterator
void addProduct_(std::unique_ptr< ProductResolverBase > phb)
std::shared_ptr< Wrapper< PROD > const > getProductByTag(Principal const &ep, InputTag const &tag, ModuleCallingContext const *mcc)
ProcessHistoryID processHistoryID_
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void applyToResolvers(F iFunc)
virtual void changedIndexes_()
void addSourceProduct(std::shared_ptr< BranchDescription const > bd)
void putOrMerge(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
ProductData const * findProductByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumer, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void addProductOrThrow(std::unique_ptr< ProductResolverBase > phb)
CacheIdentifier_t cacheIdentifier_
std::vector< unsigned int > lookupProcessOrder_
ProcessConfiguration const & processConfiguration() const
void deleteProduct(BranchID const &id) const
edm::propagate_const< HistoryAppender * > historyAppender_
WrapperBase const * getIt(ProductID const &) const override
CacheIdentifier_t cacheIdentifier() const
void addUnscheduledProduct(std::shared_ptr< BranchDescription const > bd)
Principal(std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< ProductResolverIndexHelper const > productLookup, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender, bool isForPrimaryProcess=true)
ProcessHistoryID orderProcessHistoryID_
std::shared_ptr< ProductRegistry const > preg_