1 #ifndef FWCore_Framework_ProductResolvers_h 2 #define FWCore_Framework_ProductResolvers_h 26 class MergeableRunProductMetadata;
27 class ProductProvenanceRetriever;
29 class ModuleCallingContext;
59 void setProduct(std::unique_ptr<WrapperBase> edp)
const;
64 template <
bool callResolver,
typename FUNC>
102 m_prefetchRequested{
false },
112 bool skipCurrentProcess,
117 bool skipCurrentProcess,
121 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
143 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
157 bool skipCurrentProcess,
162 bool skipCurrentProcess,
168 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
182 prefetchRequested_(
false){}
188 bool skipCurrentProcess,
193 bool skipCurrentProcess,
213 realProduct_.connectTo(iOther, iParentPrincipal );
218 bool skipCurrentProcess,
221 return realProduct_.resolveProduct(principal, skipCurrentProcess, sra, mcc);}
224 bool skipCurrentProcess,
228 realProduct_.prefetchAsync(waitTask, principal, skipCurrentProcess, token, sra, mcc);
233 return realProduct_.productResolved(); }
236 return realProduct_.productWasFetchedAndIsValid(iSkipCurrentProcess);
239 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
253 std::shared_ptr<BranchDescription const>
bd_;
262 realProduct_ = &iOther;
263 parentPrincipal_ = iParentPrincipal;
268 bool skipCurrentProcess,
271 skipCurrentProcess =
false;
272 return realProduct_->resolveProduct(*parentPrincipal_, skipCurrentProcess, sra, mcc);
276 bool skipCurrentProcess,
280 skipCurrentProcess =
false;
281 realProduct_->prefetchAsync( waitTask, *parentPrincipal_, skipCurrentProcess, token, sra, mcc);
284 if (realProduct_)
return realProduct_->unscheduledWasNotRun();
285 throwNullRealProduct();
292 iSkipCurrentProcess =
false;
293 return realProduct_->productWasFetchedAndIsValid(iSkipCurrentProcess);
296 void putProduct_(std::unique_ptr<WrapperBase> edp)
const override;
308 void throwNullRealProduct()
const;
311 std::shared_ptr<BranchDescription const>
bd_;
320 std::vector<bool>
const& ambiguous,
bool madeAtEnd);
324 void tryPrefetchResolverAsync(
unsigned int iProcessingIndex,
326 bool skipCurrentProcess,
331 bool dataValidFromResolver(
unsigned int iProcessingIndex,
333 bool iSkipCurrentProcess) const;
335 void prefetchFailed(
unsigned int iProcessingIndex,
337 bool iSkipCurrentProcess,
338 std::exception_ptr iExceptPtr) const;
340 unsigned int unsetIndexValue() const;
342 bool skipCurrentProcess,
347 bool skipCurrentProcess,
372 bool skipCurrentProcess,
376 void setCache(
bool skipCurrentProcess,
ProductResolverIndex index, std::exception_ptr exceptionPtr)
const;
399 bool skipCurrentProcess,
404 bool skipCurrentProcess,
414 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 mergeProduct(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *) const
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
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
virtual void setMergeableRunProductMetadata_(MergeableRunProductMetadata const *)
bool unscheduledWasNotRun_() const override
virtual void retrieveAndMerge_(Principal const &principal, MergeableRunProductMetadata const *mergeableRunProductMetadata) const
virtual bool unscheduledWasNotRun_() const =0
ProductStatus defaultStatus() const
void setMergeableRunProductMetadataInProductData(MergeableRunProductMetadata const *)
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
bool productWasDeleted_() const final
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
BranchDescription const & branchDescription_() const override
std::vector< ProductResolverIndex > matchingHolders_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
bool productWasDeleted_() const override
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