From 2bd572334d07dcbc77b40b3cda43277b6c043fe0 Mon Sep 17 00:00:00 2001 From: will-cern Date: Tue, 20 Feb 2024 05:23:49 +0000 Subject: [PATCH 1/3] [RF] Set workspace on imported RooFit objects Imported RooAbsArgs should have their workspace set to the workspace they are being imported to. --- roofit/roofitcore/src/RooWorkspace.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/roofit/roofitcore/src/RooWorkspace.cxx b/roofit/roofitcore/src/RooWorkspace.cxx index 24943323cb33e..ecc1a65313fd9 100644 --- a/roofit/roofitcore/src/RooWorkspace.cxx +++ b/roofit/roofitcore/src/RooWorkspace.cxx @@ -686,6 +686,7 @@ bool RooWorkspace::import(const RooAbsArg& inArg, << node->GetName() << endl ; } _allOwnedNodes.addOwned(std::unique_ptr{node}); + node->setWorkspace(*this); if (_openTrans) { _sandboxNodes.add(*node) ; } else { From 9ff4e1062202a6103e7e648e48a7c898f219136b Mon Sep 17 00:00:00 2001 From: will-cern Date: Tue, 20 Feb 2024 05:24:41 +0000 Subject: [PATCH 2/3] [RF] Fix for display of canvases in jupyter notebooks with xroofit Fixes issues with display of plots drawn by xRooFit in jupyter notebooks. --- roofit/xroofit/src/xRooNode.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roofit/xroofit/src/xRooNode.cxx b/roofit/xroofit/src/xRooNode.cxx index 03d1d4217addf..cc1a5063b55f4 100644 --- a/roofit/xroofit/src/xRooNode.cxx +++ b/roofit/xroofit/src/xRooNode.cxx @@ -8079,6 +8079,9 @@ class PadRefresher { getLegend(false, true); fPad->GetCanvas()->Paint(); fPad->GetCanvas()->Update(); +#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 30, 00) + fPad->GetCanvas()->ResetUpdated(); // stops previous canvas being replaced in a jupyter notebook +#endif fPad->cd(); } nExisting--; @@ -8122,9 +8125,8 @@ void xRooNode::Draw(Option_t *opt) if (gPad) gPad->Clear(); xRooNLLVar::xRooHypoPoint(std::dynamic_pointer_cast(fComp)).Draw(opt); - if (gPad) { - gPad->GetCanvas()->Paint(); - gPad->GetCanvas()->Update(); + { + PadRefresher p(gPad); // refreshes the pad } gSystem->ProcessEvents(); return; From ec4de4c0cc778886d2c321c1d8a4c10a0191bda7 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Sat, 24 Feb 2024 20:10:00 +0100 Subject: [PATCH 3/3] [cmake] Make Minuit2 build option deprecation warning less alarming To avoid worry reports in the forum worrying about whether Minuit2 is gonna be removed. See https://root-forum.cern.ch/t/will-minuit2-be-removed-from-root/58078 Also includes changes from commit d4acc521ca. --- cmake/modules/RootBuildOptions.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index f267a42ed9ce0..f7a3dfdbc3387 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -420,12 +420,18 @@ foreach(opt afdsmgrd afs alien bonjour castor chirp cxx11 cxx14 cxx17 geocad gfa endforeach() #---Deprecated options------------------------------------------------------------------------ -foreach(opt cxxmodules exceptions oracle pythia6 pythia6_nolink pyroot-python2 minuit2) +foreach(opt cxxmodules exceptions oracle pythia6 pythia6_nolink pyroot-python2) if(${opt}) message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.") endif() endforeach() +foreach(opt minuit2) + if(NOT ${opt}) + message(DEPRECATION ">>> Option '${opt}' is deprecated: in the future it will always be set to ON. In the next release of ROOT, you will no longer be able to disable this feature. Please contact root-dev@cern.ch should you still need disabling it.") + endif() +endforeach() + foreach(opt minuit2_omp minuit2_mpi) if(${opt}) message(WARNING "The option '${opt}' can only be used to minimise thread-safe functions in Minuit2. It cannot be used for Histogram/Graph fitting and for RooFit. If you want to use Minuit2 with OpenMP or MPI support, it is better to build Minuit2 as a standalone library.")