CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
bool registerProcessHistory(ProcessHistory const &processHistory)
assert(be >=bs)
def move
Definition: eostools.py:511
tuple key
prepare the HTCondor submission files and eventually submit them
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
std::map< ProcessHistoryID, ProcessHistoryID > extra_
tmp
align.sh
Definition: createJobs.py:716