Skip to content

Commit

Permalink
Merge pull request #2521 from wmtan/DoNotMapEmptyProcessHistoryID62XSLHC
Browse files Browse the repository at this point in the history
Framework fix -- Don't try to update empty process history ID
  • Loading branch information
ktf committed Feb 20, 2014
2 parents ca94eca + ffd45cf commit 8ef56d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FWCore/Sources/src/DaqProvenanceHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ namespace edm {

void
DaqProvenanceHelper::fixMetaData(std::vector<ProcessConfiguration>& pcv, std::vector<ProcessHistory>& phv) {
phv.push_back(ProcessHistory()); // For new processHistory, containing only processConfiguration_
std::vector<ProcessConfiguration> newPCs;
for(auto const& pc : pcv) {
if(pc.processName() == oldProcessName_) {
Expand All @@ -118,7 +119,7 @@ namespace edm {
// update existing process histories
for(auto& ph : phv) {
for(auto const& newPC : newPCs) {
if(matchProcesses(newPC, ph)) {
if(ph.empty() || matchProcesses(newPC, ph)) {
ProcessHistoryID oldPHID = ph.id();
ph.push_front(newPC);
ProcessHistoryID newPHID = ph.id();
Expand Down

0 comments on commit 8ef56d7

Please sign in to comment.