Skip to content

Added ROOT dictionaries in DataFormats - #51739

Merged
cmsbuild merged 2 commits into
cms-sw:masterfrom
alexstrel:XML-corrections
Aug 22, 2026
Merged

Added ROOT dictionaries in DataFormats#51739
cmsbuild merged 2 commits into
cms-sw:masterfrom
alexstrel:XML-corrections

Conversation

@alexstrel

@alexstrel alexstrel commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR adds ROOT dictionary instantiations identified during the investigation of ROOT autoparsing and memory usage. The changes cover several DataFormats packages, including BTauReco, EgammaCandidates, EgammaReco, HcalIsolatedTrack, L1TCorrelator, L1TMuon, L1TParticleFlow, ParticleFlowReco, and RecoCandidate.
The goal is to provide the required dictionaries explicitly and avoid unnecessary runtime autoparsing.

Resolves cms-sw/framework-team#2398

@cmsbuild

cmsbuild commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51739/50669

@cmsbuild

Copy link
Copy Markdown
Contributor

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

It involves the following packages:

  • DataFormats/BTauReco (reconstruction)
  • DataFormats/EgammaCandidates (reconstruction)
  • DataFormats/EgammaReco (reconstruction)
  • DataFormats/HcalIsolatedTrack (reconstruction)
  • DataFormats/L1TCorrelator (l1)
  • DataFormats/L1TMuon (l1)
  • DataFormats/L1TParticleFlow (l1)
  • DataFormats/ParticleFlowReco (reconstruction)
  • DataFormats/RecoCandidate (reconstruction)

@BenjaminRS, @Moanwar, @cmsbuild, @jfernan2, @mandrenguyen, @quinnanm, @srimanob can you please review it and eventually sign? Thanks.
@AlexDeMoor, @Ming-Yan, @Prasant1993, @Sam-Harper, @Senphy, @a-kapoor, @afiqaize, @andrzejnovak, @bsunanda, @castaned, @eyigitba, @gouskos, @hatakeyamak, @jainshilpi, @lgray, @missirol, @mmusich, @pavlo-kashko, @philippgadow, @ram1123, @rovere, @sameasy, @sobhatta, @thomreis, @varuns23 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

@makortel makortel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Few suggestions to have related types closer each other in the XML file. But please wait for the build of #51200 (comment) to succeed before updating this PR.

@@ -1,5 +1,6 @@
<lcgdict>

<class name="std::vector<reco::io_v1::ElectronSeed::PMVars>"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this line below

<class name="std::vector<reco::io_v1::ElectronSeed>"/>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

</class>
<class name="std::vector<l1t::io_v1::TkEm>"/>
<class name="edm::Wrapper<std::vector<l1t::io_v1::TkEm> >"/>
<class name="edm::refhelper::FindUsingAdvance<std::vector<l1t::io_v1::TkElectron>,l1t::io_v1::TkElectron>"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this above the line

<class name="edm::Ref<std::vector<l1t::io_v1::TkElectron>,l1t::io_v1::TkElectron,edm::refhelper::FindUsingAdvance<std::vector<l1t::io_v1::TkElectron>,l1t::io_v1::TkElectron> >"/>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

<class name="l1t::RegionalOutput<l1t::PFCandidateCollection>" />
<class name="edm::Wrapper<l1t::RegionalOutput<l1t::PFCandidateCollection>>" />

<class name="edm::refhelper::FindUsingAdvance<std::vector<l1t::io_v1::PFJet>,l1t::io_v1::PFJet>"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this above the line

<class name="edm::Ref<l1t::PFJetCollection>" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +31 to +32
<class name="std::pair<reco::isodeposit::Direction::Distance,float>"/>
<class name="std::map<reco::isodeposit::Direction::Distance,float>"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move these below the line

<class name="std::multimap<reco::io_v1::IsoDeposit::Direction::Distance,float>"/>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51739/50681

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #51739 was updated. @BenjaminRS, @Moanwar, @cmsbuild, @jfernan2, @mandrenguyen, @quinnanm, @srimanob can you please check and sign again.

@makortel

Copy link
Copy Markdown
Contributor

@cmsbuild, please test

@cmsbuild

Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d2876f/55493/summary.html
COMMIT: 489d906
CMSSW: CMSSW_20_1_X_2026-08-21-1100/el9_amd64_gcc14
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/51739/55493/install.sh to create a dev area with all the needed externals and cmssw changes.

DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3592269
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3592248
  • DQMHistoTests: Total skipped: 18
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 44 files compared)
  • Checked 195 log files, 163 edm output root files, 45 DQM output files
  • TriggerResults: no differences found

Max Memory Comparisons exceeding threshold

@cms-sw/core-l2 , I found 21 workflow step(s) with memory usage exceeding the error threshold:

