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 deleteProduct(
BranchID const&
id)
const;
122 bool skipCurrentProcess,
129 bool skipCurrentProcess,
133 void getManyByType(
TypeID const& typeID,
140 return *processHistoryPtr_;
144 return processHistoryID_;
154 void recombine(
Principal&
other, std::vector<BranchID>
const& bids);
163 const_iterator
begin()
const {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());}
164 const_iterator
end()
const {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());}
166 iterator
begin() {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());}
167 iterator
end() {
return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());}
172 void getAllProvenance(std::vector<Provenance const*>& provenances)
const;
174 void getAllStableProvenance(std::vector<StableProvenance const*>& provenances)
const;
184 ConstProductResolverPtr getProductResolver(
BranchID const& oid)
const;
188 void readAllFromSourceAndMergeImmediately();
199 void addProduct_(std::unique_ptr<ProductResolverBase> phb);
200 void addProductOrThrow(std::unique_ptr<ProductResolverBase> phb);
205 void putOrMerge(
BranchDescription const& bd, std::unique_ptr<WrapperBase> edp)
const;
208 template <
typename F>
210 for(
auto& resolver: productResolvers_) {
211 iFunc(resolver.get());
217 void addScheduledProduct(std::shared_ptr<BranchDescription const> bd);
218 void addSourceProduct(std::shared_ptr<BranchDescription const> bd);
219 void addInputProduct(std::shared_ptr<BranchDescription const> bd);
220 void addUnscheduledProduct(std::shared_ptr<BranchDescription const> bd);
221 void addAliasedProduct(std::shared_ptr<BranchDescription const> bd);
222 void addParentProcessProduct(std::shared_ptr<BranchDescription const> bd);
227 void getThinnedProducts(
ProductID const&,
228 std::vector<WrapperBase const*>&,
229 std::vector<unsigned int>&)
const override;
231 void findProducts(std::vector<ProductResolverBase const*>
const& holders,
233 BasicHandleVec& results,
267 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>();
collection_type::const_iterator const_iterator
ProductRegistry const & productRegistry() const
ProductResolverBase * getModifiableProductResolver(BranchID const &oid)
ProcessHistoryID processHistoryIDBeforeConfig_
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_
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