1 #ifndef FWCore_Framework_Principal_h
2 #define FWCore_Framework_Principal_h
34 #include "boost/iterator/filter_iterator.hpp"
44 class HistoryAppender;
45 class MergeableRunProductMetadata;
46 class ModuleCallingContext;
47 class ProductResolverIndexHelper;
59 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::const_iterator>
const_iterator;
60 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::iterator>
iterator;
69 Principal(std::shared_ptr<ProductRegistry const> reg,
70 std::shared_ptr<ProductResolverIndexHelper const>
productLookup,
74 bool isForPrimaryProcess =
true);
123 bool skipCurrentProcess,
130 bool skipCurrentProcess,
207 void addProduct_(std::unique_ptr<ProductResolverBase> phb);
216 template <
typename F>
219 iFunc(resolver.get());
239 unsigned int)
const override;
241 std::vector<WrapperBase const*>&,
242 std::vector<unsigned int>&)
const override;
245 ProductID const& thinned)
const override;
247 void findProducts(std::vector<ProductResolverBase const*>
const& holders,
283 std::shared_ptr<ProductRegistry const>
preg_;
303 template <
typename PROD>
309 if (result ==
nullptr) {
310 return std::shared_ptr<Wrapper<PROD>
const>();
collection_type::const_iterator const_iterator
void fillPrincipal(DelayedReader *reader)
ProductRegistry const & productRegistry() const
ProductResolverBase * getModifiableProductResolver(BranchID const &oid)
void getThinnedProducts(ProductID const &, std::vector< WrapperBase const * > &, std::vector< unsigned int > &) const override
ProcessHistoryID processHistoryIDBeforeConfig_
void setupUnscheduled(UnscheduledConfigurator const &)
unsigned int ProductResolverIndex
ProductResolverCollection productResolvers_
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
std::type_info const & dynamicTypeInfo() const
std::shared_ptr< ProcessHistory const > processHistoryPtr_
const_iterator end() const
static PFTauRenderPlugin instance
std::shared_ptr< ProductResolverBase > SharedProductPtr
void addProduct_(std::unique_ptr< ProductResolverBase > phb)
ProcessHistoryID processHistoryID_
ProductResolverBase * getExistingProduct(BranchID const &branchID)
void getAllProvenance(std::vector< Provenance const * > &provenances) const
void applyToResolvers(F iFunc)
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
StableProvenance const & getStableProvenance(BranchID const &bid) const
WrapperBase const * wrapper() const
CacheIdentifier_t cacheIdentifier() const
Principal(std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< ProductResolverIndexHelper const > productLookup, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender, bool isForPrimaryProcess=true)
bool operator()(propagate_const< std::shared_ptr< ProductResolverBase >> const &iObj)
edm::propagate_const< HistoryAppender * > historyAppender_
ProcessHistory const & processHistory() const
boost::filter_iterator< FilledProductPtr, ProductResolverCollection::iterator > iterator
void prefetchAsync(WaitingTaskHolder waitTask, ProductResolverIndex index, bool skipCurrentProcess, ServiceToken const &token, ModuleCallingContext const *mcc) const
std::vector< unsigned int > lookupProcessOrder_
std::vector< propagate_const< std::shared_ptr< ProductResolverBase > > > ProductResolverCollection
void throwConvertTypeError(std::type_info const &expected, std::type_info const &actual)
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void addScheduledProduct(std::shared_ptr< BranchDescription const > bd)
ProductData const * findProductByTag(TypeID const &typeID, InputTag const &tag, ModuleCallingContext const *mcc) const
std::shared_ptr< ProductResolverIndexHelper const > productLookup_
std::shared_ptr< Wrapper< PROD > const > getProductByTag(Principal const &ep, InputTag const &tag, ModuleCallingContext const *mcc)
void addProductOrThrow(std::unique_ptr< ProductResolverBase > phb)
std::shared_ptr< ProductRegistry const > preg_
ProcessHistoryID const & processHistoryID() const
CacheIdentifier_t cacheIdentifier_
void addDelayedReaderInputProduct(std::shared_ptr< BranchDescription const > bd)
BranchType const & branchType() const
std::vector< unsigned int > const & lookupProcessOrder() const
void addSourceProduct(std::shared_ptr< BranchDescription const > bd)
ProcessHistoryID orderProcessHistoryID_
tuple key
prepare the HTCondor submission files and eventually submit them
virtual void changedIndexes_()
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &, unsigned int) const override
void addParentProcessProduct(std::shared_ptr< BranchDescription const > bd)
ProcessConfiguration const & processConfiguration() const
DelayedReader * reader() const
virtual unsigned int processBlockIndex(std::string const &processName) const
ProcessHistory::const_iterator ProcessNameConstIterator
void addSwitchAliasProduct(std::shared_ptr< BranchDescription const > bd)
void addUnscheduledProduct(std::shared_ptr< BranchDescription const > bd)
const_iterator begin() const
ProductResolverIndexHelper const & productLookup() const
void addPutOnReadInputProduct(std::shared_ptr< BranchDescription const > bd)
ProductResolverBase const * ConstProductResolverPtr
void findProducts(std::vector< ProductResolverBase const * > const &holders, TypeID const &typeID, BasicHandleVec &results, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
unsigned long CacheIdentifier_t
WrapperBase const * getIt(ProductID const &) const override
boost::filter_iterator< FilledProductPtr, ProductResolverCollection::const_iterator > const_iterator
bool adjustToNewProductRegistry(ProductRegistry const ®)
ProductData const * findProductByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumer, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
void addSwitchProducerProduct(std::shared_ptr< BranchDescription const > bd)
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Provenance const & getProvenance(BranchID const &bid) const
void adjustIndexesAfterProductRegistryAddition()
BasicHandle getByToken(KindOfType kindOfType, TypeID const &typeID, ProductResolverIndex index, bool skipCurrentProcess, bool &ambiguous, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const override
void addAliasedProduct(std::shared_ptr< BranchDescription const > bd)
ProductResolverCollection::size_type size_type
EDProductGetter const * prodGetter() const
void recombine(Principal &other, std::vector< BranchID > const &bids)
ProcessConfiguration const * processConfiguration_
std::shared_ptr< WrapperBase const > sharedConstWrapper() const
std::vector< BasicHandle > BasicHandleVec
void getManyByType(TypeID const &typeID, BasicHandleVec &results, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void deleteProduct(BranchID const &id) const
void put_(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const