CMS 3D CMS Logo

ProcessHistoryRegistry.cc
Go to the documentation of this file.
3 
4 #include <cassert>
5 namespace edm {
7  // insert the mapping for an empty process history
8  extra_.insert(std::pair<ProcessHistoryID, ProcessHistoryID>(ProcessHistory().id(), ProcessHistory().reduce().id()));
9  }
10 
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  }
22 
24  auto const& iter = extra_.find(fullID);
25  assert(iter != extra_.end());
26  return iter->second;
27  }
28 
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  }
37 
39  auto const& iter = data_.find(key);
40  if (iter == data_.end()) {
41  return nullptr;
42  }
43  return &iter->second;
44  }
45 } // namespace edm
edm::ProcessHistoryRegistry::registerProcessHistory
bool registerProcessHistory(ProcessHistory const &processHistory)
Definition: ProcessHistoryRegistry.cc:11
ProducerES_cfi.ProcessHistory
ProcessHistory
Definition: ProducerES_cfi.py:14
edm
HLT enums.
Definition: AlignableModifier.h:19
cms::cuda::assert
assert(be >=bs)
ProcessHistoryRegistry.h
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
EDMException.h
edm::ProcessHistoryRegistry::extra_
std::map< ProcessHistoryID, ProcessHistoryID > extra_
Definition: ProcessHistoryRegistry.h:36
edm::Hash< ProcessHistoryType >
value
Definition: value.py:1
edm::ProcessHistoryRegistry::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
Definition: ProcessHistoryRegistry.cc:23
edm::ProcessHistoryRegistry::data_
ProcessHistoryMap data_
Definition: ProcessHistoryRegistry.h:35
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ProcessHistoryRegistry::getMapped
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
Definition: ProcessHistoryRegistry.cc:29
edm::ProcessHistory
Definition: ProcessHistory.h:13
edm::ProcessHistoryRegistry::ProcessHistoryRegistry
ProcessHistoryRegistry()
Definition: ProcessHistoryRegistry.cc:6
crabWrapper.key
key
Definition: crabWrapper.py:19