CMS 3D CMS Logo

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

#include <ProductHolder.h>

Inheritance diagram for edm::NoProcessProductHolder:
edm::ProductHolderBase

Public Types

typedef
ProducedProductHolder::ProductStatus 
ProductStatus
 
- Public Types inherited from edm::ProductHolderBase
enum  ResolveStatus { ProductFound, ProductNotFound, Ambiguous }
 

Public Member Functions

 NoProcessProductHolder (std::vector< ProductHolderIndex > const &matchingHolders, std::vector< bool > const &ambiguous, Principal *principal)
 
virtual ~NoProcessProductHolder ()
 
- 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 BranchDescription const & branchDescription_ () const override
 
virtual void checkType_ (WrapperBase const &prod) const override
 
virtual ProductData const & getProductData () const override
 
virtual ProductDatagetProductData () override
 
virtual void mergeProduct_ (std::unique_ptr< WrapperBase > edp, ProductProvenance &productProvenance) override
 
virtual void mergeProduct_ (std::unique_ptr< WrapperBase > edp) const override
 
virtual bool onDemand_ () const override
 
virtual ProductProvenanceproductProvenancePtr_ () const override
 
virtual bool productUnavailable_ () const override
 
virtual bool productWasDeleted_ () const override
 
virtual bool putOrMergeProduct_ () const override
 
virtual void putProduct_ (std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) override
 
virtual void putProduct_ (std::unique_ptr< WrapperBase > edp) const override
 
virtual void resetBranchDescription_ (std::shared_ptr< BranchDescription const > bd) override
 
virtual void resetProductData_ () override
 
virtual void resetStatus_ () override
 
virtual std::string const & resolvedModuleLabel_ () const override
 
virtual ProductData const * resolveProduct_ (ResolveStatus &resolveStatus, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
 
virtual void setPrincipal_ (Principal *principal) override
 
virtual void setProcessHistory_ (ProcessHistory const &ph) override
 
virtual void setProductDeleted_ () override
 
virtual void setProvenance_ (std::shared_ptr< ProductProvenanceRetriever > provRetriever, ProcessHistory const &ph, ProductID const &pid) override
 
virtual bool singleProduct_ () const override
 
virtual void swap_ (ProductHolderBase &rhs) override
 

Private Attributes

std::vector< bool > ambiguous_
 
std::vector< ProductHolderIndexmatchingHolders_
 
Principalprincipal_
 

Detailed Description

Definition at line 447 of file ProductHolder.h.

Member Typedef Documentation

Definition at line 449 of file ProductHolder.h.

Constructor & Destructor Documentation

edm::NoProcessProductHolder::NoProcessProductHolder ( std::vector< ProductHolderIndex > const &  matchingHolders,
std::vector< bool > const &  ambiguous,
Principal principal 
)

Definition at line 388 of file ProductHolder.cc.

References ambiguous_, assert(), and matchingHolders_.

390  :
391  matchingHolders_(matchingHolders),
392  ambiguous_(ambiguous),
394  assert(ambiguous_.size() == matchingHolders_.size());
395  }
std::vector< ProductHolderIndex > matchingHolders_
assert(m_qm.get())
std::vector< bool > ambiguous_
edm::NoProcessProductHolder::~NoProcessProductHolder ( )
virtual

Definition at line 36 of file ProductHolder.cc.

36 {}

Member Function Documentation

BranchDescription const & edm::NoProcessProductHolder::branchDescription_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 550 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

550  {
552  << "NoProcessProductHolder::branchDescription_() not implemented and should never be called.\n"
553  << "Contact a Framework developer\n";
554  }
void edm::NoProcessProductHolder::checkType_ ( WrapperBase const &  prod) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 538 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

538  {
540  << "NoProcessProductHolder::checkType_() not implemented and should never be called.\n"
541  << "Contact a Framework developer\n";
542  }
ProductData const & edm::NoProcessProductHolder::getProductData ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 397 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

397  {
399  << "NoProcessProductHolder::getProductData() not implemented and should never be called.\n"
400  << "Contact a Framework developer\n";
401  }
ProductData & edm::NoProcessProductHolder::getProductData ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 403 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

403  {
405  << "NoProcessProductHolder::getProductData() not implemented and should never be called.\n"
406  << "Contact a Framework developer\n";
407  }
void edm::NoProcessProductHolder::mergeProduct_ ( std::unique_ptr< WrapperBase edp,
ProductProvenance productProvenance 
)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 520 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

520  {
522  << "NoProcessProductHolder::mergeProduct_() not implemented and should never be called.\n"
523  << "Contact a Framework developer\n";
524  }
void edm::NoProcessProductHolder::mergeProduct_ ( std::unique_ptr< WrapperBase edp) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 526 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

526  {
528  << "NoProcessProductHolder::mergeProduct_() not implemented and should never be called.\n"
529  << "Contact a Framework developer\n";
530  }
bool edm::NoProcessProductHolder::onDemand_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 490 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

490  {
492  << "NoProcessProductHolder::onDemand_() not implemented and should never be called.\n"
493  << "Contact a Framework developer\n";
494  }
ProductProvenance * edm::NoProcessProductHolder::productProvenancePtr_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 473 of file ProductHolder.cc.

473  {
474  return nullptr;
475  }
bool edm::NoProcessProductHolder::productUnavailable_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 496 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

496  {
498  << "NoProcessProductHolder::productUnavailable_() not implemented and should never be called.\n"
499  << "Contact a Framework developer\n";
500  }
bool edm::NoProcessProductHolder::productWasDeleted_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 502 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