Expand to see workflows ...
  • Error: Workflow 25.0_TTbar step5 max memory diff -54.8 exceeds +/- 30.0 MiB
  • Error: Workflow 1001.0_RunMinBias2011A step3 max memory diff -53.4 exceeds +/- 30.0 MiB
  • Error: Workflow 2023.0020001_RunJetMET02023D_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0000001_RunZeroBias2024B_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0010001_RunJetMET02024C_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0020001_RunEGamma02024D_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0030001_RunDisplacedJet2024E_10k step3 max memory diff -30.1 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0040001_RunPark2MuonLowMass02024F_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0050001_RunBTagMu2024G_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0060001_RunMuon02024H_10k step3 max memory diff -30.0 exceeds +/- 30.0 MiB
  • Error: Workflow 2024.0070001_RunTau2024I_10k step3 max memory diff -30.1 exceeds +/- 30.0 MiB
  • Error: Workflow 11634.0_TTbar_14TeV+2022 step5 max memory diff -46.6 exceeds +/- 30.0 MiB
  • Error: Workflow 12434.0_TTbar_14TeV+2023 step5 max memory diff -46.6 exceeds +/- 30.0 MiB
  • Error: Workflow 12834.0_TTbar_14TeV+2024 step5 max memory diff -46.6 exceeds +/- 30.0 MiB
  • Error: Workflow 12846.0_ZEE_14+2024 step5 max memory diff -46.6 exceeds +/- 30.0 MiB
  • Error: Workflow 16834.0_TTbar_14TeV+2025 step5 max memory diff -46.6 exceeds +/- 30.0 MiB
  • Error: Workflow 18434.0_TTbar_14TeV+2026 step5 max memory diff -44.1 exceeds +/- 30.0 MiB
  • Error: Workflow 37634.0_TTbar_14TeV+Run4D127 step5 max memory diff -34.3 exceeds +/- 30.0 MiB
  • Error: Workflow 37634.911_TTbar_14TeV+Run4D127_DD4hep step5 max memory diff -34.3 exceeds +/- 30.0 MiB
  • Error: Workflow 37696.0_CloseByPGun_CE_E_Front_120um+Run4D127 step5 max memory diff -34.3 exceeds +/- 30.0 MiB
  • Error: Workflow 37700.0_CloseByPGun_CE_H_Coarse_Scint+Run4D127 step5 max memory diff -34.3 exceeds +/- 30.0 MiB

@makortel

Copy link
Copy Markdown
Contributor

@cms-sw/l1-l2 @cms-sw/reconstruction-l2 Note that strictly speaking this PR is independent from #51200 and can (IMHO should) be reviewed and merged separately.

@Moanwar

Moanwar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Hi @alexstrel, thanks a lot for the PR! It’s nice to see the reduction in memory usage. Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

@makortel

Copy link
Copy Markdown
Contributor

Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

Generally more compiled dictionaries for data types that ROOT serializes as opposed to header parsing can reduce memory. In several of the workflows the step 5 is ALCA. Could be related to the data types that are being read/written there.

@Moanwar

Moanwar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

Generally more compiled dictionaries for data types that ROOT serializes as opposed to header parsing can reduce memory. In several of the workflows the step 5 is ALCA. Could be related to the data types that are being read/written there.

Then I would be greedy and ask if we can add that to more DataFormats packages ?

@makortel

Copy link
Copy Markdown
Contributor

Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

Generally more compiled dictionaries for data types that ROOT serializes as opposed to header parsing can reduce memory. In several of the workflows the step 5 is ALCA. Could be related to the data types that are being read/written there.

Then I would be greedy and ask if we can add that to more DataFormats packages ?

Add what exactly?

@Moanwar

Moanwar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

Generally more compiled dictionaries for data types that ROOT serializes as opposed to header parsing can reduce memory. In several of the workflows the step 5 is ALCA. Could be related to the data types that are being read/written there.

Then I would be greedy and ask if we can add that to more DataFormats packages ?

Add what exactly?

Well I see this changes cover several DataFormats packages, including BTauReco, EgammaCandidates, EgammaReco, HcalIsolatedTrack, L1TCorrelator, L1TMuon, L1TParticleFlow, ParticleFlowReco, and RecoCandidate.

So can it cover more ? This my question

@makortel

Copy link
Copy Markdown
Contributor

Just for my understanding, is this reduction expected? And why is it specifically in Step 5? It’s a little bit unclear to me.

Generally more compiled dictionaries for data types that ROOT serializes as opposed to header parsing can reduce memory. In several of the workflows the step 5 is ALCA. Could be related to the data types that are being read/written there.

Then I would be greedy and ask if we can add that to more DataFormats packages ?

Add what exactly?

Well I see this changes cover several DataFormats packages, including BTauReco, EgammaCandidates, EgammaReco, HcalIsolatedTrack, L1TCorrelator, L1TMuon, L1TParticleFlow, ParticleFlowReco, and RecoCandidate.

So can it cover more ? This my question

Theoretically that would be great, but practice is more complicated. These cases were found by running a job on a CMSSW build that was built on top of a ROOT debug build in gdb and inspecting stack traces for ExecAutoParse() function calls. @alexstrel is working to find more from a different job.

I'd love to have a better way to find missing dictionaries (see #49458), but we are not there yet.

@Moanwar

Moanwar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

+1

@quinnanm

Copy link
Copy Markdown
Contributor

+l1

@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, @mandrenguyen, @ftenchini (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen

Copy link
Copy Markdown
Contributor

+1

@cmsbuild
cmsbuild merged commit 29a27d6 into cms-sw:master Aug 22, 2026
10 checks passed
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.

Open a PR for the added ROOT dictionaries

6 participants