1 #ifndef FWCore_Framework_Principal_h 2 #define FWCore_Framework_Principal_h 33 #include "boost/iterator/filter_iterator.hpp" 43 class HistoryAppender;
44 class MergeableRunProductMetadata;
45 class ModuleCallingContext;
46 class ProcessHistoryRegistry;
47 class ProductResolverIndexHelper;
50 class InputProductResolver;
61 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::const_iterator>
const_iterator;
62 typedef boost::filter_iterator<FilledProductPtr, ProductResolverCollection::iterator>
iterator;
71 Principal(std::shared_ptr<ProductRegistry const> reg,
72 std::shared_ptr<ProductResolverIndexHelper const> productLookup,
76 bool isForPrimaryProcess =
true);
82 void adjustIndexesAfterProductRegistryAddition();
86 void clearPrincipal();
90 void deleteProduct(
BranchID const&
id)
const;
123 bool skipCurrentProcess,
130 bool skipCurrentProcess,
134 void getManyByType(
TypeID const& typeID,
135 BasicHandleVec& results,
151 void recombine(
Principal&
other, std::vector<BranchID>
const& bids);
161 return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());
163 const_iterator
end()
const {
164 return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());
168 return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.begin(), productResolvers_.end());
171 return boost::make_filter_iterator<FilledProductPtr>(productResolvers_.end(), productResolvers_.end());
176 void getAllProvenance(std::vector<Provenance const*>& provenances)
const;
178 void getAllStableProvenance(std::vector<StableProvenance const*>& provenances)
const;
188 ConstProductResolverPtr getProductResolver(
BranchID const& oid)
const;
204 void addProduct_(std::unique_ptr<ProductResolverBase> phb);
205 void addProductOrThrow(std::unique_ptr<ProductResolverBase> phb);
210 void putOrMerge(
BranchDescription const& bd, std::unique_ptr<WrapperBase> edp)
const;
213 template <
typename F>
215 for (
auto& resolver : productResolvers_) {
216 iFunc(resolver.get());
221 void addScheduledProduct(std::shared_ptr<BranchDescription const> bd);
222 void addSourceProduct(std::shared_ptr<BranchDescription const> bd);
223 void addInputProduct(std::shared_ptr<BranchDescription const> bd);
224 void addUnscheduledProduct(std::shared_ptr<BranchDescription const> bd);
225 void addAliasedProduct(std::shared_ptr<BranchDescription const> bd);
226 void addSwitchProducerProduct(std::shared_ptr<BranchDescription const> bd);
227 void addSwitchAliasProduct(std::shared_ptr<BranchDescription const> bd);
228 void addParentProcessProduct(std::shared_ptr<BranchDescription const> bd);
232 void getThinnedProducts(
ProductID const&,
233 std::vector<WrapperBase const*>&,
234 std::vector<unsigned int>&)
const override;
236 void findProducts(std::vector<ProductResolverBase const*>
const& holders,
238 BasicHandleVec& results,
272 std::shared_ptr<ProductRegistry const>
preg_;
292 template <
typename PROD>
298 if (result ==
nullptr) {
299 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