Skip to content

[HS3][RF] I/O for RooWrapperPdf and RooExtendPdf#22647

Merged
guitargeek merged 2 commits into
root-project:masterfrom
cburgard:roowrapperextendpdf-jsonio
Jun 19, 2026
Merged

[HS3][RF] I/O for RooWrapperPdf and RooExtendPdf#22647
guitargeek merged 2 commits into
root-project:masterfrom
cburgard:roowrapperextendpdf-jsonio

Conversation

@cburgard

Copy link
Copy Markdown
Contributor

added I/O for roowrapperpdf and changed extendpdf I/O to be compliant with hs3

This Pull request:

adds JSONIO for the two classes mentioned

Changes or fixes:

  • add importer and exporter for RooWrapperPdf
  • rename export of RooExtendPdf to be compliant with HS3 specification

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #

Comment thread roofit/hs3/src/JSONFactories_RooFitCore.cxx Outdated
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 12h 37m 21s ⏱️
 3 869 tests  3 869 ✅ 0 💤 0 ❌
76 423 runs  76 423 ✅ 0 💤 0 ❌

Results for commit 8e45bb6.

♻️ This comment has been updated with latest results.

Added I/O for RooWrapperPdf and changed extendpdf I/O to be compliant
with HS3.
@guitargeek guitargeek force-pushed the roowrapperextendpdf-jsonio branch from 8e45bb6 to 8e50c5f Compare June 19, 2026 18:01
Refactor the HS3 serialization code to remove duplicated logic without
any change in behavior. All hs3, histfactory and JSON tests still pass.

JSONFactories_RooFitCore.cxx:
- Drop RooLegacyExpPolyFactory; it was identical to the existing
  RooPolynomialFactory<RooLegacyExpPoly>, which is now registered directly.
- Drop RooLegacyExpPolyStreamer; it was identical to
  RooPolynomialStreamer<RooLegacyExpPoly>.
- Merge RooHistFuncStreamer/RooHistPdfStreamer into RooHistStreamer<T> and
  RooHistFuncFactory/RooHistPdfFactory into RooHistFactory<T>; each pair
  differed only by the concrete RooFit type.

RooJSONFactoryWSTool.cxx:
- Remove fillSeqSanitizedName, which had no callers anywhere in ROOT.
- Factor the "make a valid name but refuse to change the first character"
  block (exportCategory, exportCombinedData) into makeValidNameOrError().
- Collapse the repeated ofstream/ifstream open-and-error boilerplate in
  exportJSON/exportYML/importJSON/importYML. error() is [[noreturn]], so
  the trailing 'return false' statements were dead code.

JSONFactories_HistFactory.cxx:
- Remove a redundant mid-file block of #includes (<regex> was already
  included; the others were already used earlier in the translation unit).

JSONIO.cxx:
- Deduplicate removeImporters/removeExporters and printImporters/
  printExporters into shared templated helpers.
@guitargeek guitargeek force-pushed the roowrapperextendpdf-jsonio branch from 9f2631c to e91b0d5 Compare June 19, 2026 18:34

@guitargeek guitargeek 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.

LGTM!

@guitargeek guitargeek merged commit b763ff1 into root-project:master Jun 19, 2026
29 of 30 checks passed
@guitargeek guitargeek deleted the roowrapperextendpdf-jsonio branch June 19, 2026 21:00
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.

2 participants