CMS 3D CMS Logo

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, ProcessHistoryIDextra_
 

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 32 of file ProcessHistoryRegistry.cc.

References data_, and runEdmFileComparison::found.

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

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

Definition at line 42 of file ProcessHistoryRegistry.cc.

References data_.

42  {
43  auto const& iter = data_.find(key);
44  if(iter == data_.end()) {
45  return nullptr;
46  }
47  return &iter->second;
48  }
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_, eostools::move(), and tmp.

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

12  {
13  //make sure the process history ID is cached
14  auto tmp = processHistory;
15  ProcessHistoryID id = tmp.setProcessHistoryID();
16  bool newlyAdded = (data_.find(id) == data_.end());
17  if(newlyAdded) {
18  data_.emplace(id, tmp);
19  extra_.emplace(std::move(id), tmp.reduce().id());
20  }
21  return newlyAdded;
22  }
std::map< ProcessHistoryID, ProcessHistoryID > extra_
Hash< ProcessHistoryType > ProcessHistoryID
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
def move(src, dest)
Definition: eostools.py:510

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