Skip to content

Commit

Permalink
Bug fix for setRunNumberForEachLumi
Browse files Browse the repository at this point in the history
The PoolSource configuration option
setRunNumberForEachLumi had a bug that would
cause an assert failure if there was an output
module running (and possibly other problems
because the wrong run number was being used at
endRun). Probably no one was using this option
because no one noticed the failure before and there
is nothing in the repository referencing it other
than a Framework unit test. I added an output
module to the unit test so this failure would be
detected in the IB.

This bug should not affect anything if that option
is not configured. The code fragment with the
bug would not be executed.
  • Loading branch information
wddgit committed Jul 30, 2019
1 parent 1f01a45 commit e964ed9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions IOPool/Input/src/RootFile.cc
Expand Up @@ -1466,8 +1466,9 @@ namespace edm {

std::shared_ptr<RunAuxiliary> RootFile::readRunAuxiliary_() {
if (runHelper_->fakeNewRun()) {
runHelper_->overrideRunNumber(savedRunAuxiliary_->id());
return savedRunAuxiliary();
auto runAuxiliary = std::make_shared<RunAuxiliary>(*savedRunAuxiliary());
runHelper_->overrideRunNumber(runAuxiliary->id());
return runAuxiliary;
}
assert(indexIntoFileIter_ != indexIntoFileEnd_);
assert(indexIntoFileIter_.getEntryType() == IndexIntoFile::kRun);
Expand Down
5 changes: 5 additions & 0 deletions IOPool/Input/test/RunPerLumiTest_cfg.py
Expand Up @@ -21,6 +21,11 @@
fileNames = cms.untracked.vstring('file:RunPerLumiTest.root')
)

process.output = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string('OutputRunPerLumiTest.root')
)

process.p = cms.Path(process.OtherThing*process.Analysis)

process.e = cms.EndPath(process.output)

0 comments on commit e964ed9

Please sign in to comment.