1 #ifndef FWCore_Framework_ProductResolvers_h 2 #define FWCore_Framework_ProductResolvers_h 26 class ProductProvenanceRetriever;
28 class ModuleCallingContext;
58 void setProduct(std::unique_ptr<WrapperBase> edp)
const;
63 template <
bool callResolver,
typename FUNC>
73 void mergeProduct(std::unique_ptr<WrapperBase> edp)
const;
100 m_prefetchRequested{
false },
110 bool skipCurrentProcess,
115 bool skipCurrentProcess,
119 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
139 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
153 bool skipCurrentProcess,
158 bool skipCurrentProcess,
164 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
178 prefetchRequested_(
false){}
184 bool skipCurrentProcess,
189 bool skipCurrentProcess,
209 realProduct_.connectTo(iOther, iParentPrincipal );
214 bool skipCurrentProcess,
217 return realProduct_.resolveProduct(principal, skipCurrentProcess, sra, mcc);}
220 bool skipCurrentProcess,
224 realProduct_.prefetchAsync(waitTask, principal, skipCurrentProcess, token, sra, mcc);
229 return realProduct_.productResolved(); }
232 return realProduct_.productWasFetchedAndIsValid(iSkipCurrentProcess);
235 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
249 std::shared_ptr<BranchDescription const>
bd_;
258 realProduct_ = &iOther;
259 parentPrincipal_ = iParentPrincipal;
264 bool skipCurrentProcess,
267 skipCurrentProcess =
false;
268 return realProduct_->resolveProduct(*parentPrincipal_, skipCurrentProcess, sra, mcc);
272 bool skipCurrentProcess,
276 skipCurrentProcess =
false;
277 realProduct_->prefetchAsync( waitTask, *parentPrincipal_, skipCurrentProcess, token, sra, mcc);
280 if (realProduct_)
return realProduct_->unscheduledWasNotRun();
281 throwNullRealProduct();
288 iSkipCurrentProcess =
false;
289 return realProduct_->productWasFetchedAndIsValid(iSkipCurrentProcess);
292 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
304 void throwNullRealProduct()
const;
307 std::shared_ptr<BranchDescription const>
bd_;
316 std::vector<bool>
const& ambiguous,
bool madeAtEnd);
320 void tryPrefetchResolverAsync(
unsigned int iProcessingIndex,
322 bool skipCurrentProcess,
327 bool dataValidFromResolver(
unsigned int iProcessingIndex,
329 bool iSkipCurrentProcess) const;
331 void prefetchFailed(
unsigned int iProcessingIndex,
333 bool iSkipCurrentProcess,
334 std::exception_ptr iExceptPtr) const;
336 unsigned int unsetIndexValue() const;
338 bool skipCurrentProcess,
343 bool skipCurrentProcess,
368 bool skipCurrentProcess,
372 void setCache(
bool skipCurrentProcess,
ProductResolverIndex index, std::exception_ptr exceptionPtr)
const;
395 bool skipCurrentProcess,
400 bool skipCurrentProcess,
410 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
ProducedProductResolver & realProduct_
bool productResolved_() const final
Provenance const & provenance() const
bool unscheduledWasNotRun_() const override
void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) final
unsigned int ProductResolverIndex
std::shared_ptr< BranchDescription const > const & branchDescription() const
void checkType(WrapperBase const &prod) const
ParentProcessProductResolver(std::shared_ptr< BranchDescription const > bd)
WaitingTaskList m_waitingTasks
ProducedProductResolver::ProductStatus ProductStatus
std::string const & resolvedModuleLabel_() const override
ProductStatus const defaultStatus_
std::shared_ptr< BranchDescription const > bd_
bool productUnavailable_() const override
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
void resetProductData_(bool deleteEarly) override
UnscheduledProductResolver(std::shared_ptr< BranchDescription const > bd)
ProductStatus status() const
Provenance const * provenance_() const final
virtual void setupUnscheduled(UnscheduledConfigurator const &)
std::string const & resolvedModuleLabel_() const final
virtual void putProduct_(std::unique_ptr< WrapperBase > edp) const =0
virtual void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
DataManagingProductResolver(std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
WaitingTaskList skippingWaitingTasks_
Provenance const * provenance_() const final
ProducedProductResolver(std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
std::atomic< bool > prefetchRequested_
ProductProvenanceRetriever const * provRetriever_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
void connectTo(ProductResolverBase const &, Principal const *) final
void resetBranchDescription(std::shared_ptr< BranchDescription const > bd)
std::string const & resolvedModuleLabel_() const override
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
bool productUnavailable_() const override
void throwProductDeletedException() const
bool productUnavailable_() const final
Principal const * parentPrincipal_
BranchDescription const & branchDescription_() const override
WaitingTaskList waitingTasks_
ProducedProductResolver::ProductStatus ProductStatus
UnscheduledAuxiliary const * aux_
ProductResolverBase const * realProduct_
void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) final
std::atomic< unsigned int > lastSkipCurrentCheckIndex_
std::atomic< bool > prefetchRequested_
bool productWasDeleted_() const override
BranchDescription const & branchDescription_() const final
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
void mergeProduct(std::unique_ptr< WrapperBase > edp) const
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod) const final
std::atomic< bool > prefetchRequested_
bool productResolved_() const final
std::atomic< unsigned int > lastCheckIndex_
bool unscheduledWasNotRun_() const override
void setProvenance_(ProductProvenanceRetriever const *provRetriever, ProcessHistory const &ph, ProductID const &pid) final
bool unscheduledWasNotRun_() const override
AliasProductResolver(std::shared_ptr< BranchDescription const > bd, ProducedProductResolver &realProduct)
ProducedProductResolver::ProductStatus ProductStatus
bool productResolved_() const final
virtual bool isFromCurrentProcess() const =0
void setProduct(std::unique_ptr< WrapperBase > edp) const
std::atomic< bool > skippingPrefetchRequested_
std::atomic< ProductStatus > theStatus_
std::vector< bool > ambiguous_
Resolution resolveProductImpl(FUNC resolver) const
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
bool unscheduledWasNotRun_() const override
virtual bool unscheduledWasNotRun_() const =0
ProductStatus defaultStatus() const
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
bool productWasDeleted_() const final
BranchDescription const & branchDescription_() const override
std::vector< ProductResolverIndex > matchingHolders_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
bool productWasDeleted_() const override
virtual void retrieveAndMerge_(Principal const &principal) const
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) final
ProductProvenance const * productProvenancePtr_() const final
ProducedProductResolver::ProductStatus ProductStatus
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
ProductData const & getProductData() const
std::shared_ptr< BranchDescription const > bd_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
bool singleProduct_() const final
std::string const & resolvedModuleLabel_() const override
PuttableProductResolver(std::shared_ptr< BranchDescription const > bd)
Provenance const * provenance_() const final
SingleChoiceNoProcessProductResolver(ProductResolverIndex iChoice)
virtual Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
void setProcessHistory_(ProcessHistory const &ph) final
WaitingTaskList waitingTasks_
std::string const & moduleLabel() const
ProductResolverIndex realResolverIndex_
void setFailedStatus() const