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

[14.0.X] add a python compilation unit test for DQM online clients #44472

Merged
merged 2 commits into from
Mar 21, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@
process.ecalDigisCPU.InputLabel = 'rawDataRepacker'
elif runTypeName == 'hpu_run':
if not unitTest:
process.source.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('*'))

process.source.SelectEvents = cms.untracked.vstring("*")

### process customizations included here
from DQM.Integration.config.online_customizations_cfi import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,18 @@
prescales = cms.vuint32(6)
),
)
)


process.load("DQM.HLTEvF.TrigResRateMon_cfi")

# run on 1 out of 8 SM, LSSize 23 -> 23/8 = 2.875
# stream is prescaled by 10, to correct change LSSize 23 -> 23/10 = 2.3
process.trRateMon.LuminositySegmentSize = 2.3
)

process.load("DQM.HLTEvF.triggerRatesMonitor_cfi")

# Add RawToDigi
process.rateMon = cms.EndPath(process.hltPreTrigResRateMon *process.trRateMon)

process.rateMon = cms.EndPath(process.hltPreTrigResRateMon *process.triggerRatesMonitor)

process.pp = cms.Path(process.dqmEnv+process.dqmSaver+process.dqmSaverPB)

process.dqmEnv.subSystemFolder = 'HLT/TrigResults'
#process.hltResults.plotAll = True


### process customizations included here
from DQM.Integration.config.online_customizations_cfi import *
process = customise(process)
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
process.l1tMonitorOnline.remove(process.l1tGmt)

#process.l1tMonitorOnline.remove(process.l1tGt)
process.l1tGt.HistFolder = "L1T/L1TGTTestCrate"

#process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@
#process.valRctDigis.getFedsFromOmds = cms.bool(True)

process.stage1UnpackerPath = cms.Path(process.caloStage1Digis+process.caloStage1LegacyFormatDigis)
process.caloStage1LegacyFormatDigis.bxMin = -2
process.caloStage1LegacyFormatDigis.bxMax = 2

#
process.l1EmulatorMonitorClientPath = cms.Path(process.l1EmulatorMonitorClient)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import print_function
import sys
# $Id: physics_dqm_sourceclient-live_cfg.py,v 1.11 2012/02/13 15:09:30 lilopera Exp $

import FWCore.ParameterSet.Config as cms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,7 @@
process.load('RecoTracker.FinalTrackSelectors.MergeTrackCollections_cff')
import RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi
process.load('RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi')
process.earlyGeneralTracks.TrackProducers = (
cms.InputTag('initialStepTracks'),
)

process.earlyGeneralTracks.TrackProducers = cms.VInputTag(cms.InputTag('initialStepTracks'))
process.earlyGeneralTracks.hasSelector=cms.vint32(1)
process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
# cms.InputTag("initialStepSelector","initialStep"),
Expand Down
8 changes: 8 additions & 0 deletions DQM/Integration/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@
<!-- <test name="TestDQMOnlineClient-hcalcalib_dqm_sourceclient" command="runtest.sh hcalcalib_dqm_sourceclient-live_cfg.py" /> -->
<test name="TestDQMOnlineClient-visualization" command="runtest.sh visualization-live_cfg.py" />
<test name="TestDQMOnlineClient-visualization_secondInstance" command="runtest.sh visualization-live-secondInstance_cfg.py" />
<!--tests that the configuration is compilable for the full matrix of combinations -->
<test name="TestDQMOnlineClients-compilation_pp_run" command="runCompilationTest.sh pp_run"/>
<test name="TestDQMOnlineClients-compilation_pp_run_stage1" command="runCompilationTest.sh pp_run_stage1"/>
<test name="TestDQMOnlineClients-compilation_cosmic_run" command="runCompilationTest.sh cosmic_run"/>
<test name="TestDQMOnlineClients-compilation_cosmic_run_stage1" command="runCompilationTest.sh cosmic_run_stage1"/>
<test name="TestDQMOnlineClients-compilation_hi_run" command="runCompilationTest.sh hi_run"/>
<test name="TestDQMOnlineClients-compilation_hpu_run" command="runCompilationTest.sh hpu_run"/>
<test name="TestDQMOnlineClients-compilation_commissioning_run" command="runCompilationTest.sh commissioning_run"/>
37 changes: 37 additions & 0 deletions DQM/Integration/test/runCompilationTest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Check if the key argument is provided
if [ $# -eq 0 ]; then
echo "Usage: $0 <key>"
exit 1
fi

# Extract the key from the command line argument
key="$1"

# Define a function to run the python command
run_python_command() {
function die { echo $1: status $2 ; exit $2; }

entry="$1"
key="$2"

# Check conditions to skip certain combinations
if [[ "$entry" == *visualization-live_cfg.py* && ( "$key" == "pp_run_stage1" || "$key" == "cosmic_run_stage1" || "$key" == "hpu_run" ) ]]; then
echo "===== Skipping Test \"python3 $entry runkey=$key\" ===="
return
fi

# Otherwise, proceed with the test
echo "===== Test \"python3 $entry runkey=$key\" ===="
(python3 "$entry" runkey="$key" > /dev/null) 2>&1 || die "Failure using python3 $entry" $?
}

# Run the tests for the specified key
echo "Running tests for key: $key"
for entry in "${CMSSW_BASE}/src/DQM/Integration/python/clients/"*"-live_cfg.py"; do
run_python_command "$entry" "$key"
done

# All tests passed
echo "All tests passed!"
2 changes: 1 addition & 1 deletion DQM/Physics/python/qcdLowPtDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi import *
from RecoLocalTracker.SiPixelRecHits.PixelCPEESProducers_cff import *

siPixelDigis.InputLabel = cms.InputTag("source")
siPixelDigis.cpu.InputLabel = cms.InputTag("source")

myRecoSeq1 = cms.Sequence(
siPixelDigis *
Expand Down