Skip to content

[v640][RF] RooFit backports#22673

Merged
guitargeek merged 5 commits into
root-project:v6-40-00-patchesfrom
guitargeek:bp_1
Jun 20, 2026
Merged

[v640][RF] RooFit backports#22673
guitargeek merged 5 commits into
root-project:v6-40-00-patchesfrom
guitargeek:bp_1

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

RooFit backports to 6.40 requested by the experiments ATLAS and CMS.

will-cern and others added 5 commits June 20, 2026 11:46
Update xRooFit again, to accommodate more features/improvements made in past week while working on the Higgs discovery workspaces.

(cherry picked from commit d536fdf)
Fix various memory leaks from cases where functions that return an owned
return value were used without deleting the return value.

This is addressed by using `std::unique_ptr`.

(cherry picked from commit 2b876bb)
The `static_range_cast` and `dynamic_range_cast` are RooFit helper
functions to iterate over polymorphic collections like `RooArgSet` and
`RooArgList`. Using them instead of casting in a separate line makes the
code more concise with fewer lines and throw-away temoprary variables.

(cherry picked from commit 4f2cf43)
Added I/O for RooWrapperPdf and changed extendpdf I/O to be compliant
with HS3.

(cherry picked from commit d75a72f)
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.

(cherry picked from commit b763ff1)
@guitargeek guitargeek self-assigned this Jun 20, 2026
@guitargeek guitargeek requested a review from bellenot as a code owner June 20, 2026 09:48
@github-actions

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 13h 31m 30s ⏱️
 3 861 tests  3 860 ✅ 0 💤 1 ❌
77 149 runs  77 148 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit d8bbec3.

@guitargeek guitargeek merged commit 1fdc0eb into root-project:v6-40-00-patches Jun 20, 2026
34 of 37 checks passed
@guitargeek guitargeek deleted the bp_1 branch June 20, 2026 14:07
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.

3 participants