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;
50 bool operator()(std::shared_ptr<ProductHolderBase>
const& iObj) {
return bool(iObj);}
56 typedef boost::filter_iterator<FilledProductPtr, ProductHolderCollection::const_iterator>
const_iterator;
65 Principal(std::shared_ptr<ProductRegistry const> reg,
66 std::shared_ptr<ProductHolderIndexHelper const>
productLookup,
124 bool skipCurrentProcess,
129 bool skipCurrentProcess,
200 void addProduct_(std::auto_ptr<ProductHolderBase> phb);
217 std::vector<WrapperBase const*>&,
218 std::vector<unsigned int>&)
const override;
220 void findProducts(std::vector<ProductHolderBase const*>
const& holders,
254 std::shared_ptr<ProductRegistry const>
preg_;
278 template <
typename PROD>
280 std::shared_ptr<Wrapper<PROD>
const>
284 if(result ==
nullptr) {
285 return std::shared_ptr<Wrapper<PROD>
const>();
288 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
void getManyByType(TypeID const &typeID, BasicHandleVec &results, EDConsumerBase const *consumes, 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)
virtual bool unscheduledFill(std::string const &moduleLabel, ModuleCallingContext const *mcc) const =0
BasicHandle getByToken(KindOfType kindOfType, TypeID const &typeID, ProductHolderIndex index, bool skipCurrentProcess, bool &ambiguous, 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
ProductData const * findProductByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumer, ModuleCallingContext const *mcc) 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_
void findProducts(std::vector< ProductHolderBase const * > const &holders, TypeID const &typeID, BasicHandleVec &results, ModuleCallingContext const *mcc) const
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
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 ®)
void adjustIndexesAfterProductRegistryAddition()
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, ModuleCallingContext const *mcc) const
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_
std::vector< BasicHandle > BasicHandleVec
ProductHolderBase * getExistingProduct(BranchID const &branchID)
ProductHolderIndexHelper const & productLookup() const
void deleteProduct(BranchID const &id)