Skip to content

Commit

Permalink
Merge pull request #44472 from mmusich/compileClients_14_0_X
Browse files Browse the repository at this point in the history
[14.0.X]  add a python compilation unit test for DQM online clients
  • Loading branch information
cmsbuild authored Mar 21, 2024
2 parents d44f56c + 88c605b commit 6755888
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 21 deletions.
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

0 comments on commit 6755888

Please sign in to comment.