Skip to content

add TestProcessor based tests for ScoutingCollectionMonitor#50907

Merged
cmsbuild merged 1 commit into
cms-sw:masterfrom
mmusich:mm_testScoutingCollectionMonitor
May 12, 2026
Merged

add TestProcessor based tests for ScoutingCollectionMonitor#50907
cmsbuild merged 1 commit into
cms-sw:masterfrom
mmusich:mm_testScoutingCollectionMonitor

Conversation

@mmusich
Copy link
Copy Markdown
Contributor

@mmusich mmusich commented May 8, 2026

PR description:

This PR is a follow-up to #50871 which stems from #50866.
This PR introduces a Catch2 test suite for ScoutingCollectionMonitor and improves the robustness of the edm::ValueMap retrieval in the analyze() method.
I provide TestProcessor-based tests that make sure there are no crashes when we run with missing input.
The Catch2 test binary is added with two test cases:

  • "ScoutingCollectionMonitor" tests: exercises the standard lifecycle methods (testWithNoRuns, testBeginAndEndJobOnly, test, testRunWithNoLuminosityBlocks, testLuminosityBlockWithNoEvents) using the default _cfi configuration.
  • "ScoutingCollectionMonitor invalid beamspot": specifically targets the code path where the beamspot handle is invalid. Since analyze() returns early when any mandatory collection handle is missing, all mandatory collections (muons, electrons, photons, PF jets, PF candidates, tracks, vertices, MET, rho, and all twelve electron best-track ValueMaps) are supplied as empty or default-constructed objects via TestProcessor::put, while the beamspot InputTag is pointed at a non-existent label. This verifies that the beamspot-guarded histogram fills (tk_BS_dxy, tk_BS_dz, trkd0BS, trkdzBS) are correctly skipped without crashing.

PR validation:

Run successfully the following unit tests:

scram b runtests_testScoutingCollectionMonitor
scram b runtests_TestDQMOnlineClient-scouting_dqm_sourceclient

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

Not a backport, to be backported down to CMSSW_16_0_X.

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

type ngt

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 8, 2026

cms-bot internal usage

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

@sakura-ngt FYI

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 8, 2026

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50907/49268

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 8, 2026

A new Pull Request was created by @mmusich for master.

It involves the following packages:

  • DQM/HLTEvF (dqm, hlt)

@Martin-Grunewald, @cmsbuild, @ctarricone, @gabrielmscampos, @mmusich, @nothingface0, @rseidita can you please review it and eventually sign? Thanks.
@missirol, @mtosi this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

test parameters:

  • addpkg = DQM/Integration
  • relval_opts = -w data_highstats --nEvents 100
  • workflow = 2025.016005

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

@cmsbuild, please test

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 8, 2026

-1

Failed Tests: RelVals
Size: This PR adds an extra 40KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bfd664/53150/summary.html
COMMIT: e2e41a9
CMSSW: CMSSW_17_0_X_2026-05-08-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/50907/53150/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals

----- Begin Fatal Exception 08-May-2026 18:48:22 CEST-----------------------
An exception of category 'FallbackFileOpenError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing input source of type PoolSource
   [2] Calling RootInputFileSequence::initTheFile()
   [3] Calling StorageFactory::open()
   [4] Calling XrdFile::open()
Exception Message:
Failed to open the file 'root://xrootd-cms.infn.it//store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664'
   Additional Info:
      [a] Attempted to open logical file /store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root.
      [b] Failed to open the file with physical name root://eoscms.cern.ch//eos/cms/store/user/cmsbuild/store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664. Will attempt fallback.
      [c] Failed to open the file with physical name root://cms-xrd-global.cern.ch//eos/cms/store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664. Will attempt fallback.
      [d] Failed to open the file with physical name root://xrootd-cms.infn.it//store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664.
      [e] XrdCl::File::Open(name='root://xrootd-cms.infn.it//store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664', flags=0x10, permissions=0660) => error '[ERROR] Server responded with an error: [3011] No servers are available to read the file.
' (errno=3011, code=400). No additional data servers were found.
      [f] Last URL tried: root://cms-xrd-global.cern.ch:1094//store/data/Run2025B/ScoutingPFMonitor/RAW/v1/000/392/112/00000/9663eab7-dbc8-4e13-b710-57af6d92589b.root?scitag.flow=196664&tried=+1213llrxrd-redir.in2p3.fr&xrdcl.requuid=ba918531-2626-43e8-a04b-4df7ee2b1fe7
      [g] Problematic data server: cms-xrd-global.cern.ch:1094
      [h] Disabled source: cms-xrd-global.cern.ch:1094
----- End Fatal Exception -------------------------------------------------

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

test parameters:

  • addpkg = DQM/Integration

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 8, 2026

@cmsbuild, please test

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 8, 2026

+1

Size: This PR adds an extra 40KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bfd664/53155/summary.html
COMMIT: e2e41a9
CMSSW: CMSSW_17_0_X_2026-05-08-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/50907/53155/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 3 lines from the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4187168
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4187142
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 227 log files, 197 edm output root files, 53 DQM output files
  • TriggerResults: no differences found

@gabrielmscampos
Copy link
Copy Markdown
Member

+dqm

@mmusich
Copy link
Copy Markdown
Contributor Author

mmusich commented May 11, 2026

+hlt

@cmsbuild
Copy link
Copy Markdown
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @ftenchini, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Copy Markdown
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants