Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
6.14/00, 6.14/02
-
None
-
None
-
lxplus7-like
Description
In ROOT 6.14 there seems to be a regression with ROOT::RDataFrame with respect to ROOT::Experimental::TDataFrame in 6.12 when defining columns of custom types in code that is compiled and linked against ROOT, as opposed to run as a macro.
With 6.12.04 the test given below passes:
$ sh test.sh 6.12.04
|
Building
|
Running
|
Running as macro
|
|
Processing test.cpp+...
|
Info in <TUnixSystem::ACLiC>: creating shared library /tmpdata/olupton/ROOT-problems/180821-RDataFrame/./test_cpp.so
|
While with 6.14.00 it fails:
$ sh test.sh 6.14.00
|
Building
|
Running
|
terminate called after throwing an instance of 'std::runtime_error'
|
what(): Return type of Define expression was not understood. Type was 11DecayAngles
|
test.sh: line 35: 3626 Aborted ./test
|
Running as macro
|
|
Processing test.cpp+...
|
Info in <TUnixSystem::ACLiC>: creating shared library /tmpdata/olupton/ROOT-problems/180821-RDataFrame/./test_cpp.so
|
The source to test.sh is the following, and this is run on an lxplus7-like machine.
. /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/${@}/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh |
MINOR=`echo ${@} | cut -d . -f 2` |
if (( ${MINOR} < 14 )) |
then
|
HEADER="ROOT/TDataFrame.hxx" |
TYPE="ROOT::Experimental::TDataFrame" |
else
|
HEADER="ROOT/RDataFrame.hxx" |
TYPE="ROOT::RDataFrame" |
fi
|
|
cat > test.cpp <<Endofmessage |
#include <${HEADER}>
|
|
struct DecayAngles {
|
Double_t phi{0.0};
|
};
|
|
int main()
|
{
|
${TYPE} d( 10 );
|
d.Define( "foo", [](){ return DecayAngles(); } ); |
return 0; |
}
|
|
void test() |
{
|
main();
|
}
|
Endofmessage
|
|
echo "Building" |
`root-config --cxx` -o test test.cpp `root-config --cflags --libs` |
echo "Running" |
./test |
echo "Running as macro" |
root -b -q -l test.cpp+ |