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;
75 virtual void putOrMergeProduct_(std::unique_ptr<WrapperBase> prod)
const override final;
100 m_prefetchRequested{
false },
110 bool skipCurrentProcess,
115 bool skipCurrentProcess,
118 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
140 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
154 bool skipCurrentProcess,
159 bool skipCurrentProcess,
164 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
178 prefetchRequested_(
false){}
184 bool skipCurrentProcess,
189 bool skipCurrentProcess,
208 realProduct_.connectTo(iOther, iParentPrincipal );
213 bool skipCurrentProcess,
216 return realProduct_.resolveProduct(principal, skipCurrentProcess, sra, mcc);}
219 bool skipCurrentProcess,
222 realProduct_.prefetchAsync(waitTask, principal, skipCurrentProcess, sra, mcc);
227 return realProduct_.productResolved(); }
230 return realProduct_.productWasFetchedAndIsValid(iSkipCurrentProcess);
233 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
247 std::shared_ptr<BranchDescription const>
bd_;
256 realProduct_ = &iOther;
257 parentPrincipal_ = iParentPrincipal;
262 bool skipCurrentProcess,
264 ModuleCallingContext const* mcc)
const override {
return realProduct_->resolveProduct(*parentPrincipal_, skipCurrentProcess, sra, mcc);}
267 bool skipCurrentProcess,
270 realProduct_->prefetchAsync( waitTask, *parentPrincipal_, skipCurrentProcess, sra, mcc);
273 if (realProduct_)
return realProduct_->unscheduledWasNotRun();
274 throwNullRealProduct();
278 virtual bool productResolved_() const override final {
return realProduct_->productResolved(); }
281 return realProduct_->productWasFetchedAndIsValid(iSkipCurrentProcess); }
283 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
295 void throwNullRealProduct()
const;
298 std::shared_ptr<BranchDescription const>
bd_;
307 std::vector<bool>
const& ambiguous);
311 void tryPrefetchResolverAsync(
unsigned int iProcessingIndex,
313 bool skipCurrentProcess,
318 bool dataValidFromResolver(
unsigned int iProcessingIndex,
320 bool iSkipCurrentProcess) const;
322 void prefetchFailed(
unsigned int iProcessingIndex,
324 bool iSkipCurrentProcess,
325 std::exception_ptr iExceptPtr) const;
327 unsigned int unsetIndexValue() const;
329 bool skipCurrentProcess,
334 bool skipCurrentProcess,
358 bool skipCurrentProcess,
362 void setCache(
bool skipCurrentProcess,
ProductResolverIndex index, std::exception_ptr exceptionPtr)
const;
385 bool skipCurrentProcess,
390 bool skipCurrentProcess,
399 virtual void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
virtual bool productResolved_() const override final
ProducedProductResolver & realProduct_
Provenance const & provenance() const
virtual void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) override final
virtual Provenance const * provenance_() const override final
unsigned int ProductResolverIndex
virtual std::string const & resolvedModuleLabel_() const override final
std::shared_ptr< BranchDescription const > const & branchDescription() const
virtual bool productUnavailable_() const override final
virtual Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
void checkType(WrapperBase const &prod) const
virtual std::string const & resolvedModuleLabel_() const override
ParentProcessProductResolver(std::shared_ptr< BranchDescription const > bd)
WaitingTaskList m_waitingTasks
ProducedProductResolver::ProductStatus ProductStatus
virtual void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override final
ProductStatus const defaultStatus_
std::shared_ptr< BranchDescription const > bd_
virtual bool unscheduledWasNotRun_() const override
virtual void resetProductData_(bool deleteEarly) override
UnscheduledProductResolver(std::shared_ptr< BranchDescription const > bd)
virtual bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
ProductStatus status() const
virtual void setupUnscheduled(UnscheduledConfigurator const &)
virtual void putProduct_(std::unique_ptr< WrapperBase > edp) const =0
virtual bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override final
virtual void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
DataManagingProductResolver(std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
WaitingTaskList skippingWaitingTasks_
virtual bool productWasDeleted_() const override final
virtual bool productWasDeleted_() const override
ProducedProductResolver(std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
std::atomic< bool > prefetchRequested_
virtual std::string const & resolvedModuleLabel_() const override
ProductProvenanceRetriever const * provRetriever_
virtual BranchDescription const & branchDescription_() const override final
virtual Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
virtual bool productUnavailable_() const override
void resetBranchDescription(std::shared_ptr< BranchDescription const > bd)
virtual bool unscheduledWasNotRun_() const override
void throwProductDeletedException() const
Principal const * parentPrincipal_
virtual Provenance const * provenance_() const override final
WaitingTaskList waitingTasks_
ProducedProductResolver::ProductStatus ProductStatus
virtual Provenance const * provenance_() const override final
UnscheduledAuxiliary const * aux_
virtual void setProcessHistory_(ProcessHistory const &ph) override final
ProductResolverBase const * realProduct_
virtual std::string const & resolvedModuleLabel_() const override
std::atomic< unsigned int > lastSkipCurrentCheckIndex_
virtual bool productResolved_() const override final
virtual void resetFailedFromThisProcess()
std::atomic< bool > prefetchRequested_
virtual BranchDescription const & branchDescription_() const override
void mergeProduct(std::unique_ptr< WrapperBase > edp) const
std::atomic< bool > prefetchRequested_
std::atomic< unsigned int > lastCheckIndex_
virtual void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
AliasProductResolver(std::shared_ptr< BranchDescription const > bd, ProducedProductResolver &realProduct)
ProducedProductResolver::ProductStatus ProductStatus
virtual void setProvenance_(ProductProvenanceRetriever const *provRetriever, ProcessHistory const &ph, ProductID const &pid) override final
virtual bool isFromCurrentProcess() const =0
virtual ProductProvenance const * productProvenancePtr_() const override final
void setProduct(std::unique_ptr< WrapperBase > edp) const
virtual BranchDescription const & branchDescription_() const override
std::atomic< bool > skippingPrefetchRequested_
std::atomic< ProductStatus > theStatus_
virtual bool singleProduct_() const override final
std::vector< bool > ambiguous_
Resolution resolveProductImpl(FUNC resolver) const
virtual bool productUnavailable_() const override
virtual bool unscheduledWasNotRun_() const =0
virtual bool unscheduledWasNotRun_() const override
ProductStatus defaultStatus() const
virtual void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
std::vector< ProductResolverIndex > matchingHolders_
virtual void retrieveAndMerge_(Principal const &principal) const
virtual void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod) const override final
virtual void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) override final
virtual void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
ProducedProductResolver::ProductStatus ProductStatus
ProductData const & getProductData() const
std::shared_ptr< BranchDescription const > bd_
virtual bool unscheduledWasNotRun_() const override
virtual bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override final
PuttableProductResolver(std::shared_ptr< BranchDescription const > bd)
SingleChoiceNoProcessProductResolver(ProductResolverIndex iChoice)
virtual bool productWasDeleted_() const override
virtual Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
std::atomic< bool > recheckedAtEnd_
WaitingTaskList waitingTasks_
virtual void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
std::string const & moduleLabel() const
virtual bool productResolved_() const override final
virtual void connectTo(ProductResolverBase const &, Principal const *) override final
ProductResolverIndex realResolverIndex_
void setFailedStatus() const