CMS 3D CMS Logo

edm::ProcessHistory Class Reference

#include <DataFormats/Provenance/interface/ProcessHistory.h>

List of all members.

Public Types

typedef std::vector< value_typecollection_type
typedef
collection_type::const_iterator 
const_iterator
typedef
collection_type::const_reference 
const_reference
typedef
collection_type::const_reverse_iterator 
const_reverse_iterator
typedef collection_type::iterator iterator
typedef collection_type::reference reference
typedef
collection_type::reverse_iterator 
reverse_iterator
typedef collection_type::size_type size_type
typedef ProcessConfiguration value_type

Public Member Functions

const_reference at (size_type i) const
reference at (size_type i)
const_iterator begin () const
size_type capacity () const
collection_type const & data () const
bool empty () const
const_iterator end () const
bool getConfigurationForProcess (std::string const &name, ProcessConfiguration &config) const
ProcessHistoryID id () const
const_reference operator[] (size_type i) const
reference operator[] (size_type i)
 ProcessHistory (collection_type const &vec)
 ProcessHistory (size_type n)
 ProcessHistory ()
void push_back (const_reference t)
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
void reserve (size_type n)
void setDefaultTransients () const
size_type size () const
void swap (ProcessHistory &other)

Private Member Functions

ProcessHistoryIDphid () const

Private Attributes

collection_type data_
Transient< Transientstransients_

Classes

struct  Transients


Detailed Description

Definition at line 13 of file ProcessHistory.h.


Member Typedef Documentation

typedef std::vector<value_type> edm::ProcessHistory::collection_type

Definition at line 16 of file ProcessHistory.h.

typedef collection_type::const_iterator edm::ProcessHistory::const_iterator

Definition at line 19 of file ProcessHistory.h.

typedef collection_type::const_reference edm::ProcessHistory::const_reference

Definition at line 25 of file ProcessHistory.h.

typedef collection_type::const_reverse_iterator edm::ProcessHistory::const_reverse_iterator

Definition at line 22 of file ProcessHistory.h.

typedef collection_type::iterator edm::ProcessHistory::iterator

Definition at line 18 of file ProcessHistory.h.

typedef collection_type::reference edm::ProcessHistory::reference

Definition at line 24 of file ProcessHistory.h.

typedef collection_type::reverse_iterator edm::ProcessHistory::reverse_iterator

Definition at line 21 of file ProcessHistory.h.

typedef collection_type::size_type edm::ProcessHistory::size_type

Definition at line 27 of file ProcessHistory.h.

typedef ProcessConfiguration edm::ProcessHistory::value_type

Definition at line 15 of file ProcessHistory.h.


Constructor & Destructor Documentation

edm::ProcessHistory::ProcessHistory (  )  [inline]

Definition at line 29 of file ProcessHistory.h.

00029 : data_(), transients_() {}

edm::ProcessHistory::ProcessHistory ( size_type  n  )  [inline, explicit]

Definition at line 30 of file ProcessHistory.h.

00030 : data_(n), transients_() {}

edm::ProcessHistory::ProcessHistory ( collection_type const &  vec  )  [inline, explicit]

Definition at line 31 of file ProcessHistory.h.

00031 : data_(vec), transients_() {}


Member Function Documentation

const_reference edm::ProcessHistory::at ( size_type  i  )  const [inline]

Definition at line 44 of file ProcessHistory.h.

References data_.

00044 {return data_.at(i);}

reference edm::ProcessHistory::at ( size_type  i  )  [inline]

Definition at line 43 of file ProcessHistory.h.

References data_.

00043 {return data_.at(i);}

const_iterator edm::ProcessHistory::begin (  )  const [inline]

Definition at line 46 of file ProcessHistory.h.

References data_.

Referenced by edm::Principal::addToProcessHistory(), getConfigurationForProcess(), fwlite::Event::getProcessHistory(), id(), operator<<(), and edm::AsciiOutputModule::write().

00046 {return data_.begin();}

size_type edm::ProcessHistory::capacity (  )  const [inline]

Definition at line 37 of file ProcessHistory.h.

References data_.

00037 {return data_.capacity();}

collection_type const& edm::ProcessHistory::data (  )  const [inline]

Definition at line 58 of file ProcessHistory.h.

References data_.

Referenced by edm::isAncestor(), and edm::operator==().

00058 {return data_;}

bool edm::ProcessHistory::empty (  )  const [inline]

Definition at line 35 of file ProcessHistory.h.

References data_.

00035 {return data_.empty();}

const_iterator edm::ProcessHistory::end (  )  const [inline]

Definition at line 47 of file ProcessHistory.h.