502  {
504  << "NoProcessProductHolder::productWasDeleted_() not implemented and should never be called.\n"
505  << "Contact a Framework developer\n";
506  }
bool edm::NoProcessProductHolder::putOrMergeProduct_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 532 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

532  {
534  << "NoProcessProductHolder::putOrMergeProduct_() not implemented and should never be called.\n"
535  << "Contact a Framework developer\n";
536  }
void edm::NoProcessProductHolder::putProduct_ ( std::unique_ptr< WrapperBase edp,
ProductProvenance const &  productProvenance 
)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 508 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

508  {
510  << "NoProcessProductHolder::putProduct_() not implemented and should never be called.\n"
511  << "Contact a Framework developer\n";
512  }
void edm::NoProcessProductHolder::putProduct_ ( std::unique_ptr< WrapperBase edp) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 514 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

514  {
516  << "NoProcessProductHolder::putProduct_() not implemented and should never be called.\n"
517  << "Contact a Framework developer\n";
518  }
void edm::NoProcessProductHolder::resetBranchDescription_ ( std::shared_ptr< BranchDescription const >  bd)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 556 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

556  {
558  << "NoProcessProductHolder::resetBranchDescription_() not implemented and should never be called.\n"
559  << "Contact a Framework developer\n";
560  }
void edm::NoProcessProductHolder::resetProductData_ ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 477 of file ProductHolder.cc.

477  {
478  }
void edm::NoProcessProductHolder::resetStatus_ ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 464 of file ProductHolder.cc.

464  {
465  }
virtual std::string const& edm::NoProcessProductHolder::resolvedModuleLabel_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 475 of file ProductHolder.h.

References edm::ProductHolderBase::moduleLabel().

475 {return moduleLabel();}
std::string const & moduleLabel() const
ProductData const * edm::NoProcessProductHolder::resolveProduct_ ( ResolveStatus resolveStatus,
bool  skipCurrentProcess,
SharedResourcesAcquirer sra,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 409 of file ProductHolder.cc.

References edm::ProductHolderBase::Ambiguous, ambiguous_, assert(), edm::Principal::getProductHolderByIndex(), relval_steps::k, edm::Principal::lookupProcessOrder(), matchingHolders_, principal_, edm::ProductHolderIndexInvalid, edm::ProductHolderBase::ProductNotFound, and edm::ProductHolderBase::resolveProduct().

412  {
413  std::vector<unsigned int> const& lookupProcessOrder = principal_->lookupProcessOrder();
414  for(unsigned int k : lookupProcessOrder) {
415  assert(k < ambiguous_.size());
416  if(k == 0) break; // Done
417  if(ambiguous_[k]) {
418  resolveStatus = Ambiguous;
419  return nullptr;
420  }
423  ProductData const* pd = productHolder->resolveProduct(resolveStatus, skipCurrentProcess, sra, mcc);
424  if(pd != nullptr) return pd;
425  }
426  }
427  resolveStatus = ProductNotFound;
428  return nullptr;
429  }
std::vector< ProductHolderIndex > matchingHolders_
assert(m_qm.get())
ConstProductHolderPtr getProductHolderByIndex(ProductHolderIndex const &oid) const
Definition: Principal.cc:463
std::vector< unsigned int > const & lookupProcessOrder() const
Definition: Principal.h:195
std::vector< bool > ambiguous_
void edm::NoProcessProductHolder::setPrincipal_ ( Principal principal)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 484 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

484  {
486  << "NoProcessProductHolder::setPrincipal__() not implemented and should never be called.\n"
487  << "Contact a Framework developer\n";
488  }
void edm::NoProcessProductHolder::setProcessHistory_ ( ProcessHistory const &  ph)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 470 of file ProductHolder.cc.

470  {
471  }
void edm::NoProcessProductHolder::setProductDeleted_ ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 544 of file ProductHolder.cc.

References Exception, and edm::errors::LogicError.

544  {
546  << "NoProcessProductHolder::setProductDeleted_() not implemented and should never be called.\n"
547  << "Contact a Framework developer\n";
548  }
void edm::NoProcessProductHolder::setProvenance_ ( std::shared_ptr< ProductProvenanceRetriever provRetriever,
ProcessHistory const &  ph,
ProductID const &  pid 
)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 467 of file ProductHolder.cc.

467  {
468  }
bool edm::NoProcessProductHolder::singleProduct_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 480 of file ProductHolder.cc.

480  {
481  return false;
482  }
void edm::NoProcessProductHolder::swap_ ( ProductHolderBase rhs)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 457 of file ProductHolder.cc.

References ambiguous_, matchingHolders_, principal_, and std::swap().

457  {
458  NoProcessProductHolder& other = dynamic_cast<NoProcessProductHolder&>(rhs);
459  ambiguous_.swap(other.ambiguous_);
460  matchingHolders_.swap(other.matchingHolders_);
461  std::swap(principal_, other.principal_);
462  }
std::vector< ProductHolderIndex > matchingHolders_
NoProcessProductHolder(std::vector< ProductHolderIndex > const &matchingHolders, std::vector< bool > const &ambiguous, Principal *principal)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< bool > ambiguous_

Member Data Documentation

std::vector<bool> edm::NoProcessProductHolder::ambiguous_
private

Definition at line 484 of file ProductHolder.h.

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

std::vector<ProductHolderIndex> edm::NoProcessProductHolder::matchingHolders_
private

Definition at line 483 of file ProductHolder.h.

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

Principal* edm::NoProcessProductHolder::principal_
private

Definition at line 485 of file ProductHolder.h.

Referenced by resolveProduct_(), and swap_().