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 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);
81 void adjustIndexesAfterProductRegistryAddition();
85 void clearPrincipal();
89 void setAtEndTransition(
bool iAtEnd);
92 void deleteProduct(
BranchID const&
id)
const;
125 bool skipCurrentProcess,
132 bool skipCurrentProcess,
135 void getManyByType(
TypeID const& typeID,
142 return *processHistoryPtr_;
146 return processHistoryID_;
156 void recombine(
Principal&
other, std::vector<BranchID>
const& bids);
165 const_iterator
begin()
const {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());}
166 const_iterator
end()
const {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());}
168 iterator
begin() {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());}
169 iterator
end() {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());}
174 void getAllProvenance(std::vector<Provenance const*>& provenances)
const;
176 void getAllStableProvenance(std::vector<StableProvenance const*>& provenances)
const;
186 ConstProductResolverPtr getProductResolver(
BranchID const& oid)
const;
190 void readAllFromSourceAndMergeImmediately();
194 void resetFailedFromThisProcess();
207 void addProduct_(std::unique_ptr<ProductResolverBase> phb);
208 void addProductOrThrow(std::unique_ptr<ProductResolverBase> phb);
213 void putOrMerge(
BranchDescription const& bd, std::unique_ptr<WrapperBase> edp)
const;
216 template <
typename F>
218 for(
auto& resolver: productResolvers_) {
219 iFunc(resolver.get());
225 void addScheduledProduct(std::shared_ptr<BranchDescription const> bd);
226 void addSourceProduct(std::shared_ptr<BranchDescription const> bd);
227 void addInputProduct(std::shared_ptr<BranchDescription const> bd);
228 void addUnscheduledProduct(std::shared_ptr<BranchDescription const> bd);
229 void addAliasedProduct(std::shared_ptr<BranchDescription const> bd);
230 void addParentProcessProduct(std::shared_ptr<BranchDescription const> bd);
235 virtual void getThinnedProducts(
ProductID const&,
236 std::vector<WrapperBase const*>&,
237 std::vector<unsigned int>&)
const override;
239 void findProducts(std::vector<ProductResolverBase const*>
const& holders,
241 BasicHandleVec& results,
276 std::shared_ptr<ProductRegistry const>
preg_;
298 template <
typename PROD>
300 std::shared_ptr<Wrapper<PROD>
const>
304 if(result ==
nullptr) {
305 return std::shared_ptr<Wrapper<PROD>
const>();
collection_type::const_iterator const_iterator
ProductRegistry const & productRegistry() const
ProductResolverBase * getModifiableProductResolver(BranchID const &oid)
unsigned int ProductResolverIndex
ProductResolverCollection productResolvers_
std::type_info const & dynamicTypeInfo() const
std::shared_ptr< ProcessHistory const > processHistoryPtr_
const_iterator end() const
static PFTauRenderPlugin instance
std::shared_ptr< ProductResolverBase > SharedProductPtr
ProcessHistoryID processHistoryID_
virtual bool isComplete_() const
void applyToResolvers(F iFunc)
WrapperBase const * wrapper() const
CacheIdentifier_t cacheIdentifier() const
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
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)
ProductData const * findProductByTag(TypeID const &typeID, InputTag const &tag, ModuleCallingContext const *mcc) const
T const * getThinnedProduct(RefCore const &ref, unsigned int &thinnedKey, EDProductGetter const *prodGetter)
std::shared_ptr< ProductResolverIndexHelper const > productLookup_
std::shared_ptr< Wrapper< PROD > const > getProductByTag(Principal const &ep, InputTag const &tag, ModuleCallingContext const *mcc)
std::shared_ptr< ProductRegistry const > preg_
ProcessHistoryID const & processHistoryID() const
CacheIdentifier_t cacheIdentifier_
BranchType const & branchType() const
std::vector< unsigned int > const & lookupProcessOrder() const
ProcessHistoryID orderProcessHistoryID_
ProcessConfiguration const & processConfiguration() const
DelayedReader * reader() const
ProcessHistory::const_iterator ProcessNameConstIterator
const_iterator begin() const
ProductResolverIndexHelper const & productLookup() const
ProductResolverBase const * ConstProductResolverPtr
unsigned long CacheIdentifier_t
boost::filter_iterator< FilledProductPtr, ProductResolverCollection::const_iterator > const_iterator
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
ProductResolverCollection::size_type size_type
EDProductGetter const * prodGetter() const
ProcessConfiguration const * processConfiguration_
std::shared_ptr< WrapperBase const > sharedConstWrapper() const
std::vector< BasicHandle > BasicHandleVec
bool atEndTransition() const