LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::ProcessHistory Class Reference

#include "ProcessHistory.h"

Classes

struct  Transients
 

Public Types

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

Public Member Functions

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

Private Member Functions

void invalidateProcessHistoryID_ ()
 
ProcessHistoryIDphid () const
 

Private Attributes

collection_type data_ {}
 
Transient< Transientstransients_ {}
 

Detailed Description

Definition at line 31 of file ProcessHistory.h.

Member Typedef Documentation

Definition at line 34 of file ProcessHistory.h.

typedef collection_type::const_iterator art::ProcessHistory::const_iterator

Definition at line 37 of file ProcessHistory.h.

typedef collection_type::const_reference art::ProcessHistory::const_reference

Definition at line 43 of file ProcessHistory.h.

typedef collection_type::const_reverse_iterator art::ProcessHistory::const_reverse_iterator

Definition at line 40 of file ProcessHistory.h.

typedef collection_type::iterator art::ProcessHistory::iterator

Definition at line 36 of file ProcessHistory.h.

typedef collection_type::reference art::ProcessHistory::reference

Definition at line 42 of file ProcessHistory.h.

typedef collection_type::reverse_iterator art::ProcessHistory::reverse_iterator

Definition at line 39 of file ProcessHistory.h.

typedef collection_type::size_type art::ProcessHistory::size_type

Definition at line 45 of file ProcessHistory.h.

Constructor & Destructor Documentation

art::ProcessHistory::ProcessHistory ( )
default
art::ProcessHistory::ProcessHistory ( size_type  n)
inlineexplicit

Definition at line 181 of file ProcessHistory.h.

182  : data_(n) // NOT uniform initialization
183 {}
collection_type data_
Char_t n[5]
art::ProcessHistory::ProcessHistory ( collection_type const &  vec)
inlineexplicit

Definition at line 185 of file ProcessHistory.h.

186  : data_{vec}
187 {}
collection_type data_

Member Function Documentation

reference art::ProcessHistory::at ( size_type  i)
inline

Definition at line 66 of file ProcessHistory.h.

References data_.

67  {
68  return data_.at(i);
69  }
collection_type data_
const_reference art::ProcessHistory::at ( size_type  i) const
inline

Definition at line 71 of file ProcessHistory.h.

References data_.

72  {
73  return data_.at(i);
74  }
collection_type data_
const_iterator art::ProcessHistory::begin ( ) const
inline

Definition at line 77 of file ProcessHistory.h.

References data_.

78  {
79  return data_.begin();
80  }
collection_type data_
art::ProcessHistory::size_type art::ProcessHistory::capacity ( ) const
inline

Definition at line 216 of file ProcessHistory.h.

References data_.

217 {
218  return data_.capacity();
219 }
collection_type data_
const_iterator art::ProcessHistory::cbegin ( ) const
inline

Definition at line 87 of file ProcessHistory.h.

References data_.

88  {
89  return data_.cbegin();
90  }
collection_type data_
const_iterator art::ProcessHistory::cend ( ) const
inline

Definition at line 92 of file ProcessHistory.h.

References data_.

93  {
94  return data_.cend();
95  }
collection_type data_
const_reverse_iterator art::ProcessHistory::crbegin ( ) const
inline

Definition at line 108 of file ProcessHistory.h.

References data_.

109  {
110  return data_.crbegin();
111  }
collection_type data_
const_reverse_iterator art::ProcessHistory::crend ( ) const
inline

Definition at line 113 of file ProcessHistory.h.

References data_.

114  {
115  return data_.crend();
116  }
collection_type data_
collection_type const& art::ProcessHistory::data ( ) const
inline

Definition at line 119 of file ProcessHistory.h.

References data_, getConfigurationForProcess(), and id().

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

120  {
121  return data_;
122  }
collection_type data_
bool art::ProcessHistory::empty ( void  ) const
inline

Definition at line 204 of file ProcessHistory.h.

References data_.

205 {
206  return data_.empty();
207 }
collection_type data_
const_iterator art::ProcessHistory::end ( void  ) const
inline

Definition at line 82 of file ProcessHistory.h.

References data_.

83  {
84  return data_.end();
85  }
collection_type data_
bool art::ProcessHistory::getConfigurationForProcess ( std::string const &  name,
ProcessConfiguration config 
) const

Definition at line 35 of file ProcessHistory.cc.

References evd::details::begin(), e, and evd::details::end().

