CMS 3D CMS Logo

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

#include <ProductProvenance.h>

Classes

struct  Transients
 

Public Member Functions

BranchID const & branchID () const
 
void initializeTransients () const
 
ProductProvenance makeProductProvenance () const
 
bool & noParentage () const
 
Parentage const & parentage () const
 
ParentageID const & parentageID () const
 
 ProductProvenance ()
 
 ProductProvenance (BranchID const &bid)
 
 ProductProvenance (BranchID const &bid, std::shared_ptr< Parentage > parentagePtr)
 
 ProductProvenance (BranchID const &bid, ParentageID const &id)
 
 ProductProvenance (BranchID const &bid, std::vector< BranchID > const &parents)
 
void write (std::ostream &os) const
 
 ~ProductProvenance ()
 

Private Member Functions

std::shared_ptr< Parentage > & parentagePtr () const
 

Private Attributes

BranchID branchID_
 
ParentageID parentageID_
 
Transients transient_
 

Detailed Description

Definition at line 24 of file ProductProvenance.h.

Constructor & Destructor Documentation

edm::ProductProvenance::ProductProvenance ( )

Definition at line 23 of file ProductProvenance.cc.

23  :
24  branchID_(),
25  parentageID_(),
26  transient_()
27  {}
edm::ProductProvenance::ProductProvenance ( BranchID const &  bid)
explicit

Definition at line 29 of file ProductProvenance.cc.

29  :
30  branchID_(bid),
31  parentageID_(),
32  transient_()
33  {}
edm::ProductProvenance::ProductProvenance ( BranchID const &  bid,
std::shared_ptr< Parentage parentagePtr 
)

Definition at line 42 of file ProductProvenance.cc.

References edm::ParentageRegistry::insertMapped(), edm::ParentageRegistry::instance(), and parentagePtr().

43  :
44  branchID_(bid),
45  parentageID_(pPtr->id()),
46  transient_() {
47  parentagePtr() = pPtr;
49  }
std::shared_ptr< Parentage > & parentagePtr() const
static ParentageRegistry * instance()
bool insertMapped(value_type const &v)
edm::ProductProvenance::ProductProvenance ( BranchID const &  bid,
ParentageID const &  id 
)

Definition at line 35 of file ProductProvenance.cc.

36  :
37  branchID_(bid),
38  parentageID_(edid),
39  transient_()
40  {}
edm::ProductProvenance::ProductProvenance ( BranchID const &  bid,
std::vector< BranchID > const &  parents 
)

Definition at line 51 of file ProductProvenance.cc.

References edm::ParentageRegistry::insertMapped(), edm::ParentageRegistry::instance(), parentageID_, and parentagePtr().

52  :
53  branchID_(bid),
54  parentageID_(),
55  transient_() {
56  parentagePtr() = std::make_shared<Parentage>();
57  parentagePtr()->setParents(parents);
58  parentageID_ = parentagePtr()->id();
60  }
TPRegexp parents
Definition: eve_filter.cc:21
std::shared_ptr< Parentage > & parentagePtr() const
static ParentageRegistry * instance()
bool insertMapped(value_type const &v)
edm::ProductProvenance::~ProductProvenance ( )
inline

Definition at line 36 of file ProductProvenance.h.

36 {}

Member Function Documentation

BranchID const& edm::ProductProvenance::branchID ( ) const
inline
void edm::ProductProvenance::initializeTransients ( ) const
inline
ProductProvenance edm::ProductProvenance::makeProductProvenance ( ) const

Definition at line 63 of file ProductProvenance.cc.

63  {
64  return *this;
65  }
bool& edm::ProductProvenance::noParentage ( ) const
inline
Parentage const & edm::ProductProvenance::parentage ( ) const

Definition at line 68 of file ProductProvenance.cc.

References edm::ParentageRegistry::getMapped(), edm::ParentageRegistry::instance(), parentageID_, and parentagePtr().

Referenced by edm::RootOutputFile::insertAncestors(), and edm::Provenance::parentage().

68  {
69  if (!parentagePtr()) {
70  parentagePtr().reset(new Parentage);
72  }
73  return *parentagePtr();
74  }
bool getMapped(key_type const &k, value_type &result) const
std::shared_ptr< Parentage > & parentagePtr() const
static ParentageRegistry * instance()
ParentageID const& edm::ProductProvenance::parentageID ( ) const
inline
std::shared_ptr<Parentage>& edm::ProductProvenance::parentagePtr ( ) const
inlineprivate

Definition at line 59 of file ProductProvenance.h.

References edm::ProductProvenance::Transients::parentagePtr_, and transient_.

Referenced by parentage(), and ProductProvenance().

59 {return transient_.parentagePtr_;}
std::shared_ptr< Parentage > parentagePtr_
void edm::ProductProvenance::write ( std::ostream &  os) const

Definition at line 77 of file ProductProvenance.cc.

References branchID(), noParentage(), and parentageID().

Referenced by pkg.AbstractPkg::generate(), edm::operator<<(), and edm::Provenance::write().

77  {
78  os << "branch ID = " << branchID() << '\n';
79  if (!noParentage()) {
80  os << "entry description ID = " << parentageID() << '\n';
81  }
82  }
BranchID const & branchID() const
bool & noParentage() const
ParentageID const & parentageID() const

Member Data Documentation

BranchID edm::ProductProvenance::branchID_
private

Definition at line 61 of file ProductProvenance.h.

Referenced by branchID().

ParentageID edm::ProductProvenance::parentageID_
private

Definition at line 62 of file ProductProvenance.h.

Referenced by parentage(), parentageID(), and ProductProvenance().

Transients edm::ProductProvenance::transient_
mutableprivate

Definition at line 63 of file ProductProvenance.h.

Referenced by initializeTransients(), noParentage(), and parentagePtr().