CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::PuttableProductResolver Class Reference

#include <ProductResolvers.h>

Inheritance diagram for edm::PuttableProductResolver:
edm::ProducedProductResolver edm::DataManagingProductResolver edm::ProductPutterBase edm::DataManagingOrAliasProductResolver edm::ProductResolverBase

Public Member Functions

 PuttableProductResolver (std::shared_ptr< BranchDescription const > bd)
 
void setupUnscheduled (UnscheduledConfigurator const &) final
 
- Public Member Functions inherited from edm::ProducedProductResolver
 ProducedProductResolver (std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
 
- Public Member Functions inherited from edm::DataManagingProductResolver
void connectTo (ProductResolverBase const &, Principal const *) final
 
 DataManagingProductResolver (std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)
 
void resetProductData_ (bool deleteEarly) override
 
void resetStatus ()
 
template<bool callResolver, typename FUNC >
ProductResolverBase::Resolution resolveProductImpl (FUNC resolver) const
 
- Public Member Functions inherited from edm::DataManagingOrAliasProductResolver
 DataManagingOrAliasProductResolver ()
 
- Public Member Functions inherited from edm::ProductResolverBase
BranchDescription const & branchDescription () const
 
std::string const & moduleLabel () const
 
ProductResolverBaseoperator= (ProductResolverBase const &)=delete
 
void prefetchAsync (WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
std::string const & processName () const
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenance const * productProvenancePtr () const
 
bool productResolved () const
 
 ProductResolverBase ()
 
 ProductResolverBase (ProductResolverBase const &)=delete
 
TypeID productType () const
 
bool productUnavailable () const
 
bool productWasDeleted () const
 
bool productWasFetchedAndIsValid (bool iSkipCurrentProcess) const
 
Provenance const * provenance () const
 
bool provenanceAvailable () const
 
void resetBranchDescription (std::shared_ptr< BranchDescription const > bd)
 
void resetProductData ()
 
std::string const & resolvedModuleLabel () const
 
Resolution resolveProduct (Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
void retrieveAndMerge (Principal const &principal, MergeableRunProductMetadata const *mergeableRunProductMetadata) const
 
void setMergeableRunProductMetadata (MergeableRunProductMetadata const *mrpm)
 
void setProductID (ProductID const &pid)
 
void setProductProvenanceRetriever (ProductProvenanceRetriever const *provRetriever)
 
bool singleProduct () const
 
StableProvenance const * stableProvenance () const
 
void unsafe_deleteProduct () const
 
bool unscheduledWasNotRun () const
 
void write (std::ostream &os) const
 
virtual ~ProductResolverBase ()
 
- Public Member Functions inherited from edm::ProductPutterBase
 ProductPutterBase ()=default
 
virtual ~ProductPutterBase ()=default
 

Private Member Functions

void prefetchAsync_ (WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
 
Resolution resolveProduct_ (Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
 
bool unscheduledWasNotRun_ () const override
 

Private Attributes

WaitingTaskListwaitingTasks_ = nullptr
 

Additional Inherited Members

- Public Types inherited from edm::DataManagingProductResolver
enum  ProductStatus {
  ProductStatus::ProductSet, ProductStatus::NotPut, ProductStatus::ResolveFailed, ProductStatus::ResolveNotRun,
  ProductStatus::ProductDeleted
}
 
- Protected Member Functions inherited from edm::ProducedProductResolver
void putProduct (std::unique_ptr< WrapperBase > edp) const override
 
- Protected Member Functions inherited from edm::DataManagingProductResolver
void checkType (WrapperBase const &prod) const
 
ProductStatus defaultStatus () const
 
ProductData const & getProductData () const final
 
template<bool callResolver, typename FUNC >
Resolution resolveProductImpl (FUNC resolver) const
 
void setFailedStatus () const
 
void setMergeableRunProductMetadataInProductData (MergeableRunProductMetadata const *)
 
void setProduct (std::unique_ptr< WrapperBase > edp) const
 
void setProduct (std::shared_ptr< WrapperBase > edp) const
 
ProductStatus status () const
 

Detailed Description

Definition at line 201 of file ProductResolvers.h.

Constructor & Destructor Documentation

◆ PuttableProductResolver()

edm::PuttableProductResolver::PuttableProductResolver ( std::shared_ptr< BranchDescription const >  bd)
inlineexplicit

Definition at line 203 of file ProductResolvers.h.

ProducedProductResolver(std::shared_ptr< BranchDescription const > bd, ProductStatus iDefaultStatus)

Member Function Documentation

◆ prefetchAsync_()

void edm::PuttableProductResolver::prefetchAsync_ ( WaitingTaskHolder  waitTask,
Principal const &  principal,
bool  skipCurrentProcess,
ServiceToken const &  token,
SharedResourcesAcquirer sra,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::ProductResolverBase.

Definition at line 393 of file ProductResolvers.cc.

References edm::WaitingTaskList::add(), edm::BranchDescription::availableOnlyAtEndTransition(), edm::ProductResolverBase::branchDescription(), edm::ParentContext::globalContext(), edm::InProcess, edm::ParentContext::isAtEndTransition(), edm::GlobalContext::kAccessInputProcessBlock, edm::ModuleCallingContext::parent(), edm::GlobalContext::transition(), and waitingTasks_.

398  {
399  if (not skipCurrentProcess) {
400  if (branchDescription().branchType() == InProcess &&
401  mcc->parent().globalContext()->transition() == GlobalContext::Transition::kAccessInputProcessBlock) {
402  // This is an accessInputProcessBlock transition
403  // We cannot access produced products in those transitions
404  // except for in SubProcesses where they should have already run.
405  return;
406  }
408  if (not mcc->parent().isAtEndTransition()) {
409  return;
410  }
411  }
412 
413  if (waitingTasks_) {
414  // using a waiting task to do a callback guarantees that the
415  // waitingTasks_ list (from the worker) will be released from
416  // waiting even if the module does not put this data product
417  // or the module has an exception while running
418  waitingTasks_->add(waitTask);
419  }
420  }
421  }
void add(oneapi::tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
BranchDescription const & branchDescription() const
bool availableOnlyAtEndTransition() const

◆ resolveProduct_()

ProductResolverBase::Resolution edm::PuttableProductResolver::resolveProduct_ ( Principal const &  principal,
bool  skipCurrentProcess,
SharedResourcesAcquirer sra,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::ProductResolverBase.

Definition at line 382 of file ProductResolvers.cc.

References Resolution.

385  {
386  if (!skipCurrentProcess) {
387  //'false' means never call the lambda function
388  return resolveProductImpl<false>([]() { return; });
389  }
390  return Resolution(nullptr);
391  }

◆ setupUnscheduled()

void edm::PuttableProductResolver::setupUnscheduled ( UnscheduledConfigurator const &  iConfigure)
finalvirtual

Reimplemented from edm::ProductResolverBase.

Definition at line 423 of file ProductResolvers.cc.

References edm::ProductResolverBase::branchDescription(), edm::UnscheduledConfigurator::findWorker(), edm::ProductResolverBase::moduleLabel(), and waitingTasks_.

423  {
424  auto worker = iConfigure.findWorker(branchDescription().moduleLabel());
425  if (worker) {
426  waitingTasks_ = &worker->waitingTaskList();
427  }
428  }
std::string const & moduleLabel() const
BranchDescription const & branchDescription() const

◆ unscheduledWasNotRun_()

bool edm::PuttableProductResolver::unscheduledWasNotRun_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProductResolverBase.

Definition at line 219 of file ProductResolvers.h.

219 { return false; }

Member Data Documentation

◆ waitingTasks_

WaitingTaskList* edm::PuttableProductResolver::waitingTasks_ = nullptr
private

Definition at line 226 of file ProductResolvers.h.

Referenced by prefetchAsync_(), and setupUnscheduled().