Details
Description
Typos in commands relating to an RDataFrame lead to an exception that causes root to exit. This does not happen in the simplest case:
root [0] auto df = ROOT::RDataFrame(10) |
(ROOT::RDataFrame &) An empty data frame that will create 10 entries |
root [1] auto h = df.Hist1D("..") |
ROOT_prompt_1:1:13: error: no member named 'Hist1D' in 'ROOT::RDataFrame' |
auto h = df.Hist1D("..") |
~~ ^
|
root [2] |
But it does happen when reading a TTree:
------------------------------------------------------------------
|
| Welcome to ROOT 6.23/01 https://root.cern | |
| (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers | |
| Built for macosx64 on Jul 30 2020, 16:15:57 | |
| From heads/master@v6-23-01-782-geaa388adba1 | |
| With Apple clang version 11.0.3 (clang-1103.0.32.62) | |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' | |
------------------------------------------------------------------
|
|
|
root [0] auto tree = new TTree("T","An example of ROOT tree with a few branches"); |
root [1] double x; |
root [2] tree->Branch("x",&x); |
root [3] for(int i=0; i<100; ++i){ x = gRandom->Rndm(); tree->Fill(); } |
root [4] using namespace ROOT; |
root [5] auto df = RDataFrame( *tree); |
root [6] auto h1 = df.Histo1D("x"); // OK, "x" exists. |
root [7] auto h2 = df.Histo1D("y") |
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Unknown column: y
|
The same does not cause an exit on Linux.
See also: https://root-forum.cern.ch/t/rdataframe-from-root-command-line-exceptions-causing-root-exit/40724/2
Attachments
Issue Links
- duplicates
-
ROOT-10703 TCling fails to catch compiled exception on Mac OS
-
- Closed
-