CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::ProcessHistory Class Reference

#include <ProcessHistory.h>

Classes

struct  Transients
 

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

reference at (size_type i)
 
const_reference at (size_type i) const
 
const_iterator begin () const
 
size_type capacity () const
 
void clear ()
 
collection_type const & data () const
 
template<typename... Args>
void emplace_back (Args &&...args)
 
bool empty () const
 
const_iterator end () const
 
bool getConfigurationForProcess (std::string const &name, ProcessConfiguration &config) const
 
ProcessHistoryID id () const
 
void initializeTransients ()
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
 ProcessHistory ()
 
 ProcessHistory (size_type n)
 
 ProcessHistory (collection_type const &vec)
 
void push_back (const_reference t)
 
void push_front (const_reference t)
 
const_reverse_iterator rbegin () const
 
ProcessHistoryreduce ()
 
const_reverse_iterator rend () const
 
void reserve (size_type n)
 
ProcessHistoryID setProcessHistoryID ()
 
size_type size () const
 
void swap (ProcessHistory &other)
 

Private Member Functions

ProcessHistoryIDphid ()
 

Private Attributes

collection_type data_
 
Transients transient_
 

Detailed Description

Definition at line 13 of file ProcessHistory.h.

Member Typedef Documentation

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.

Definition at line 15 of file ProcessHistory.h.

Constructor & Destructor Documentation

edm::ProcessHistory::ProcessHistory ( )
inline

Definition at line 29 of file ProcessHistory.h.

29 : data_(), transient_() {}
collection_type data_
edm::ProcessHistory::ProcessHistory ( size_type  n)
inlineexplicit

Definition at line 30 of file ProcessHistory.h.

30 : data_(n), transient_() {}
collection_type data_
edm::ProcessHistory::ProcessHistory ( collection_type const &  vec)
inlineexplicit

Definition at line 31 of file ProcessHistory.h.

31 : data_(vec), transient_() {}
collection_type data_

Member Function Documentation

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

Definition at line 47 of file ProcessHistory.h.

References data_.

47 {return data_.at(i);}
collection_type data_
const_reference edm::ProcessHistory::at ( size_type  i) const
inline

Definition at line 48 of file ProcessHistory.h.

References data_.

48 {return data_.at(i);}
collection_type data_
const_iterator edm::ProcessHistory::begin ( void  ) const
inline
size_type edm::ProcessHistory::capacity ( ) const
inline

Definition at line 41 of file ProcessHistory.h.

References data_.

41 {return data_.capacity();}
collection_type data_
void edm::ProcessHistory::clear ( void  )
inline
collection_type const& edm::ProcessHistory::data ( ) const
inline
template<typename... Args>
void edm::ProcessHistory::emplace_back ( Args &&...  args)
inline

Definition at line 34 of file ProcessHistory.h.

References createfilelist::args, data_, and phid().

Referenced by edm::DaqProvenanceHelper::daqInit(), edm::ProvenanceAdaptor::fixProcessHistory(), and edm::LHEProvenanceHelper::lheInit().

34 {data_.emplace_back(std::forward<Args>(args)...); phid() = ProcessHistoryID();}
Hash< ProcessHistoryType > ProcessHistoryID
ProcessHistoryID & phid()
collection_type data_
bool edm::ProcessHistory::empty ( ) const
inline
const_iterator edm::ProcessHistory::end ( void  ) const
inline
bool edm::ProcessHistory::getConfigurationForProcess ( std::string const &  name,
ProcessConfiguration config 
) const

Definition at line 39 of file ProcessHistory.cc.

References dataset::name.

Referenced by data(), edm::StableProvenance::getProcessConfiguration(), edm::Event::getProcessParameterSet(), and HLTConfigProvider::init().

40  {
41  for(auto const& item : *this) {
42  if (item.processName() == name) {
43  config = item;
44  return true;
45  }
46  }
47  // Name not found!
48  return false;
49  }
Definition: config.py:1
ProcessHistoryID edm::ProcessHistory::id ( ) const

Definition at line 11 of file ProcessHistory.cc.

References cms::Digest::digest(), edm::Hash< I >::isValid(), edm::ProcessHistory::Transients::phid_, AlCaHLTBitMon_QueryRunRegistry::string, cms::MD5Result::toString(), and transient_.