References data_.

Referenced by edm::Principal::addToProcessHistory(), getConfigurationForProcess(), fwlite::Event::getProcessHistory(), id(), operator<<(), and edm::AsciiOutputModule::write().

00047 {return data_.end();}

bool edm::ProcessHistory::getConfigurationForProcess ( std::string const &  name,
ProcessConfiguration config 
) const

Definition at line 33 of file ProcessHistory.cc.

References begin(), e, end(), and i.

Referenced by edm::Event::getProcessParameterSet().

00034                                                                                  {
00035     for (const_iterator i = begin(), e = end(); i != e; ++i) {
00036       if (i->processName() == name) {
00037         config = *i;
00038         return true;
00039       }
00040     }
00041     // Name not found!
00042     return false;                                   
00043   }

ProcessHistoryID edm::ProcessHistory::id ( void   )  const

Definition at line 12 of file ProcessHistory.cc.

References begin(), cms::Digest::digest(), e, end(), i, phid(), edm::Hash< I >::swap(), and tmp.

Referenced by edm::Principal::addToProcessHistory().

00012                            {
00013     if(phid().isValid()) {
00014       return phid();
00015     }
00016     // This implementation is ripe for optimization.
00017     // We do not use operator<< because it does not write out everything.
00018     std::ostringstream oss;
00019     for (const_iterator i = begin(), e = end(); i != e; ++i) {
00020       oss << i->processName() << ' '
00021           << i->parameterSetID() << ' ' 
00022           << i->releaseVersion() << ' '
00023           << i->passID() << ' ';
00024     }
00025     std::string stringrep = oss.str();
00026     cms::Digest md5alg(stringrep);
00027     ProcessHistoryID tmp(md5alg.digest().toString());
00028     phid().swap(tmp);
00029     return phid();
00030   }

const_reference edm::ProcessHistory::operator[] ( size_type  i  )  const [inline]

Definition at line 41 of file ProcessHistory.h.

References data_.

00041 {return data_[i];}

reference edm::ProcessHistory::operator[] ( size_type  i  )  [inline]

Definition at line 40 of file ProcessHistory.h.

References data_.

00040 {return data_[i];}

ProcessHistoryID& edm::ProcessHistory::phid (  )  const [inline, private]

Definition at line 78 of file ProcessHistory.h.

References transients_.

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

00078 {return transients_.get().phid_;}

void edm::ProcessHistory::push_back ( const_reference  t  )  [inline]

Definition at line 33 of file ProcessHistory.h.

References data_, and phid().

Referenced by edm::Principal::addToProcessHistory().

00033 {data_.push_back(t); phid() = ProcessHistoryID();}

const_reverse_iterator edm::ProcessHistory::rbegin (  )  const [inline]

Definition at line 49 of file ProcessHistory.h.

References data_.

Referenced by edm::Principal::findGroups(), fwlite::Event::getBranchDataFor(), and RawDataCollectorModule::produce().

00049 {return data_.rbegin();}

const_reverse_iterator edm::ProcessHistory::rend (  )  const [inline]

Definition at line 50 of file ProcessHistory.h.

References data_.

Referenced by edm::Principal::findGroups(), and fwlite::Event::getBranchDataFor().

00050 {return data_.rend();}

void edm::ProcessHistory::reserve ( size_type  n  )  [inline]

Definition at line 38 of file ProcessHistory.h.

References data_.

00038 {data_.reserve(n);}

void edm::ProcessHistory::setDefaultTransients (  )  const [inline]

Definition at line 73 of file ProcessHistory.h.

References transients_.

00073                                       {
00074         transients_ = Transients();
00075     };

size_type edm::ProcessHistory::size ( void   )  const [inline]

Definition at line 36 of file ProcessHistory.h.

References data_.

Referenced by edm::isAncestor().

00036 {return data_.size();}

void edm::ProcessHistory::swap ( ProcessHistory other  )  [inline]

Definition at line 34 of file ProcessHistory.h.

References data_, phid(), and edm::Hash< I >::swap().

Referenced by edm::swap().

00034 {data_.swap(other.data_); phid().swap(other.phid());}


Member Data Documentation

collection_type edm::ProcessHistory::data_ [private]

Definition at line 79 of file ProcessHistory.h.

Referenced by at(), begin(), capacity(), data(), empty(), end(), operator[](), push_back(), rbegin(), rend(), reserve(), size(), and swap().

Transient<Transients> edm::ProcessHistory::transients_ [mutable, private]

Definition at line 80 of file ProcessHistory.h.

Referenced by phid(), and setDefaultTransients().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:43:05 2009 for CMSSW by  doxygen 1.5.4