Skip to content

[6.40] [HS3] Deduplicate HistFactory modifiers during HS3 export#22836

Merged
guitargeek merged 8 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22824
Jul 16, 2026
Merged

[6.40] [HS3] Deduplicate HistFactory modifiers during HS3 export#22836
guitargeek merged 8 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22824

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #22824, requested by @guitargeek. For your information @Phmonski

guitargeek and others added 8 commits July 16, 2026 16:38
(cherry picked from commit 591a611)
Also fixes RooJSONFactoryWSTool::warning() to log at WARNING level
instead of ERROR, and a self-comparison bug in the test validate()
helper.

(cherry picked from commit 168a442)
Extract the RooPoisson/RooGaussian constraint dispatch that was duplicated
in the Barlow-Beeston (mc-stat) and shapesys branches of readChannel into a
single constraintRelError() helper.

(cherry picked from commit f87a55e)
Replace the hand-rolled character-by-character number parser with a
std::istringstream extraction that requires the whole string to be
consumed. This mirrors the parsing done by toDouble(), so isNumber(s) is
true exactly when toDouble(s) can convert the entire string.

std::from_chars for floating-point types is not portably available on all
platforms ROOT supports, so the stream extraction is used instead.

(cherry picked from commit 2e8863d)
- Drop the pointless static_cast<RooSimultaneous*> around workspace.pdf()
  in importAnalysis: the result is stored as RooAbsPdf* anyway, and the
  cast is undefined behaviour when the pdf is not a RooSimultaneous.
- Use dynamic_cast with a null check instead of an unchecked cast + deref
  in importDecay (resolutionModel) and importBinWidthFunction (histogram),
  so malformed input raises a clear error instead of crashing.

(cherry picked from commit 2eea2de)
- Remove the file-global 'verbose' flag in JSONFactories_HistFactory that
  was never set to true, along with its two dead diagnostic blocks.
- Remove the unused <mutex> include in JSONIO.cxx.
- Remove an unused local and two commented-out lines.

(cherry picked from commit fa718af)
Replace the verbose Doxygen blocks on the file-local (anonymous-namespace)
helpers and the private member functions of RooJSONFactoryWSTool with
concise one-line comments. Full Doxygen is kept only for the user-facing
public API declared in RooJSONFactoryWSTool.h.

Also move the exportCategory() doc block, which had become detached from
its function, back onto it.

(cherry picked from commit afe0d33)
@guitargeek
guitargeek merged commit 6a58430 into root-project:v6-40-00-patches Jul 16, 2026
38 of 39 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.

4 participants