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

Member Typedef Documentation

Definition at line 434 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 382 of file ProductHolder.cc.

References ambiguous_, assert(), and matchingHolders_.

384  :
385  matchingHolders_(matchingHolders),
386  ambiguous_(ambiguous),
388  assert(ambiguous_.size() == matchingHolders_.size());
389  }
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 543 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 531 of file ProductHolder.cc.

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

531  {
533  << "NoProcessProductHolder::checkType_() not implemented and should never be called.\n"
534  << "Contact a Framework developer\n";
535  }
ProductData const & edm::NoProcessProductHolder::getProductData ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 391 of file ProductHolder.cc.

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

391  {
393  << "NoProcessProductHolder::getProductData() not implemented and should never be called.\n"
394  << "Contact a Framework developer\n";
395  }
ProductData & edm::NoProcessProductHolder::getProductData ( )
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  }
void edm::NoProcessProductHolder::mergeProduct_ ( std::unique_ptr< WrapperBase edp,
ProductProvenance productProvenance 
)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 513 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 519 of file ProductHolder.cc.

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

519  {
521  << "NoProcessProductHolder::mergeProduct_() not implemented and should never be called.\n"
522  << "Contact a Framework developer\n";
523  }
bool edm::NoProcessProductHolder::onDemand_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 483 of file ProductHolder.cc.

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

483  {
485  << "NoProcessProductHolder::onDemand_() not implemented and should never be called.\n"
486  << "Contact a Framework developer\n";
487  }
ProductProvenance * edm::NoProcessProductHolder::productProvenancePtr_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 466 of file ProductHolder.cc.

466  {
467  return nullptr;
468  }
bool edm::NoProcessProductHolder::productUnavailable_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 489 of file ProductHolder.cc.

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

489  {
491  << "NoProcessProductHolder::productUnavailable_() not implemented and should never be called.\n"
492  << "Contact a Framework developer\n";
493  }
bool edm::NoProcessProductHolder::productWasDeleted_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 495 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 525 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 501 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 507 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 549 of file ProductHolder.cc.

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

549  {
551  << "NoProcessProductHolder::resetBranchDescription_() not implemented and should never be called.\n"
552  << "Contact a Framework developer\n";
553  }
void edm::NoProcessProductHolder::resetProductData_ ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 470 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 457 of file ProductHolder.cc.

457  {
458  }
virtual std::string const& edm::NoProcessProductHolder::resolvedModuleLabel_ ( ) const
inlineoverrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 458 of file ProductHolder.h.

References edm::ProductHolderBase::moduleLabel().

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

Implements edm::ProductHolderBase.

Definition at line 403 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().

405  {
406  std::vector<unsigned int> const& lookupProcessOrder = principal_->lookupProcessOrder();
407  for(unsigned int k : lookupProcessOrder) {
408  assert(k < ambiguous_.size());
409  if(k == 0) break; // Done
410  if(ambiguous_[k]) {
411  resolveStatus = Ambiguous;
412  return nullptr;
413  }
416  ProductData const* pd = productHolder->resolveProduct(resolveStatus, skipCurrentProcess, mcc);
417  if(pd != nullptr) return pd;
418  }
419  }
420  resolveStatus = ProductNotFound;
421  return nullptr;
422  }
std::vector< ProductHolderIndex > matchingHolders_
assert(m_qm.get())
ConstProductHolderPtr getProductHolderByIndex(ProductHolderIndex const &oid) const
Definition: Principal.cc:448
std::vector< unsigned int > const & lookupProcessOrder() const
Definition: Principal.h:189
std::vector< bool > ambiguous_
void edm::NoProcessProductHolder::setPrincipal_ ( Principal principal)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 477 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 463 of file ProductHolder.cc.

463  {
464  }
void edm::NoProcessProductHolder::setProductDeleted_ ( )
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 537 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 460 of file ProductHolder.cc.

460  {
461  }
bool edm::NoProcessProductHolder::singleProduct_ ( ) const
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 473 of file ProductHolder.cc.

473  {
474  return false;
475  }
void edm::NoProcessProductHolder::swap_ ( ProductHolderBase rhs)
overrideprivatevirtual

Implements edm::ProductHolderBase.

Definition at line 450 of file ProductHolder.cc.

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

450  {
451  NoProcessProductHolder& other = dynamic_cast<NoProcessProductHolder&>(rhs);
452  ambiguous_.swap(other.ambiguous_);
453  matchingHolders_.swap(other.matchingHolders_);
454  std::swap(principal_, other.principal_);
455  }
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 467 of file ProductHolder.h.

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

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

Definition at line 466 of file ProductHolder.h.

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

Principal* edm::NoProcessProductHolder::principal_
private

Definition at line 468 of file ProductHolder.h.

Referenced by resolveProduct_(), and swap_().