1 #ifndef FWCore_Framework_Principal_h
2 #define FWCore_Framework_Principal_h
33 #include "boost/iterator/filter_iterator.hpp"
43 class HistoryAppender;
44 class ModuleCallingContext;
45 class ProcessHistoryRegistry;
46 class ProductHolderIndexHelper;
51 bool operator()(std::shared_ptr<ProductHolderBase>
const& iObj) {
return bool(iObj);}
57 typedef boost::filter_iterator<FilledProductPtr, ProductHolderCollection::const_iterator>
const_iterator;
66 Principal(std::shared_ptr<ProductRegistry const> reg,
67 std::shared_ptr<ProductHolderIndexHelper const>
productLookup,
127 bool skipCurrentProcess,
133 bool skipCurrentProcess,
206 void addProduct_(std::auto_ptr<ProductHolderBase> phb);
223 std::vector<WrapperBase const*>&,
224 std::vector<unsigned int>&)
const override;
226 void findProducts(std::vector<ProductHolderBase const*>
const& holders,
263 std::shared_ptr<ProductRegistry const>
preg_;
287 template <
typename PROD>
289 std::shared_ptr<Wrapper<PROD>
const>
293 if(result ==
nullptr) {
294 return std::shared_ptr<Wrapper<PROD>
const>();
297 if(!(result->
wrapper_->dynamicTypeInfo() ==
typeid(
PROD))) {
collection_type::const_iterator const_iterator
void putOrMerge(std::unique_ptr< WrapperBase > prod, ProductHolderBase const *productHolder) const
ProductRegistry const & productRegistry() const
virtual void getThinnedProducts(ProductID const &, std::vector< WrapperBase const * > &, std::vector< unsigned int > &) const override
HistoryAppender * historyAppender_
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
std::vector< std::shared_ptr< ProductHolderBase > > ProductHolderCollection
std::shared_ptr< ProductHolderBase > SharedProductPtr
void readFromSource(ProductHolderBase const &phb, ModuleCallingContext const *mcc) const
std::shared_ptr< ProcessHistory const > processHistoryPtr_
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
CacheIdentifier_t cacheIdentifier() const
unsigned int ProductHolderIndex
void addInputProduct(std::shared_ptr< BranchDescription const > bd)
bool operator()(std::shared_ptr< ProductHolderBase > const &iObj)
ProcessHistory const & processHistory() const
virtual void readFromSource_(ProductHolderBase const &, ModuleCallingContext const *) const
std::vector< unsigned int > lookupProcessOrder_
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 addProduct_(std::auto_ptr< ProductHolderBase > phb)
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
void addSourceProduct(std::shared_ptr< BranchDescription const > bd)
ProcessHistoryID orderProcessHistoryID_
std::shared_ptr< WrapperBase > wrapper_
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)
const_iterator begin() const
void findProducts(std::vector< ProductHolderBase const * > const &holders, TypeID const &typeID, BasicHandleVec &results, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
unsigned long CacheIdentifier_t
virtual WrapperBase const * getIt(ProductID const &) const override
void addProductOrThrow(std::auto_ptr< ProductHolderBase > phb)
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_
virtual bool unscheduledFill(std::string const &moduleLabel, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
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)
ProductHolderIndexHelper const & productLookup() const
void deleteProduct(BranchID const &id)