CMS 3D CMS Logo

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

#include <ProcessHistoryRegistry.h>

Public Types

typedef ProcessHistoryMap collection_type
 
typedef ProcessHistory value_type
 
typedef ProcessHistoryVector vector_type
 

Public Member Functions

ProcessHistoryMap::const_iterator begin () const
 
ProcessHistoryMap::const_iterator end () const
 
bool getMapped (ProcessHistoryID const &key, ProcessHistory &value) const
 
ProcessHistory const * getMapped (ProcessHistoryID const &key) const
 
ProcessHistoryRegistryoperator= (ProcessHistoryRegistry const &)=delete
 
 ProcessHistoryRegistry ()
 
 ProcessHistoryRegistry (ProcessHistoryRegistry const &)=delete
 
ProcessHistoryID const & reducedProcessHistoryID (ProcessHistoryID const &fullID) const
 
bool registerProcessHistory (ProcessHistory const &processHistory)
 

Private Attributes

ProcessHistoryMap data_
 
std::map< ProcessHistoryID,
ProcessHistoryID
extra_
 

Detailed Description

Author
Bill Tanenbaum, modified 23 August, 2013

Definition at line 18 of file ProcessHistoryRegistry.h.

Member Typedef Documentation

Definition at line 21 of file ProcessHistoryRegistry.h.

Definition at line 20 of file ProcessHistoryRegistry.h.

Definition at line 22 of file ProcessHistoryRegistry.h.

Constructor & Destructor Documentation

edm::ProcessHistoryRegistry::ProcessHistoryRegistry ( )

Definition at line 6 of file ProcessHistoryRegistry.cc.

References extra_.

6  : data_(), extra_() {
7  // insert the mapping for an empty process history
8  extra_.insert(std::pair<ProcessHistoryID, ProcessHistoryID>(ProcessHistory().id(), ProcessHistory().reduce().id()));
9  }
std::map< ProcessHistoryID, ProcessHistoryID > extra_
edm::ProcessHistoryRegistry::ProcessHistoryRegistry ( ProcessHistoryRegistry const &  )
delete

Member Function Documentation

ProcessHistoryMap::const_iterator edm::ProcessHistoryRegistry::begin ( void  ) const
inline

Definition at line 33 of file ProcessHistoryRegistry.h.

References data_.

33  {
34  return data_.begin();
35  }
ProcessHistoryMap::const_iterator edm::ProcessHistoryRegistry::end ( void  ) const
inline

Definition at line 36 of file ProcessHistoryRegistry.h.

References data_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

36  {
37  return data_.end();
38  }
bool edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key,
ProcessHistory value 
) const

Definition at line 31 of file ProcessHistoryRegistry.cc.

References data_, newFWLiteAna::found, and getDQMSummary::iter.

Referenced by edm::Principal::fillPrincipal(), and DQMRootOutputModule::startEndFile().

31  {
32  auto const& iter = data_.find(key);
33  bool found = (iter != data_.end());
34  if(found) {
35  value = iter->second;
36  }
37  return found;
38  }
ProcessHistory const * edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key) const

Definition at line 41 of file ProcessHistoryRegistry.cc.

References data_, and getDQMSummary::iter.

41  {
42  auto const& iter = data_.find(key);
43  if(iter == data_.end()) {
44  return nullptr;
45  }
46  return &iter->second;
47  }
ProcessHistoryRegistry& edm::ProcessHistoryRegistry::operator= ( ProcessHistoryRegistry const &  )
delete
ProcessHistoryID const & edm::ProcessHistoryRegistry::reducedProcessHistoryID ( ProcessHistoryID const &  fullID) const
bool edm::ProcessHistoryRegistry::registerProcessHistory ( ProcessHistory const &  processHistory)

Definition at line 12 of file ProcessHistoryRegistry.cc.

References data_, extra_, edm::ProcessHistory::id(), and edm::ProcessHistory::reduce().

Referenced by edm::DaqProvenanceHelper::daqInit(), edm::StreamerInputSource::deserializeEvent(), edm::LHEProvenanceHelper::lheInit(), edm::RootFile::RootFile(), DQMRootSource::setupFile(), edm::RootOutputFile::writeLuminosityBlock(), DQMRootOutputModule::writeLuminosityBlock(), edm::RootOutputFile::writeOne(), edm::RootOutputFile::writeRun(), and DQMRootOutputModule::writeRun().

12  {
13  ProcessHistoryID id = processHistory.id();
14  bool newlyAdded = (data_.find(id) == data_.end());
15  if(newlyAdded) {
16  data_.insert(std::pair<ProcessHistoryID, ProcessHistory>(id, processHistory));
17  ProcessHistory toBeReduced(processHistory);
18  extra_.insert(std::pair<ProcessHistoryID, ProcessHistoryID>(id, toBeReduced.reduce().id()));
19  }
20  return newlyAdded;
21  }
std::map< ProcessHistoryID, ProcessHistoryID > extra_
Hash< ProcessHistoryType > ProcessHistoryID

Member Data Documentation

ProcessHistoryMap edm::ProcessHistoryRegistry::data_
private

Definition at line 40 of file ProcessHistoryRegistry.h.

Referenced by begin(), end(), getMapped(), and registerProcessHistory().

std::map<ProcessHistoryID, ProcessHistoryID> edm::ProcessHistoryRegistry::extra_
private