CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 { return data_.begin(); }
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(); }
bool edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key,
ProcessHistory value 
) const

Definition at line 29 of file ProcessHistoryRegistry.cc.

References data_, and newFWLiteAna::found.

Referenced by edm::RunPrincipal::fillRunPrincipal(), edm::RawInputSource::makeEvent(), edm::StreamerInputSource::read(), edm::TestSource::readEvent_(), edm::RepeatingCachedRootSource::readEvent_(), edm::InputSource::readLuminosityBlock_(), and DQMRootOutputModule::startEndFile().

29  {
30  auto const& iter = data_.find(key);
31  bool found = (iter != data_.end());
32  if (found) {
33  value = iter->second;
34  }
35  return found;
36  }
tuple key
prepare the HTCondor submission files and eventually submit them
ProcessHistory const * edm::ProcessHistoryRegistry::getMapped ( ProcessHistoryID const &  key) const

Definition at line 38 of file ProcessHistoryRegistry.cc.

References data_.

38  {
39  auto const& iter = data_.find(key);
40  if (iter == data_.end()) {
41  return nullptr;
42  }
43  return &iter->second;
44  }
tuple key
prepare the HTCondor submission files and eventually submit them
ProcessHistoryRegistry& edm::ProcessHistoryRegistry::operator= ( ProcessHistoryRegistry const &  )
delete
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::PrincipalCache::insert(), edm::PrincipalCache::merge(), 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_
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::StreamerInputSource::deserializeEvent(), edm::LHEProvenanceHelper::lheInit(), edm::RootFile::RootFile(), edm::test::TestProcessor::TestProcessor(), NanoAODOutputModule::write(), edm::RootOutputFile::writeLuminosityBlock(), NanoAODOutputModule::writeLuminosityBlock(), DQMRootOutputModule::writeLuminosityBlock(), edm::RootOutputFile::writeOne(), edm::RootOutputFile::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  }
def move
Definition: eostools.py:511
std::map< ProcessHistoryID, ProcessHistoryID > extra_
Hash< ProcessHistoryType > ProcessHistoryID
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

ProcessHistoryMap edm::ProcessHistoryRegistry::data_
private

Definition at line 35 of file ProcessHistoryRegistry.h.

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

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