From c33e7fae2570e893063f6999cc91530d9bcb81a4 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 17 Sep 2026 15:59:41 +0200 Subject: [PATCH 1/3] [xRooFit] Solve a circular header dependency. 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 --- roofit/xroofit/inc/RooFit/xRooFit/xRooFit.h | 4 ---- roofit/xroofit/inc/XRooFit.h | 3 +++ roofit/xroofit/src/xRooFit.cxx | 2 ++ roofit/xroofit/src/xRooHypoSpace.cxx | 1 + roofit/xroofit/src/xRooNLLVar.cxx | 2 ++ roofit/xroofit/src/xRooNode.cxx | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roofit/xroofit/inc/RooFit/xRooFit/xRooFit.h b/roofit/xroofit/inc/RooFit/xRooFit/xRooFit.h index 678b8d1dc0b16..24ebbb1ebb883 100644 --- a/roofit/xroofit/inc/RooFit/xRooFit/xRooFit.h +++ b/roofit/xroofit/inc/RooFit/xRooFit/xRooFit.h @@ -235,8 +235,4 @@ class xRooFit { END_XROOFIT_NAMESPACE -#include "xRooHypoSpace.h" -#include "xRooNLLVar.h" -#include "xRooNode.h" - #endif // include guard diff --git a/roofit/xroofit/inc/XRooFit.h b/roofit/xroofit/inc/XRooFit.h index 2aa4d9825672f..4debe78e1dadc 100644 --- a/roofit/xroofit/inc/XRooFit.h +++ b/roofit/xroofit/inc/XRooFit.h @@ -23,5 +23,8 @@ A version of the API is included in ROOT as an experimental feature, inside the #define RooFit_XRooFit_h #include "RooFit/xRooFit/xRooFit.h" +#include "RooFit/xRooFit/xRooNLLVar.h" +#include "RooFit/xRooFit/xRooHypoSpace.h" +#include "RooFit/xRooFit/xRooNode.h" #endif diff --git a/roofit/xroofit/src/xRooFit.cxx b/roofit/xroofit/src/xRooFit.cxx index 6a526d549b289..3f1228cc8421f 100644 --- a/roofit/xroofit/src/xRooFit.cxx +++ b/roofit/xroofit/src/xRooFit.cxx @@ -26,6 +26,8 @@ #endif #include "xRooFit/xRooFit.h" +#include "xRooFit/xRooNLLVar.h" +#include "xRooFit/xRooNode.h" #include "RooDataSet.h" #include "RooSimultaneous.h" diff --git a/roofit/xroofit/src/xRooHypoSpace.cxx b/roofit/xroofit/src/xRooHypoSpace.cxx index aae34bbd95f73..db16856bf158c 100644 --- a/roofit/xroofit/src/xRooHypoSpace.cxx +++ b/roofit/xroofit/src/xRooHypoSpace.cxx @@ -11,6 +11,7 @@ */ #include "xRooFit/xRooHypoSpace.h" +#include "xRooFit/xRooNode.h" #include "RooArgSet.h" #include "RooArgList.h" diff --git a/roofit/xroofit/src/xRooNLLVar.cxx b/roofit/xroofit/src/xRooNLLVar.cxx index 7066b2c0df865..318510b9f151a 100644 --- a/roofit/xroofit/src/xRooNLLVar.cxx +++ b/roofit/xroofit/src/xRooNLLVar.cxx @@ -34,6 +34,8 @@ This xRooNLLVar object has several special methods, e.g. for fitting and toy dat #endif #include "xRooFit/xRooFit.h" +#include "xRooFit/xRooNLLVar.h" +#include "xRooFit/xRooNode.h" #include "RooCmdArg.h" #include "RooAbsPdf.h" diff --git a/roofit/xroofit/src/xRooNode.cxx b/roofit/xroofit/src/xRooNode.cxx index 1e8a56f25fa8f..1daa6be9b80d3 100644 --- a/roofit/xroofit/src/xRooNode.cxx +++ b/roofit/xroofit/src/xRooNode.cxx @@ -139,6 +139,8 @@ auto GETLISTTREE(TGFileBrowser *b) #include "xRooFit/xRooNode.h" #include "xRooFit/xRooFit.h" +#include "xRooFit/xRooNLLVar.h" +#include "xRooFit/xRooHypoSpace.h" #include "TH1.h" #include "TBrowser.h" From 9cf5dfdc05c94f1be42efd710269f47272e1765d Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 17 Sep 2026 16:01:34 +0200 Subject: [PATCH 2/3] [CI] Enable xRooFit in installed header check. --- test/PostInstall/check-headers.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test/PostInstall/check-headers.sh b/test/PostInstall/check-headers.sh index a4999f0196483..4df5e2421ab71 100644 --- a/test/PostInstall/check-headers.sh +++ b/test/PostInstall/check-headers.sh @@ -30,7 +30,6 @@ fi # Check all installed headers for include errors. Some headers cannot be used standalone: suppressions="RField[A-Z]\|RtypesImp.h\|TAtomicCount[A-Z]\|CladDerivator.h\|TBranchProxyTemplate" # Not to be used standalone suppressions+="\|TWin32" # Why are these installed in Linux? -suppressions+="\|xRooHypoSpace.h\|xRooFit" # Uses macros to declare namespaces suppressions+="\|RIoUring.hxx" # Might not be installed suppressions+="\|TCudnn.h" # Might not be installed suppressions+="\|CPyCppyy/DispatchPtr.h\|CPyCppyy/API.h" # Would need to include Python.h From 0db00f6ccec97c150411eabefd69fb4e2878ecea Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 17 Sep 2026 16:01:53 +0200 Subject: [PATCH 3/3] [xRooFit] Add xRooBrowser to the XRooFit umbrella header. It wasn't there before, but this seems to make it complete. --- roofit/xroofit/inc/XRooFit.h | 1 + 1 file changed, 1 insertion(+) diff --git a/roofit/xroofit/inc/XRooFit.h b/roofit/xroofit/inc/XRooFit.h index 4debe78e1dadc..01f5130b5cf16 100644 --- a/roofit/xroofit/inc/XRooFit.h +++ b/roofit/xroofit/inc/XRooFit.h @@ -26,5 +26,6 @@ A version of the API is included in ROOT as an experimental feature, inside the #include "RooFit/xRooFit/xRooNLLVar.h" #include "RooFit/xRooFit/xRooHypoSpace.h" #include "RooFit/xRooFit/xRooNode.h" +#include "RooFit/xRooFit/xRooBrowser.h" #endif