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

◆ collection_type

Definition at line 21 of file ProcessHistoryRegistry.h.

◆ value_type

Definition at line 20 of file ProcessHistoryRegistry.h.

◆ vector_type

Definition at line 22 of file ProcessHistoryRegistry.h.

Constructor & Destructor Documentation

◆ ProcessHistoryRegistry() [1/2]

edm::ProcessHistoryRegistry::ProcessHistoryRegistry ( )

Definition at line 6 of file ProcessHistoryRegistry.cc.

References extra_, and ProducerSetup_cff::ProcessHistory.

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_

◆ ProcessHistoryRegistry() [2/2]

edm::ProcessHistoryRegistry::ProcessHistoryRegistry ( ProcessHistoryRegistry const &  )
delete

Member Function Documentation

◆ begin()

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

Definition at line 31 of file ProcessHistoryRegistry.h.

References data_.

31 { return data_.begin(); }

◆ end()

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

Definition at line 32 of file ProcessHistoryRegistry.h.

References data_.

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

32 { return data_.end(); }

◆ getMapped() [1/2]

bool edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key,
ProcessHistory value 
) const

◆ getMapped() [2/2]

ProcessHistory const * edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key) const

Definition at line 38 of file ProcessHistoryRegistry.cc.

References data_, and submitPVResolutionJobs::key.

38  {
39  auto const& iter = data_.find(key);
40  if (iter == data_.end()) {
41  return nullptr;
42  }
43  return &iter->second;
44  }
key
prepare the HTCondor submission files and eventually submit them

◆ operator=()

ProcessHistoryRegistry& edm::ProcessHistoryRegistry::operator= ( ProcessHistoryRegistry const &  )
delete

◆ reducedProcessHistoryID()

ProcessHistoryID const & edm::ProcessHistoryRegistry::reducedProcessHistoryID ( ProcessHistoryID const &  fullID) const

Definition at line 23 of file ProcessHistoryRegistry.cc.

References cms::cuda::assert(), and extra_.

Referenced by edm::RunPrincipal::fillRunPrincipal(), edm::IndexIntoFile::reduceProcessHistoryIDs(), edm::RootOutputFile::writeLuminosityBlock(), edm::RootOutputFile::writeOne(), and edm::RootOutputFile::writeRun().

23  {
24  auto const& iter = extra_.find(fullID);
25  assert(iter != extra_.end());
26  return iter->second;
27  }
assert(be >=bs)
std::map< ProcessHistoryID, ProcessHistoryID > extra_

◆ registerProcessHistory()

bool edm::ProcessHistoryRegistry::registerProcessHistory ( ProcessHistory const &  processHistory)

Definition at line 11 of file ProcessHistoryRegistry.cc.

References data_, extra_, eostools::move(), and createJobs::tmp.

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

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

Member Data Documentation

◆ data_

ProcessHistoryMap edm::ProcessHistoryRegistry::data_
private

Definition at line 35 of file ProcessHistoryRegistry.h.

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

◆ extra_

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