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

DQM: Use process.maxLuminosityBlocks in the unit test #29801

Merged
merged 1 commit into from May 12, 2020
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
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) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, you can now just do

process.maxLuminosityBlocks.input = 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