Skip to content

Commit

Permalink
Merge pull request #29801 from schneiml/dqm-fix-unittests
Browse files Browse the repository at this point in the history
DQM: Use process.maxLuminosityBlocks in the unit test
  • Loading branch information
cmsbuild committed May 12, 2020
2 parents a5c9719 + 9e80809 commit fa1e630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions DQMServices/Demo/test/run_analyzers_cfg.py
Expand Up @@ -39,6 +39,7 @@
parser.register('numberEventsInLuminosityBlock', 20, one, int, "See EmptySource.")
parser.register('processingMode', 'RunsLumisAndEvents', one, string, "See EmptySource.")
parser.register('nEvents', 100, one, int, "Total number of events.")
parser.register('nLumisections', -1, one, int, "Total number of lumisections.")
parser.register('nThreads', 1, one, int, "Number of threads and streams.")
parser.register('nConcurrent', 1, one, int, "Number of concurrent runs/lumis.")
parser.register('howmany', 1, one, int, "Number of MEs to book of each type.")
Expand All @@ -55,6 +56,9 @@
processingMode = cms.untracked.string(args.processingMode))

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(args.nEvents) )
if args.nLumisections > 0:
process.maxLuminosityBlocks = cms.untracked.PSet( input = cms.untracked.int32(args.nLumisections) )


process.options = cms.untracked.PSet(
numberOfThreads = cms.untracked.uint32(args.nThreads),
Expand Down
8 changes: 2 additions & 6 deletions DQMServices/Demo/test/runtests.sh
Expand Up @@ -155,12 +155,8 @@ cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=empty.root nEvents=0
cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=empty.root howmany=0
cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=empty.root howmany=0 legacyoutput=True
cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=empty.root howmany=0 protobufoutput=True
# also try empty lumisections. EmptySource does not really support 'no events' mode (never terminates), so, a bit of a hack here.
cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=noevents.root processingMode='RunsAndLumis' &
PID=$!
sleep 5
kill -INT $PID
wait
# nLumisections might be a bit buggy (off by one) in EDM, but is fine here.
cmsRun $LOCAL_TEST_DIR/run_analyzers_cfg.py outfile=noevents.root processingMode='RunsAndLumis' nLumisections=20
[ 66 = $(dqmiolistmes.py noevents.root -r 1 | wc -l) ]
[ 66 = $(dqmiolistmes.py noevents.root -r 1 -l 1 | wc -l) ]
[ 66 = $(dqmiolistmes.py noevents.root -r 2 | wc -l) ]
Expand Down

0 comments on commit fa1e630

Please sign in to comment.