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 31 of file ProcessHistoryRegistry.h.

References data_.

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

Definition at line 34 of file ProcessHistoryRegistry.h.

References data_.

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

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

Definition at line 31 of file ProcessHistoryRegistry.cc.

References data_, and newFWLiteAna::found.

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  }
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
ProcessHistory const * edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key) const

Definition at line 41 of file ProcessHistoryRegistry.cc.

References data_.

41  {
42  auto const& iter = data_.find(key);
43  if(iter == data_.end()) {
44  return nullptr;
45  }
46  return &iter->second;
47  }
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
ProcessHistoryRegistry& edm::ProcessHistoryRegistry::operator= ( ProcessHistoryRegistry const &  )
delete
ProcessHistoryID const & edm::ProcessHistoryRegistry::reducedProcessHistoryID ( ProcessHistoryID const &  fullID) const

Definition at line 24 of file ProcessHistoryRegistry.cc.

References assert(), and extra_.

Referenced by edm::RunPrincipal::fillRunPrincipal(), edm::PrincipalCache::insert(), edm::PrincipalCache::merge(), edm::IndexIntoFile::reduceProcessHistoryIDs(), DQMRootSource::setupFile(), edm::RootOutputFile::writeLuminosityBlock(), edm::RootOutputFile::writeOne(), and edm::RootOutputFile::writeRun().

24  {
25  auto const& iter = extra_.find(fullID);
26  assert(iter != extra_.end());
27  return iter->second;
28  }
assert(m_qm.get())
std::map< ProcessHistoryID, ProcessHistoryID > extra_
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 38 of file ProcessHistoryRegistry.h.

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

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