1 #ifndef FWCore_Framework_Principal_h
2 #define FWCore_Framework_Principal_h
34 #include "boost/iterator/filter_iterator.hpp"
44 class HistoryAppender;
45 class ModuleCallingContext;
46 class ProcessHistoryRegistry;
47 class ProductHolderIndexHelper;
58 typedef boost::filter_iterator<FilledProductPtr, ProductHolderCollection::const_iterator>
const_iterator;
59 typedef boost::filter_iterator<FilledProductPtr, ProductHolderCollection::iterator>
iterator;
68 Principal(std::shared_ptr<ProductRegistry const> reg,
69 std::shared_ptr<ProductHolderIndexHelper const>
productLookup,
129 bool skipCurrentProcess,
135 bool skipCurrentProcess,
217 void addProduct_(std::unique_ptr<ProductHolderBase> phb);
233 std::vector<WrapperBase const*>&,
234 std::vector<unsigned int>&)
const override;
236 void findProducts(std::vector<ProductHolderBase const*>
const& holders,
277 std::shared_ptr<ProductRegistry const>
preg_;
301 template <
typename PROD>
303 std::shared_ptr<Wrapper<PROD>
const>
307 if(result ==
nullptr) {
308 return std::shared_ptr<Wrapper<PROD>
const>();
collection_type::const_iterator const_iterator
ProductRegistry const & productRegistry() const
virtual void getThinnedProducts(ProductID const &, std::vector< WrapperBase const * > &, std::vector< unsigned int > &) const override
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
std::shared_ptr< ProductHolderBase > SharedProductPtr
std::type_info const & dynamicTypeInfo() const
void readFromSource(ProductHolderBase const &phb, ModuleCallingContext const *mcc) const
std::shared_ptr< ProcessHistory const > processHistoryPtr_
void resolveProductImmediately(ProductHolderBase &phb)
const_iterator end() const
ProductHolderBase const * ConstProductHolderPtr
static PFTauRenderPlugin instance
virtual WrapperBase const * getThinnedProduct(ProductID const &, unsigned int &) const override
ProcessHistoryID processHistoryID_
virtual bool isComplete_() const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Provenance getProvenance(BranchID const &bid, ModuleCallingContext const *mcc) const
WrapperBase const * wrapper() const
ProductHolderBase * getModifiableProductHolder(BranchID const &oid)
CacheIdentifier_t cacheIdentifier() const
unsigned int ProductHolderIndex
void addInputProduct(std::shared_ptr< BranchDescription const > bd)
edm::propagate_const< HistoryAppender * > historyAppender_
ProcessHistory const & processHistory() const
virtual void readFromSource_(ProductHolderBase const &, ModuleCallingContext const *) const
void readAllFromSourceAndMergeImmediately()
std::vector< unsigned int > lookupProcessOrder_
std::vector< propagate_const< std::shared_ptr< ProductHolderBase > > > ProductHolderCollection
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
BasicHandle getByToken(KindOfType kindOfType, TypeID const &typeID, ProductHolderIndex index, bool skipCurrentProcess, bool &ambiguous, 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< Wrapper< PROD > const > getProductByTag(Principal const &ep, InputTag const &tag, ModuleCallingContext const *mcc)
ConstProductHolderPtr getProductHolderByIndex(ProductHolderIndex const &oid) const
std::shared_ptr< ProductRegistry const > preg_
ProcessHistoryID const & processHistoryID() const
CacheIdentifier_t cacheIdentifier_
BranchType const & branchType() const
std::vector< unsigned int > const & lookupProcessOrder() const
ProductHolderCollection productHolders_
void putOrMerge(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
void addSourceProduct(std::shared_ptr< BranchDescription const > bd)
ProcessHistoryID orderProcessHistoryID_
ProcessConfiguration const & processConfiguration() const
std::set< void const * > productPtrs_
std::shared_ptr< ProductHolderIndexHelper const > productLookup_
Principal(std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< ProductHolderIndexHelper const > productLookup, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender)
OutputHandle getForOutput(BranchID const &bid, bool getProd, ModuleCallingContext const *mcc) const
DelayedReader * reader() const
void prefetch(ProductHolderIndex index, bool skipCurrentProcess, ModuleCallingContext const *mcc) const
ProductHolderCollection::size_type size_type
ProcessHistory::const_iterator ProcessNameConstIterator
void addUnscheduledProduct(std::shared_ptr< BranchDescription const > bd)
bool operator()(propagate_const< std::shared_ptr< ProductHolderBase >> const &iObj)
const_iterator begin() const
void addProduct_(std::unique_ptr< ProductHolderBase > phb)
void findProducts(std::vector< ProductHolderBase const * > const &holders, TypeID const &typeID, BasicHandleVec &results, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
void addProductOrThrow(std::unique_ptr< ProductHolderBase > phb)
unsigned long CacheIdentifier_t
virtual WrapperBase const * getIt(ProductID const &) const override
boost::filter_iterator< FilledProductPtr, ProductHolderCollection::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
void adjustIndexesAfterProductRegistryAddition()
void addAliasedProduct(std::shared_ptr< BranchDescription const > bd)
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, DelayedReader *reader)
EDProductGetter const * prodGetter() const
void recombine(Principal &other, std::vector< BranchID > const &bids)
ProcessConfiguration const * processConfiguration_
boost::filter_iterator< FilledProductPtr, ProductHolderCollection::iterator > iterator
virtual bool unscheduledFill(std::string const &moduleLabel, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
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
ProductHolderBase * getExistingProduct(BranchID const &branchID)
void deleteProduct(BranchID const &id) const
ProductHolderIndexHelper const & productLookup() const