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,
118 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
140 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
154 bool skipCurrentProcess,
159 bool skipCurrentProcess,
164 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 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,
265 skipCurrentProcess =
false;
266 return realProduct_->resolveProduct(*parentPrincipal_, skipCurrentProcess, sra, mcc);
270 bool skipCurrentProcess,
273 skipCurrentProcess =
false;
274 realProduct_->prefetchAsync( waitTask, *parentPrincipal_, skipCurrentProcess, sra, mcc);
277 if (realProduct_)
return realProduct_->unscheduledWasNotRun();
278 throwNullRealProduct();
285 iSkipCurrentProcess =
false;
286 return realProduct_->productWasFetchedAndIsValid(iSkipCurrentProcess);
289 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
301 void throwNullRealProduct()
const;
304 std::shared_ptr<BranchDescription const>
bd_;
313 std::vector<bool>
const& ambiguous);
317 void tryPrefetchResolverAsync(
unsigned int iProcessingIndex,
319 bool skipCurrentProcess,
324 bool dataValidFromResolver(
unsigned int iProcessingIndex,
326 bool iSkipCurrentProcess) const;
328 void prefetchFailed(
unsigned int iProcessingIndex,
330 bool iSkipCurrentProcess,
331 std::exception_ptr iExceptPtr) const;
333 unsigned int unsetIndexValue() const;
335 bool skipCurrentProcess,
340 bool skipCurrentProcess,
364 bool skipCurrentProcess,
368 void setCache(
bool skipCurrentProcess,
ProductResolverIndex index, std::exception_ptr exceptionPtr)
const;
391 bool skipCurrentProcess,
396 bool skipCurrentProcess,
405 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
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
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) 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_
virtual void resetFailedFromThisProcess()
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
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
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
ProductData const & getProductData() const
std::shared_ptr< BranchDescription const > bd_
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
std::atomic< bool > recheckedAtEnd_
WaitingTaskList waitingTasks_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
std::string const & moduleLabel() const
ProductResolverIndex realResolverIndex_
void setFailedStatus() const