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 (WrapperOwningHolder const &prod) const
 
void deleteProduct ()
 
void mergeProduct (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
 
void mergeProduct (WrapperOwningHolder const &edp) const
 
void mergeTheProduct (WrapperOwningHolder const &edp) const
 
std::string const & moduleLabel () const
 
bool onDemand () const
 
ProductHolderBaseoperator= (ProductHolderBase const &)=delete
 
std::string const & processName () const
 
boost::shared_ptr< void const > product () 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 (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
 
void putProduct (WrapperOwningHolder const &edp) const
 
void reallyCheckType (WrapperOwningHolder const &prod) const
 
void resetBranchDescription (boost::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 (boost::shared_ptr< ProductProvenanceRetriever > provRetriever, ProcessHistory const &ph, ProductID const &pid)
 
bool singleProduct () const
 
void swap (ProductHolderBase &rhs)
 
void throwProductDeletedException () const
 
WrapperHolder wrapper () const
 
void write (std::ostream &os) const
 
virtual ~ProductHolderBase ()
 

Private Member Functions

virtual BranchDescription const & branchDescription_ () const
 
virtual void checkType_ (WrapperOwningHolder const &prod) const
 
virtual ProductData const & getProductData () const
 
virtual ProductDatagetProductData ()
 
virtual void mergeProduct_ (WrapperOwningHolder const &edp, ProductProvenance &productProvenance)
 
virtual void mergeProduct_ (WrapperOwningHolder const &edp) const
 
virtual bool onDemand_ () const
 
virtual ProductProvenanceproductProvenancePtr_ () const
 
virtual bool productUnavailable_ () const
 
virtual bool productWasDeleted_ () const
 
virtual bool putOrMergeProduct_ () const
 
virtual void putProduct_ (WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
 
virtual void putProduct_ (WrapperOwningHolder const &edp) const
 
virtual void resetBranchDescription_ (boost::shared_ptr< BranchDescription const > bd)
 
virtual void resetProductData_ ()
 
virtual void resetStatus_ ()
 
virtual std::string const & resolvedModuleLabel_ () const
 
virtual ProductData const * resolveProduct_ (ResolveStatus &resolveStatus, bool skipCurrentProcess, ModuleCallingContext const *mcc) const
 
virtual void setPrincipal_ (Principal *principal)
 
virtual void setProcessHistory_ (ProcessHistory const &ph)
 
virtual void setProductDeleted_ ()
 
virtual void setProvenance_ (boost::shared_ptr< ProductProvenanceRetriever > provRetriever, ProcessHistory const &ph, ProductID const &pid)
 
virtual bool singleProduct_ () const
 
virtual void swap_ (ProductHolderBase &rhs)
 

Private Attributes

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

Detailed Description

Definition at line 437 of file ProductHolder.h.

Member Typedef Documentation

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

References ambiguous_, and matchingHolders_.

391  :
392  matchingHolders_(matchingHolders),
393  ambiguous_(ambiguous),
395  assert(ambiguous_.size() == matchingHolders_.size());
396  }
std::vector< ProductHolderIndex > matchingHolders_
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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 550 of file ProductHolder.cc.

References edm::hlt::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_ ( WrapperOwningHolder const &  prod) const
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 538 of file ProductHolder.cc.

References edm::hlt::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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 398 of file ProductHolder.cc.

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

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

Implements edm::ProductHolderBase.

Definition at line 404 of file ProductHolder.cc.

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

404  {
406  << "NoProcessProductHolder::getProductData() not implemented and should never be called.\n"
407  << "Contact a Framework developer\n";
408  }
void edm::NoProcessProductHolder::mergeProduct_ ( WrapperOwningHolder const &  edp,
ProductProvenance productProvenance 
)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 520 of file ProductHolder.cc.

References edm::hlt::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_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 526 of file ProductHolder.cc.

References edm::hlt::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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 490 of file ProductHolder.cc.

References edm::hlt::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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 473 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 496 of file ProductHolder.cc.

References edm::hlt::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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 502 of file ProductHolder.cc.

References edm::hlt::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
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 532 of file ProductHolder.cc.

References edm::hlt::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_ ( WrapperOwningHolder const &  edp,
ProductProvenance const &  productProvenance 
)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 508 of file ProductHolder.cc.

References edm::hlt::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_ ( WrapperOwningHolder const &  edp) const
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 514 of file ProductHolder.cc.

References edm::hlt::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_ ( boost::shared_ptr< BranchDescription const >  bd)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 556 of file ProductHolder.cc.

References edm::hlt::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_ ( )
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 477 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 464 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 463 of file ProductHolder.h.

References edm::ProductHolderBase::moduleLabel().

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

Implements edm::ProductHolderBase.

Definition at line 410 of file ProductHolder.cc.

References edm::ProductHolderBase::Ambiguous, ambiguous_, edm::Principal::getProductHolderByIndex(), gen::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, mcc);
424  if(pd != nullptr) return pd;
425  }
426  }
427  resolveStatus = ProductNotFound;
428  return nullptr;
429  }
std::vector< ProductHolderIndex > matchingHolders_
ConstProductHolderPtr getProductHolderByIndex(ProductHolderIndex const &oid) const
Definition: Principal.cc:438
std::vector< unsigned int > const & lookupProcessOrder() const
Definition: Principal.h:191
int k[5][pyjets_maxn]
std::vector< bool > ambiguous_
void edm::NoProcessProductHolder::setPrincipal_ ( Principal principal)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 484 of file ProductHolder.cc.

References edm::hlt::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)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 470 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 544 of file ProductHolder.cc.

References edm::hlt::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_ ( boost::shared_ptr< ProductProvenanceRetriever provRetriever,
ProcessHistory const &  ph,
ProductID const &  pid 
)
privatevirtual

Implements edm::ProductHolderBase.

Definition at line 467 of file ProductHolder.cc.

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

Implements edm::ProductHolderBase.

Definition at line 480 of file ProductHolder.cc.

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

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

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

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

Definition at line 471 of file ProductHolder.h.

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

Principal* edm::NoProcessProductHolder::principal_
private

Definition at line 473 of file ProductHolder.h.

Referenced by resolveProduct_(), and swap_().