Referenced by edm::HistoryAppender::appendToProcessHistory(), data(), edm::ProvenanceAdaptor::fixProcessHistory(), edm::LHEProvenanceHelper::lheInit(), edm::ProcessHistoryRegistry::registerProcessHistory(), setProcessHistoryID(), and DQMRootSource::setupFile().

11  {
12  if(transient_.phid_.isValid()) {
13  return transient_.phid_;
14  }
15  // This implementation is ripe for optimization.
16  // We do not use operator<< because it does not write out everything.
17  std::ostringstream oss;
18  for(auto const& item : *this) {
19  oss << item.processName() << ' '
20  << item.parameterSetID() << ' '
21  << item.releaseVersion() << ' '
22  << item.passID() << ' ';
23  }
24  std::string stringrep = oss.str();
25  cms::Digest md5alg(stringrep);
26  ProcessHistoryID phID(md5alg.digest().toString());
27  return phID;
28  }
Hash< ProcessHistoryType > ProcessHistoryID
bool isValid() const
Definition: Hash.h:151
void edm::ProcessHistory::initializeTransients ( )
inline
reference edm::ProcessHistory::operator[] ( size_type  i)
inline

Definition at line 44 of file ProcessHistory.h.

References data_, and mps_fire::i.

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

Definition at line 45 of file ProcessHistory.h.

References data_, and mps_fire::i.

45 {return data_[i];}
collection_type data_
ProcessHistoryID& edm::ProcessHistory::phid ( )
inlineprivate

Definition at line 88 of file ProcessHistory.h.

References edm::ProcessHistory::Transients::phid_, and transient_.

Referenced by clear(), emplace_back(), push_back(), push_front(), reduce(), and swap().

88 {return transient_.phid_;}
void edm::ProcessHistory::push_back ( const_reference  t)
inline

Definition at line 37 of file ProcessHistory.h.

References data_, and phid().

Referenced by edm::ProvenanceAdaptor::fixProcessHistory().

37 {data_.push_back(t); phid() = ProcessHistoryID();}
Hash< ProcessHistoryType > ProcessHistoryID
ProcessHistoryID & phid()
collection_type data_
void edm::ProcessHistory::push_front ( const_reference  t)
inline

Definition at line 36 of file ProcessHistory.h.

References data_, phid(), and lumiQTWidget::t.

36 {data_.insert(data_.begin(), t); phid() = ProcessHistoryID();}
Hash< ProcessHistoryType > ProcessHistoryID
ProcessHistoryID & phid()
collection_type data_
const_reverse_iterator edm::ProcessHistory::rbegin ( ) const
inline
ProcessHistory & edm::ProcessHistory::reduce ( )

Definition at line 52 of file ProcessHistory.cc.

References data_, and phid().

Referenced by clear(), and edm::ProcessHistoryRegistry::registerProcessHistory().

52  {
53  phid() = ProcessHistoryID();
54  for(auto& item : data_) {
55  item.reduce();
56  }
57  return *this;
58  }
Hash< ProcessHistoryType > ProcessHistoryID
ProcessHistoryID & phid()
collection_type data_
const_reverse_iterator edm::ProcessHistory::rend ( ) const
inline

Definition at line 54 of file ProcessHistory.h.

References data_.

Referenced by findBinOfMaximum(), and fwlite::DataGetterHelper::getBranchDataFor().

54 {return data_.rend();}
collection_type data_
void edm::ProcessHistory::reserve ( size_type  n)
inline

Definition at line 42 of file ProcessHistory.h.

References data_.

42 {data_.reserve(n);}
collection_type data_
ProcessHistoryID edm::ProcessHistory::setProcessHistoryID ( )
size_type edm::ProcessHistory::size ( void  ) const
inline
void edm::ProcessHistory::swap ( ProcessHistory other)
inline

Definition at line 38 of file ProcessHistory.h.

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

Referenced by edm::swap().

38 {data_.swap(other.data_); phid().swap(other.phid());}
void swap(Hash< I > &other)
Definition: Hash.h:207
ProcessHistoryID & phid()
collection_type data_

Member Data Documentation

collection_type edm::ProcessHistory::data_
private
Transients edm::ProcessHistory::transient_
private

Definition at line 90 of file ProcessHistory.h.

Referenced by id(), initializeTransients(), phid(), and setProcessHistoryID().