Classes | Public Member Functions | Private Attributes | List of all members
art::ProductProvenance Class Reference

#include <ProductProvenance.h>

Classes

struct  Transients
 

Public Member Functions

 ~ProductProvenance ()
 
 ProductProvenance ()
 
 ProductProvenance (ProductID const &, ProductStatus)
 
 ProductProvenance (ProductID const &, ProductStatus, std::vector< ProductID > const &parents)
 
 ProductProvenance (ProductProvenance const &)
 
 ProductProvenance (ProductProvenance &&)
 
ProductProvenanceoperator= (ProductProvenance const &)
 
ProductProvenanceoperator= (ProductProvenance &&)
 
void write (std::ostream &) const
 
ProductID productID () const noexcept
 
ProductStatus productStatus () const noexcept
 
ParentageID const & parentageID () const noexcept
 
Parentage const & parentage () const
 
bool noParentage () const noexcept
 

Private Attributes

ProductID productID_ {}
 
ProductStatus productStatus_ {productstatus::uninitialized()}
 
ParentageID parentageID_ {}
 
Transient< Transientstransients_ {}
 

Detailed Description

Definition at line 19 of file ProductProvenance.h.

Constructor & Destructor Documentation

art::ProductProvenance::~ProductProvenance ( )
default
art::ProductProvenance::ProductProvenance ( )
default
art::ProductProvenance::ProductProvenance ( ProductID const &  bid,
ProductStatus  status 
)

Definition at line 17 of file ProductProvenance.cc.

art::ProductProvenance::ProductProvenance ( ProductID const &  bid,
ProductStatus  status,
std::vector< ProductID > const &  parents 
)

Definition at line 22 of file ProductProvenance.cc.

26  {
27  transients_.get().parentagePtr_ = make_shared<Parentage>(parents);
28  parentageID_ = transients_.get().parentagePtr_->id();
29  ParentageRegistry::emplace(parentageID_, *transients_.get().parentagePtr_);
30  }
ProductStatus productStatus_
Transient< Transients > transients_
static auto emplace(value_type const &value)
art::ProductProvenance::ProductProvenance ( ProductProvenance const &  )
default
art::ProductProvenance::ProductProvenance ( ProductProvenance &&  )
default

Member Function Documentation

bool art::ProductProvenance::noParentage ( ) const
noexcept

Definition at line 59 of file ProductProvenance.cc.

60  {
61  return transients_.get().noParentage_;
62  }
Transient< Transients > transients_
ProductProvenance & art::ProductProvenance::operator= ( ProductProvenance const &  )
default
ProductProvenance & art::ProductProvenance::operator= ( ProductProvenance &&  )
default
Parentage const & art::ProductProvenance::parentage ( ) const

Definition at line 65 of file ProductProvenance.cc.

66  {
67  if (!transients_.get().parentagePtr_) {
68  transients_.get().parentagePtr_ = make_shared<Parentage>();
69  ParentageRegistry::get(parentageID_, *transients_.get().parentagePtr_);
70  }
71  return *transients_.get().parentagePtr_;
72  }
static collection_type const & get()
Transient< Transients > transients_
ParentageID const & art::ProductProvenance::parentageID ( ) const
noexcept

Definition at line 52 of file ProductProvenance.cc.

53  {
54  return parentageID_;
55  }
ProductID art::ProductProvenance::productID ( ) const
noexcept

Definition at line 40 of file ProductProvenance.cc.

41  {
42  return productID_;
43  }
ProductStatus art::ProductProvenance::productStatus ( ) const
noexcept

Definition at line 46 of file ProductProvenance.cc.

47  {
48  return productStatus_;
49  }
ProductStatus productStatus_
void art::ProductProvenance::write ( std::ostream &  os) const

Definition at line 75 of file ProductProvenance.cc.

76  {
77  os << "product ID = " << productID() << '\n';
78  os << "product status = " << static_cast<int>(productStatus_) << '\n';
79  if (!noParentage()) {
80  os << "entry description ID = " << parentageID() << '\n';
81  }
82  }
ParentageID const & parentageID() const noexcept
ProductID productID() const noexcept
ProductStatus productStatus_
bool noParentage() const noexcept

Member Data Documentation

ParentageID art::ProductProvenance::parentageID_ {}
private

Definition at line 48 of file ProductProvenance.h.

ProductID art::ProductProvenance::productID_ {}
private

Definition at line 46 of file ProductProvenance.h.

ProductStatus art::ProductProvenance::productStatus_ {productstatus::uninitialized()}
private

Definition at line 47 of file ProductProvenance.h.

Transient<Transients> art::ProductProvenance::transients_ {}
mutableprivate

Definition at line 49 of file ProductProvenance.h.


The documentation for this class was generated from the following files: