test
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::SourceProductHolder Class Reference

#include <ProductHolder.h>

Inheritance diagram for edm::SourceProductHolder:
edm::ProducedProductHolder edm::ProductHolderBase

Public Member Functions

 SourceProductHolder (std::shared_ptr< BranchDescription const > bd)
 
virtual ~SourceProductHolder ()
 
- 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 mergeProduct (std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
 
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
 
WrapperBase const * product () const
 
WrapperBaseproduct ()
 
ProductData const & productData () const
 
ProductDataproductData ()
 
 ProductHolderBase ()
 
 ProductHolderBase (ProductHolderBase const &)=delete
 
ProductID const & productID () const
 
std::string const & productInstanceName () const
 
ProductProvenance const * productProvenancePtr () const
 
TypeID productType () const
 
bool productUnavailable () const
 
bool productWasDeleted () const
 
Provenance const * provenance () const
 
bool provenanceAvailable () const
 
bool putOrMergeProduct () const
 
void putProduct (std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
 
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, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
void setProcessHistory (ProcessHistory const &ph)
 
void setProductDeleted ()
 
void setProvenance (ProductProvenanceRetriever const *provRetriever, ProcessHistory const &ph, ProductID const &pid)
 
bool singleProduct () const
 
void swap (ProductHolderBase &rhs)
 
void throwProductDeletedException () const
 
void unsafe_deleteProduct () 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, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
 
virtual ProductStatusstatus_ () const override
 
virtual void swap_ (ProductHolderBase &rhs) override
 

Private Attributes

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 369 of file ProductHolder.h.

Constructor & Destructor Documentation

edm::SourceProductHolder::SourceProductHolder ( std::shared_ptr< BranchDescription const >  bd)
inlineexplicit
edm::SourceProductHolder::~SourceProductHolder ( )
virtual

Definition at line 34 of file ProductHolder.cc.

34 {}

Member Function Documentation

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

Implements edm::ProductHolderBase.

Definition at line 386 of file ProductHolder.h.

References productData_.

386 {return productData_;}
virtual ProductData& edm::SourceProductHolder::getProductData ( )
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 387 of file ProductHolder.h.

References productData_.

387 {return productData_;}
virtual bool edm::SourceProductHolder::onDemand_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 385 of file ProductHolder.h.

385 {return false;}
virtual void edm::SourceProductHolder::resetStatus_ ( )
inlineoverrideprivatevirtual
ProductData const * edm::SourceProductHolder::resolveProduct_ ( ResolveStatus resolveStatus,
Principal const &  principal,
bool  skipCurrentProcess,
SharedResourcesAcquirer sra,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 80 of file ProductHolder.cc.

References edm::ProductHolderBase::product(), productData_, edm::ProductHolderBase::ProductFound, edm::ProductHolderBase::ProductNotFound, edm::ProductHolderBase::productWasDeleted(), and edm::ProductHolderBase::throwProductDeletedException().

84  {
85  if (!skipCurrentProcess) {
86  if(productWasDeleted()) {
88  }
89  if(product() && product()->isPresent()) {
90  resolveStatus = ProductFound;
91  return &productData_;
92  }
93  }
94  resolveStatus = ProductNotFound;
95  return nullptr;
96  }
WrapperBase const * product() const
Definition: ProductHolder.h:85
bool productWasDeleted() const
Definition: ProductHolder.h:82
void throwProductDeletedException() const
virtual ProductStatus& edm::SourceProductHolder::status_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProducedProductHolder.

Definition at line 388 of file ProductHolder.h.

References theStatus_.

388 {return theStatus_;}
virtual void edm::SourceProductHolder::swap_ ( ProductHolderBase rhs)
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 374 of file ProductHolder.h.

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

374  {
375  SourceProductHolder& other = dynamic_cast<SourceProductHolder&>(rhs);
376  edm::swap(productData_, other.productData_);
377  std::swap(theStatus_, other.theStatus_);
378  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
SourceProductHolder(std::shared_ptr< BranchDescription const > bd)

Member Data Documentation

ProductData edm::SourceProductHolder::productData_
private

Definition at line 390 of file ProductHolder.h.

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

ProductStatus edm::SourceProductHolder::theStatus_
mutableprivate

Definition at line 391 of file ProductHolder.h.

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