Skip to content

[xRooFit] Make headers work standalone - #23407

Open
hageboeck wants to merge 3 commits into
root-project:masterfrom
hageboeck:xRooFit_headerCheck
Open

hageboeck wants to merge 3 commits into
root-project:masterfrom
hageboeck:xRooFit_headerCheck

Conversation

@hageboeck

@hageboeck hageboeck commented Sep 17, 2026

Copy link
Copy Markdown
Member

Note: Contains commits from #23387. It was simply more convenient to leave them here, because rebasing on master would create a merge conflict once #23387 gets merged. Only the last three need to be reviewed.

Now to what happened in xRooFit:
When checking the installed headers if they work standalone, a circular
header inclusion lead to syntax errors. It's because after a few inclusions, xRooFit.h gets included again in xRooHypoSpace which wants to include xRooFit again.

To solve this:

  • Minimise inclusions in xRooFit.h
  • Move inclusions into all .cxx where necessary.
  • Add required includes to XRooFit.h to make it a "complete" umbrella header.

LLM disclosure: Asked an LLM to propose the required includes. Commits and tests done the classic way.

Up for discussion

When making XRooFit.h a "complete" umbrella header, one could also include xRooBrowser.h. It's not really required, but it would include all headers at once. That's why there is the last commit that performs this inclusion, but we can remove it if it's considered unnecessary.

@hageboeck hageboeck self-assigned this Sep 17, 2026
@hageboeck hageboeck added the clean build Ask CI to do non-incremental build on PR label Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 9h 50m 21s ⏱️
 3 876 tests  3 875 ✅ 0 💤 1 ❌
76 368 runs  76 367 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 0db00f6.

♻️ This comment has been updated with latest results.

When checking the installed headers if they work standalone, a circular
header inclusion lead to syntax errors. To solve this:
- Minimise inclusions in xRooFit.h
- Move them into the .cxx where necessary.
- Add required includes to XRooFit.h
It wasn't there before, but this seems to make it complete.
@hageboeck
hageboeck marked this pull request as ready for review September 18, 2026 14:09
@hageboeck

Copy link
Copy Markdown
Member Author

@will-cern could you have a look?

@will-cern

Copy link
Copy Markdown
Contributor

I'll need to test these changes in the main xRooFit repo @ https://gitlab.cern.ch/will/xroofit, as that is where xRooFit should ultimately be copied from for the version that ships with root.
I'll let you know when this has been checked

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

Labels

clean build Ask CI to do non-incremental build on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants