CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::UnscheduledProductHolder Class Reference

#include <ProductHolder.h>

Inheritance diagram for edm::UnscheduledProductHolder:
edm::ProducedProductHolder edm::ProductHolderBase

Public Member Functions

 UnscheduledProductHolder (std::shared_ptr< BranchDescription const > bd, Principal *principal)
 
virtual ~UnscheduledProductHolder ()
 
- Public Member Functions inherited from edm::ProducedProductHolder
 ProducedProductHolder ()
 
void producerCompleted ()
 
void producerStarted ()
 
ProductStatusstatus () const
 
virtual ~ProducedProductHolder ()
 
- Public Member Functions inherited from edm::ProductHolderBase
BranchDescription const & branchDescription () const
 
void checkType (WrapperBase const &prod) const
 
void deleteProduct ()
 
void mergeProduct (std::unique_ptr< WrapperBase > edp, ProductProvenance &productProvenance)
 
void mergeProduct (std::unique_ptr< WrapperBase > edp) const
 
void mergeTheProduct (std::unique_ptr< WrapperBase > edp) const
 
std::string const & moduleLabel () const
 
bool onDemand () const
 
ProductHolderBaseoperator= (ProductHolderBase const &)=delete
 
std::string const & processName () const
 
WrapperBaseproduct () const
 
ProductData const & productData () const
 
ProductDataproductData ()
 
 ProductHolderBase ()
 
 ProductHolderBase (ProductHolderBase const &)=delete
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenanceproductProvenancePtr () const
 
TypeID productType () const
 
bool productUnavailable () const
 
bool productWasDeleted () const
 
Provenanceprovenance () const
 
bool provenanceAvailable () const
 
bool putOrMergeProduct () const
 
void putProduct (std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance)
 
void putProduct (std::unique_ptr< WrapperBase > edp) const
 
void reallyCheckType (WrapperBase const &prod) const
 
void resetBranchDescription (std::shared_ptr< BranchDescription const > bd)
 
void resetProductData ()
 
void resetStatus ()
 
std::string const & resolvedModuleLabel () const
 
ProductData const * resolveProduct (ResolveStatus &resolveStatus, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
void setPrincipal (Principal *principal)
 
void setProcessHistory (ProcessHistory const &ph)
 
void setProductDeleted ()
 
void setProductProvenance (ProductProvenance const &prov) const
 
void setProvenance (std::shared_ptr< ProductProvenanceRetriever > provRetriever, ProcessHistory const &ph, ProductID const &pid)
 
bool singleProduct () const
 
void swap (ProductHolderBase &rhs)
 
void throwProductDeletedException () const
 
void write (std::ostream &os) const
 
virtual ~ProductHolderBase ()
 

Private Member Functions

virtual ProductData const & getProductData () const override
 
virtual ProductDatagetProductData () override
 
virtual bool onDemand_ () const override
 
virtual void resetStatus_ () override
 
virtual ProductData const * resolveProduct_ (ResolveStatus &resolveStatus, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
 
virtual ProductStatusstatus_ () const override
 
virtual void swap_ (ProductHolderBase &rhs) override
 

Private Attributes

Principalprincipal_
 
ProductData productData_
 
ProductStatus theStatus_
 

Additional Inherited Members

- Public Types inherited from edm::ProducedProductHolder
enum  ProductStatus {
  Present = 0, NotRun = 3, NotCompleted = 4, NotPut = 5,
  UnscheduledNotRun = 6, ProductDeleted =7, Uninitialized = 0xff
}
 
- Public Types inherited from edm::ProductHolderBase
enum  ResolveStatus { ProductFound, ProductNotFound, Ambiguous }
 

Detailed Description

Definition at line 339 of file ProductHolder.h.

Constructor & Destructor Documentation

edm::UnscheduledProductHolder::UnscheduledProductHolder ( std::shared_ptr< BranchDescription const >  bd,
Principal principal 
)
inlineexplicit
edm::UnscheduledProductHolder::~UnscheduledProductHolder ( )
virtual

Definition at line 33 of file ProductHolder.cc.

33 {}

Member Function Documentation

virtual ProductData const& edm::UnscheduledProductHolder::getProductData ( ) const
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 356 of file ProductHolder.h.

References productData_.

356 {return productData_;}
virtual ProductData& edm::UnscheduledProductHolder::getProductData ( )
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 357 of file ProductHolder.h.

References productData_.

357 {return productData_;}
virtual bool edm::UnscheduledProductHolder::onDemand_ ( ) const
inlineoverrideprivatevirtual
virtual void edm::UnscheduledProductHolder::resetStatus_ ( )
inlineoverrideprivatevirtual
ProductData const * edm::UnscheduledProductHolder::resolveProduct_ ( ResolveStatus resolveStatus,
bool  skipCurrentProcess,
SharedResourcesAcquirer sra,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 95 of file ProductHolder.cc.

References edm::ProductHolderBase::moduleLabel(), principal_, edm::ProductHolderBase::product(), productData_, edm::ProductHolderBase::ProductFound, edm::ProductHolderBase::ProductNotFound, edm::ProductHolderBase::productWasDeleted(), edm::ProductHolderBase::throwProductDeletedException(), and edm::Principal::unscheduledFill().

98  {
99  if (!skipCurrentProcess) {
100  if(productWasDeleted()) {
102  }
103  if(product() && product()->isPresent()) {
104  resolveStatus = ProductFound;
105  return &productData_;
106  }
107  principal_->unscheduledFill(moduleLabel(), sra, mcc);
108  if(product() && product()->isPresent()) {
109  resolveStatus = ProductFound;
110  return &productData_;
111  }
112  }
113  resolveStatus = ProductNotFound;
114  return nullptr;
115  }
WrapperBase * product() const
Definition: ProductHolder.h:84
std::string const & moduleLabel() const
bool productWasDeleted() const
Definition: ProductHolder.h:81
void throwProductDeletedException() const
virtual bool unscheduledFill(std::string const &moduleLabel, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const =0
virtual ProductStatus& edm::UnscheduledProductHolder::status_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProducedProductHolder.

Definition at line 358 of file ProductHolder.h.

References theStatus_.

358 {return theStatus_;}
virtual void edm::UnscheduledProductHolder::swap_ ( ProductHolderBase rhs)
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 345 of file ProductHolder.h.

References productData_, edm::swap(), std::swap(), and theStatus_.

345  {
346  UnscheduledProductHolder& other = dynamic_cast<UnscheduledProductHolder&>(rhs);
347  edm::swap(productData_, other.productData_);
348  std::swap(theStatus_, other.theStatus_);
349  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
UnscheduledProductHolder(std::shared_ptr< BranchDescription const > bd, Principal *principal)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

Principal* edm::UnscheduledProductHolder::principal_
private

Definition at line 362 of file ProductHolder.h.

Referenced by resolveProduct_().

ProductData edm::UnscheduledProductHolder::productData_
private

Definition at line 360 of file ProductHolder.h.

Referenced by getProductData(), resolveProduct_(), and swap_().

ProductStatus edm::UnscheduledProductHolder::theStatus_
mutableprivate

Definition at line 361 of file ProductHolder.h.

Referenced by resetStatus_(), status_(), and swap_().