Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/fedora44.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ builtin_zlib=ON
builtin_zstd=ON
experimental_adaptivecpp=ON
pythia8=ON
test_distrdf_dask=OFF
test_distrdf_pyspark=OFF
vdt=OFF
2 changes: 0 additions & 2 deletions .github/workflows/root-ci-config/buildconfig/mac-beta.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ check_connection=ON
cocoa=ON
minuit2_omp=OFF
r=OFF
test_distrdf_dask=ON
test_distrdf_pyspark=ON
x11=OFF
2 changes: 0 additions & 2 deletions .github/workflows/root-ci-config/buildconfig/mac15.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@ builtin_zstd=ON
cocoa=ON
minuit2_omp=OFF
r=OFF
test_distrdf_dask=ON
test_distrdf_pyspark=ON
tmva-sofie=ON
x11=OFF
2 changes: 0 additions & 2 deletions .github/workflows/root-ci-config/buildconfig/mac26.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ check_connection=ON
cocoa=ON
minuit2_omp=OFF
r=OFF
test_distrdf_dask=ON
test_distrdf_pyspark=ON
x11=OFF
8 changes: 8 additions & 0 deletions README/ReleaseNotes/v640/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ This change affects the following classes: `TFile`, `TMapFile`, `TMemFile`, `TD

### RNTuple

* `RRawPtrWriteEntry` is now part of the stable API, in the `ROOT::Detail` namespace. It is useful for frameworks passing data to RNTuple as `const` raw pointers.

## Math

### Migration from VecCore/Vc to `std::experimental::simd` for Vectorization
Expand Down Expand Up @@ -126,6 +128,12 @@ As part of this migration, the following build options are deprecated. From ROOT

ROOT dropped support for Python 3.9, meaning ROOT now requires at least Python 3.10.

## ROOT executable

- Removed stray linebreak when running `root -q` with input files or commands passed with `-e`.
This ensures that there is no superfluous output when running `root`.
Note that ROOT 6.38 already removed a spurious newline when starting `root` **without** input files or commands.

## Command-line utilities

## JavaScript ROOT
Expand Down
2 changes: 1 addition & 1 deletion bindings/distrdf/python/DistRDF/Backends/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def register_initialization(cls, fun, *args, **kwargs):

**kwargs (dict): Keyword arguments used to execute the function.
"""
cls.initialization = partial(fun, *args, **kwargs)
cls.initialization = staticmethod(partial(fun, *args, **kwargs))
fun(*args, **kwargs)

@classmethod
Expand Down
6 changes: 3 additions & 3 deletions bindings/pyroot/pythonizations/test/sofie_gnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ def test_c_lhcb_toy_inference(self):
output_edge_data = output_gn[i].edges.numpy()
output_global_data = output_gn[i].globals.numpy().flatten()

assert_almost_equal(output_node_data, np.asarray(output_ops[i].node_data), 5)
assert_almost_equal(output_node_data, np.asarray(output_ops[i].node_data), 4)

assert_almost_equal(output_edge_data, np.asarray(output_ops[i].edge_data), 5)
assert_almost_equal(output_edge_data, np.asarray(output_ops[i].edge_data), 4)

assert_almost_equal(output_global_data, np.asarray(output_ops[i].global_data), 5)
assert_almost_equal(output_global_data, np.asarray(output_ops[i].global_data), 4)

@classmethod
def tearDownClass(self):
Expand Down
21 changes: 20 additions & 1 deletion core/base/src/TROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3159,7 +3159,26 @@ const TString &TROOT::GetSharedLibDir()

fs::path p = info->dlpi_name;
if (p.filename() == _R_QUOTEVAL_(LIB_CORE_NAME)) {
libdir = p.parent_path().c_str();
std::error_code ec;

// Resolve symlinks: critical for environments like CMSSW, where the
// ROOT libraries are loaded via symlinks that point to the actual
// install directory
fs::path resolved = fs::canonical(p, ec);
if (ec) {
::Error("TROOT",
"Failed to canonicalize detected ROOT shared library path:\n"
"%s\n"
"Error code: %d (%s)\n"
"Error category: %s\n"
"This is an unexpected internal error and ROOT might not work.\n"
"Please report this issue on GitHub: https://github.com/root-project/root/issues",
p.string().c_str(), ec.value(), ec.message().c_str(), ec.category().name());
// Fall back to the loader path if canonicalization fails. The path
// will likely be wrong, but at least not garbage
resolved = p;
}
libdir = resolved.parent_path().c_str();
return 1; // stop iteration
}
return 0; // continue
Expand Down
5 changes: 4 additions & 1 deletion core/rint/src/TRint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,10 @@ void TRint::Run(Bool_t retrn)
}
TObjString *file = (TObjString *)fileObj;
char cmd[kMAXPATHLEN+50];
if (!fNcmd)
// First print a newline before going over the inputs to separate
// printouts from the initial "root [0]" prompt. If root is run
// with "-q", there is no prompt and we don't need the newline.
if (!fNcmd && !QuitOpt())
printf("\n");
Bool_t rootfile = kFALSE;

Expand Down
62 changes: 37 additions & 25 deletions hist/hist/src/TH3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "TMath.h"
#include "TObjString.h"

#include <algorithm>
#include <atomic>
#include <stdexcept>

Expand Down Expand Up @@ -1471,16 +1472,15 @@ Double_t TH3::Interpolate(Double_t, Double_t) const
return 0;
}


////////////////////////////////////////////////////////////////////////////////
/// Given a point P(x,y,z), Interpolate approximates the value via trilinear interpolation
/// based on the 8 nearest bin center points (corner of the cube surrounding the points)
/// The Algorithm is described in http://en.wikipedia.org/wiki/Trilinear_interpolation
/// The given values (x,y,z) must be between first bin center and last bin center for each coordinate:
/// based on the 8 nearest bin center points (corner of the cube surrounding the points).
/// The Algorithm is described in http://en.wikipedia.org/wiki/Trilinear_interpolation.
///
/// fXAxis.GetBinCenter(1) < x < fXaxis.GetBinCenter(nbinX) AND
/// fYAxis.GetBinCenter(1) < y < fYaxis.GetBinCenter(nbinY) AND
/// fZAxis.GetBinCenter(1) < z < fZaxis.GetBinCenter(nbinZ)
/// The coordinate (x,y,z) must be in the histogram range. If a coordinate falls into the first
/// or last bin of an axis, the histogram is assumed to be constant at the edges. The interpolation
/// proceeds as if the bin "left of" the first bin in x had the same bin content as the first bin x,
/// and similar for the other axes.

Double_t TH3::Interpolate(Double_t x, Double_t y, Double_t z) const
{
Expand All @@ -1496,29 +1496,41 @@ Double_t TH3::Interpolate(Double_t x, Double_t y, Double_t z) const
if ( z < fZaxis.GetBinCenter(ubz) ) ubz -= 1;
Int_t obz = ubz + 1;

auto GetBinCenterExtrapolate = [](TAxis const &axis, Int_t index) {
// Get bin centres if inside the histogram, or return the centre of an imaginary
// bin that's just outside the histogram, and which is as wide as the last valid bin.
// We need to make up a number here to not confuse the linear interpolation code below.
if (index == 0) {
return axis.GetBinCenter(1) - axis.GetBinWidth(1);
} else if (index == axis.GetNbins() + 1) {
return axis.GetBinCenter(axis.GetNbins()) + axis.GetBinWidth(axis.GetNbins());
} else {
return axis.GetBinCenter(index);
}
};

// if ( IsBinUnderflow(GetBin(ubx, uby, ubz)) ||
// IsBinOverflow (GetBin(obx, oby, obz)) ) {
if (ubx <=0 || uby <=0 || ubz <= 0 ||
obx > fXaxis.GetNbins() || oby > fYaxis.GetNbins() || obz > fZaxis.GetNbins() ) {
Error("Interpolate","Cannot interpolate outside histogram domain.");
return 0;
}

Double_t xw = fXaxis.GetBinCenter(obx) - fXaxis.GetBinCenter(ubx);
Double_t yw = fYaxis.GetBinCenter(oby) - fYaxis.GetBinCenter(uby);
Double_t zw = fZaxis.GetBinCenter(obz) - fZaxis.GetBinCenter(ubz);
Double_t xw = GetBinCenterExtrapolate(fXaxis, obx) - GetBinCenterExtrapolate(fXaxis, ubx);
Double_t yw = GetBinCenterExtrapolate(fYaxis, oby) - GetBinCenterExtrapolate(fYaxis, uby);
Double_t zw = GetBinCenterExtrapolate(fZaxis, obz) - GetBinCenterExtrapolate(fZaxis, ubz);

Double_t xd = (x - fXaxis.GetBinCenter(ubx)) / xw;
Double_t yd = (y - fYaxis.GetBinCenter(uby)) / yw;
Double_t zd = (z - fZaxis.GetBinCenter(ubz)) / zw;
Double_t xd = (x - GetBinCenterExtrapolate(fXaxis, ubx)) / xw;
Double_t yd = (y - GetBinCenterExtrapolate(fYaxis, uby)) / yw;
Double_t zd = (z - GetBinCenterExtrapolate(fZaxis, ubz)) / zw;

auto GetBinContentNoOverflow = [this](int ix, int iy, int iz) {
// When a bin is outside the histogram range, return the last value inside
// the range. That is, make the histogram constant at its edges.
ix = std::clamp(ix, 1, GetNbinsX());
iy = std::clamp(iy, 1, GetNbinsY());
iz = std::clamp(iz, 1, GetNbinsZ());

Double_t v[] = { GetBinContent( ubx, uby, ubz ), GetBinContent( ubx, uby, obz ),
GetBinContent( ubx, oby, ubz ), GetBinContent( ubx, oby, obz ),
GetBinContent( obx, uby, ubz ), GetBinContent( obx, uby, obz ),
GetBinContent( obx, oby, ubz ), GetBinContent( obx, oby, obz ) };
return GetBinContent(ix, iy, iz);
};

Double_t v[] = {GetBinContentNoOverflow(ubx, uby, ubz), GetBinContentNoOverflow(ubx, uby, obz),
GetBinContentNoOverflow(ubx, oby, ubz), GetBinContentNoOverflow(ubx, oby, obz),
GetBinContentNoOverflow(obx, uby, ubz), GetBinContentNoOverflow(obx, uby, obz),
GetBinContentNoOverflow(obx, oby, ubz), GetBinContentNoOverflow(obx, oby, obz)};

Double_t i1 = v[0] * (1 - zd) + v[1] * zd;
Double_t i2 = v[2] * (1 - zd) + v[3] * zd;
Expand Down
22 changes: 22 additions & 0 deletions hist/hist/test/test_TH3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,25 @@ TEST(TH3D, FillAtomicNoSumW2)
}

#endif

// ROOT-10678
TEST(TH3D, InterpolateCloseToEdge)
{
TH3F hist("3D", "boring histo", 20, 0, 20, 20, 0, 20, 20, 0, 20);

for (int i = 0; i < hist.GetNbinsX(); i++)
for (int j = 0; j < hist.GetNbinsY(); j++)
for (int k = 0; k < hist.GetNbinsZ(); k++)
hist.SetBinContent(i + 1, j + 1, k + 1, i + 100. * j + 10000. * k);

EXPECT_DOUBLE_EQ(hist.Interpolate(hist.GetXaxis()->GetBinCenter(2), hist.GetYaxis()->GetBinCenter(3),
hist.GetZaxis()->GetBinCenter(4)),
1. + 100. * 2. + 10000. * 3);
EXPECT_DOUBLE_EQ(hist.Interpolate(hist.GetXaxis()->GetBinCenter(2) + 0.5, hist.GetYaxis()->GetBinCenter(3) + 0.4,
hist.GetZaxis()->GetBinCenter(4) + 0.3),
1. + 0.5 + 100. * 2.4 + 10000. * 3.3);

EXPECT_DOUBLE_EQ(hist.Interpolate(0., 0., 5.), 10000. * 4.5);
EXPECT_DOUBLE_EQ(hist.Interpolate(0.3, 19.9, 5.), 100. * 19 + 10000. * 4.5);
EXPECT_DOUBLE_EQ(hist.Interpolate(0.8, 19.9, 5.), 0.3 + 100. * 19 + 10000. * 4.5);
}
1 change: 0 additions & 1 deletion roottest/cling/array/array1test.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runarray1test.C...
a1 is
a2 is
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/bytecode/arrayhist.ref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing runarrayhist.C...
1 change: 0 additions & 1 deletion roottest/cling/bytecode/complex.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runcomplex.C...
x = -1
x = -1
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/bytecode/henry.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runhenry.C...
initial chi2/Ndf: 528.202
Chi2/Ndf 528.202
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/const/good1.output
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runConst.C...
with const MyClass4*
with MyClass4*
1 change: 0 additions & 1 deletion roottest/cling/const/good2.output
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runConst.C+...
with const MyClass4*
with MyClass4*
1 change: 0 additions & 1 deletion roottest/cling/controls/Loopbreak.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runLoopbreak.C...
in loop, i=1
after loop, i=1
1 change: 0 additions & 1 deletion roottest/cling/dict/ROOT-8096/load.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

Processing /Users/pcanal/root_working/roottest/cling/dict/ROOT-8096/load.C...
(int) 0
1 change: 0 additions & 1 deletion roottest/cling/dict/ROOT-8739/NextTest.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

Processing /Users/pcanal/root_working/roottest/cling/dict/ROOT-8739/execNextTest.C...
(int) 0
1 change: 0 additions & 1 deletion roottest/cling/dict/algebra.ref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing runalgebra.C+...
1 change: 0 additions & 1 deletion roottest/cling/dict/defaultargs_compiled.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing rundefaultargs.C+...
-1
1.01
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/dict/defaultargs_interpreted.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing rundefaultargs.C...
-1
1.01
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/dict/exectemplatetemplateTest.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

Processing exectemplatetemplateTest.cxx+...
(int) 0
1 change: 0 additions & 1 deletion roottest/cling/dict/operators.ref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing runoperators.C...
1 change: 0 additions & 1 deletion roottest/cling/dict/templateAutodict.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runtemplateAutodict.C...
5
0
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/defaultParams.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing rundefaultParams.C...
Interpeted code:
interpreted: Base::FunctionX(int b=0, int c=5)
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/execrefDefaultParams.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing execrefDefaultParams.C...
Direct loading
creating a yy with def-xx
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/longArgTest.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing /home/axel/build/root/master/src/roottest/cling/function/runlongArgTest.C...
name
1023
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/overloadResolution.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runoverloadResolution.C...
11654121
11654121
1 change: 0 additions & 1 deletion roottest/cling/function/privateConstructor.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runprivateConstructor.C...
Error: can not call private or protected function runprivateConstructor.C:15:
runprivateConstructor.C 11 bottom bottom::bottom();
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/staticfunc.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runstaticfunc.C...
test
Error: cannot call member function without object staticfunc.C:--:
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/staticfunc.ref-cling
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runstaticfunc.C...
staticfunc.C:--:9: error: call to non-static member function without an object argument
Top::Run();
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/function/trybody.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

f()
caught integer!
1 change: 0 additions & 1 deletion roottest/cling/functionTemplate/cintrun.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing cintrun.C...
get() const
get<double>() const
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/functionTemplate/cintrun.ref-cling
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing cintrun.C...
getfloat() const
operator=(const t&)
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/functionTemplate/referenceUse.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

Processing runreferenceUse.C...
Hello from GetScalar(Test)
1 change: 0 additions & 1 deletion roottest/cling/functionTemplate/reflexrun.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing reflexrun.C...
IsA()
ShowMembers(TMemberInspector&)
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/offset/vbase-c.out.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing /Users/mato/Development/ROOT/root.git/roottest/cling/offset/runvbase.C+...
derived Basement -> base Top: Compiler and interpreter say the same value.
derived Basement -> base Top: Compiler and interpreter say the same value.
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/offset/vbase-i.out.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing /Users/mato/Development/ROOT/root.git/roottest/cling/offset/runvbase.C...
derived Basement -> base Top: Compiler and interpreter say the same value.
derived Basement -> base Top: Compiler and interpreter say the same value.
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/operator/EqualTest.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runEqualTest.C...
===========================================================================
class privateOp2
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/operator/EqualTest.ref-cling
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runEqualTest.C...
===========================================================================
class privateOp2
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/operator/t01.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

Processing t01.C...
(int)0
1 change: 0 additions & 1 deletion roottest/cling/other/checkMissingSymbolExitCode.oref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing checkMissingSymbolExitCode.C...
1 change: 0 additions & 1 deletion roottest/cling/other/execValuePrint.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing execValuePrint.C...
(TObject &) Name: TObject Title: Basic ROOT object
(TNamed &) Name: a Title: b
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/other/fileClose.ref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing runfileClose.C...
1 change: 0 additions & 1 deletion roottest/cling/other/missingXFunc.ref
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Processing runmissingXFunc.C(12)...
input_line_:2:2: error: no matching function for call to 'runmissingXFunc'
runmissingXFunc(12) /* invoking function corresponding to '.x' */
Expand Down
1 change: 0 additions & 1 deletion roottest/cling/other/savannah54662.ref
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

Processing runsavannah54662.C...
Loading