CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

edm::Parentage Class Reference

#include <Parentage.h>

List of all members.

Classes

struct  Transients

Public Member Functions

ParentageID id () const
 Parentage ()
 Parentage (std::vector< BranchID > const &parents)
std::vector< BranchID > & parents ()
std::vector< BranchID > const & parents () const
void swap (Parentage &other)
void write (std::ostream &os) const
 ~Parentage ()

Private Member Functions

ParentageIDparentageID () const

Private Attributes

std::vector< BranchIDparents_
Transient< Transientstransients_

Detailed Description

Definition at line 26 of file Parentage.h.


Constructor & Destructor Documentation

edm::Parentage::Parentage ( )

Definition at line 11 of file Parentage.cc.

                       :
    parents_()
  {}
edm::Parentage::Parentage ( std::vector< BranchID > const &  parents) [explicit]

Definition at line 15 of file Parentage.cc.

edm::Parentage::~Parentage ( ) [inline]

Definition at line 32 of file Parentage.h.

{}

Member Function Documentation

ParentageID edm::Parentage::id ( void  ) const

Definition at line 20 of file Parentage.cc.

References cms::Digest::digest(), i, parentageID(), parents_, edm::Hash< I >::swap(), and tmp.

                      {
    // This implementation is ripe for optimization.
    if(parentageID().isValid()) {
      return parentageID();
    }
    std::ostringstream oss;
    for (std::vector<BranchID>::const_iterator 
           i = parents_.begin(),
           e = parents_.end();
         i != e;
         ++i)
      {
        oss << *i << ' ';
      }
    
    std::string stringrep = oss.str();
    cms::Digest md5alg(stringrep);
    ParentageID tmp(md5alg.digest().toString());
    parentageID().swap(tmp);
    return parentageID();
  }
ParentageID& edm::Parentage::parentageID ( ) const [inline, private]

Definition at line 49 of file Parentage.h.

References edm::Transient< T >::get(), and transients_.

Referenced by id(), and swap().

{return transients_.get().parentageID_;}
std::vector<BranchID>& edm::Parentage::parents ( ) [inline]

Definition at line 40 of file Parentage.h.

References parents_.

{return parents_;}
std::vector<BranchID> const& edm::Parentage::parents ( ) const [inline]
void edm::Parentage::swap ( Parentage other) [inline]

Definition at line 41 of file Parentage.h.

References parentageID(), parents_, and edm::Hash< I >::swap().

Referenced by edm::swap().

{parents_.swap(other.parents_); parentageID().swap(other.parentageID());}
void edm::Parentage::write ( std::ostream &  os) const

Definition at line 43 of file Parentage.cc.

Referenced by edm::operator<<().

                                       {
    // This is grossly inadequate, but it is not critical for the
    // first pass.
  }

Member Data Documentation

std::vector<BranchID> edm::Parentage::parents_ [private]

Definition at line 51 of file Parentage.h.

Referenced by id(), parents(), and swap().

Definition at line 52 of file Parentage.h.

Referenced by parentageID().