Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly update empty process history #2569

Merged
merged 2 commits into from Feb 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion FWCore/Sources/src/DaqProvenanceHelper.cc
Expand Up @@ -100,6 +100,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 @@ -114,7 +115,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
24 changes: 10 additions & 14 deletions IOPool/Input/src/RootFile.cc
Expand Up @@ -1234,13 +1234,11 @@ namespace edm {
lumiTree_.fillAux<LuminosityBlockAux>(pLumiAux);
conversion(lumiAux, *lumiAuxiliary);
}
if(fileFormatVersion().processHistorySameWithinRun()) {
if(provenanceAdaptor_) {
lumiAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
}
if(daqProvenanceHelper_) {
lumiAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
}
if(provenanceAdaptor_) {
lumiAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
}
if(daqProvenanceHelper_) {
lumiAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
}
if(lumiAuxiliary->luminosityBlock() == 0 && !fileFormatVersion().runsAndLumis()) {
lumiAuxiliary->id() = LuminosityBlockID(RunNumber_t(1), LuminosityBlockNumber_t(1));
Expand All @@ -1260,13 +1258,11 @@ namespace edm {
runTree_.fillAux<RunAux>(pRunAux);
conversion(runAux, *runAuxiliary);
}
if(fileFormatVersion().processHistorySameWithinRun()) {
if(provenanceAdaptor_) {
runAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
}
if(daqProvenanceHelper_) {
runAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
}
if(provenanceAdaptor_) {
runAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
}
if(daqProvenanceHelper_) {
runAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
}
return runAuxiliary;
}
Expand Down