Referenced by data(), and art::Event::getProcessParameterSet().

37  {
38  for (const_iterator i = begin(), e = end(); i != e; ++i) {
39  if (i->processName() == name) {
40  config = *i;
41  return true;
42  }
43  }
44  // Name not found!
45  return false;
46  }
const_iterator end() const
const_iterator begin() const
Float_t e
Definition: plot.C:34
ProcessHistoryID art::ProcessHistory::id ( ) const

Definition at line 14 of file ProcessHistory.cc.

References evd::details::begin(), e, evd::details::end(), and tmp.

Referenced by data().

15  {
16  if (phid().isValid()) {
17  return phid();
18  }
19  // This implementation is ripe for optimization.
20  // We do not use operator<< because it does not write out everything.
21  ostringstream oss;
22  for (const_iterator i = begin(), e = end(); i != e; ++i) {
23  oss << i->processName() << ' ' << i->parameterSetID() << ' '
24  << i->releaseVersion() << ' '
25  << ' '; // retain extra spaces for backwards compatibility
26  }
27  string stringrep = oss.str();
28  cet::MD5Digest md5alg(stringrep);
29  ProcessHistoryID tmp(md5alg.digest().toString());
30  phid().swap(tmp);
31  return phid();
32  }
const_iterator end() const
Float_t tmp
Definition: plot.C:37
const_iterator begin() const
Hash< ProcessHistoryType > ProcessHistoryID
Float_t e
Definition: plot.C:34
void swap(Hash< I > &other)
Definition: Hash.h:175
ProcessHistoryID & phid() const
void art::ProcessHistory::invalidateProcessHistoryID_ ( )
inlineprivate

Definition at line 141 of file ProcessHistory.h.

References transients_.

Referenced by push_back().

142  {
143  transients_.get().phid_ = ProcessHistoryID();
144  }
Transient< Transients > transients_
Hash< ProcessHistoryType > ProcessHistoryID
reference art::ProcessHistory::operator[] ( size_type  i)
inline

Definition at line 62 of file ProcessHistory.h.

References data_.

62 { return data_[i]; }
collection_type data_
const_reference art::ProcessHistory::operator[] ( size_type  i) const
inline

Definition at line 63 of file ProcessHistory.h.

References data_.

63 { return data_[i]; }
collection_type data_
ProcessHistoryID& art::ProcessHistory::phid ( ) const
inlineprivate

Definition at line 147 of file ProcessHistory.h.

References transients_.

Referenced by swap().

148  {
149  return transients_.get().phid_;
150  }
Transient< Transients > transients_
void art::ProcessHistory::push_back ( const_reference  t)
inline

Definition at line 197 of file ProcessHistory.h.

References data_, and invalidateProcessHistoryID_().

198 {
199  data_.push_back(t);
201 }
collection_type data_
void invalidateProcessHistoryID_()
const_reverse_iterator art::ProcessHistory::rbegin ( ) const
inline

Definition at line 97 of file ProcessHistory.h.

References data_.

98  {
99  return data_.rbegin();
100  }
collection_type data_
const_reverse_iterator art::ProcessHistory::rend ( ) const
inline

Definition at line 102 of file ProcessHistory.h.

References data_.

103  {
104  return data_.rend();
105  }
collection_type data_
void art::ProcessHistory::reserve ( size_type  n)
inline

Definition at line 222 of file ProcessHistory.h.

References data_.

223 {
224  data_.reserve(n);
225 }
collection_type data_
Char_t n[5]
art::ProcessHistory::size_type art::ProcessHistory::size ( void  ) const
inline

Definition at line 210 of file ProcessHistory.h.

References data_.

Referenced by art::isAncestor().

211 {
212  return data_.size();
213 }
collection_type data_
void art::ProcessHistory::swap ( ProcessHistory other)
inline

Definition at line 190 of file ProcessHistory.h.

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

Referenced by art::swap().

191 {
192  data_.swap(other.data_);
193  phid().swap(other.phid());
194 }
collection_type data_
void swap(Hash< I > &other)
Definition: Hash.h:175
ProcessHistoryID & phid() const

Member Data Documentation

collection_type art::ProcessHistory::data_ {}
private
Transient<Transients> art::ProcessHistory::transients_ {}
mutableprivate

Definition at line 138 of file ProcessHistory.h.

Referenced by invalidateProcessHistoryID_(), and phid().


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