to apply filters to an RDataFrame. But annoyingly I can’t seem to find the right thing to #include to gain access to RNode. My best guesses for header names have failed and I can’t find an example with full code.
Help?
ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
Hi @kpachal, ROOT::RNode comes with #include <ROOT/RDataFrame.hxx>…if you have a recent enough ROOT version The tutorial you are linking to is for ROOT “master” (latest, unreleased ROOT). ROOT::RNode is not available e.g. in ROOT v6.14.
Could this be the issue?
If yes, you can download a compiled version of ROOT master from our website and use that one, or source a nightly build of ROOT from lcg, or compile a more recent ROOT yourself.
Ah – that’d be it! I was using 6.14. I’ll try to get a more recent version, but I’m on a shared cluster so I’ll have to use what’s available. In case I’m stuck with 6.14, is there an equivalent way to do this there?
Hi,
note that there is no more recent release of ROOT (for now: v6.16 is coming soon, with all the RNode goodness). But you can get a nightly build of ROOT master branch from the LCG releases on cmvs, if it’s available on your cluster: source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-slc6-gcc7-opt/setup.sh – they are kind of stable, ok to use most of the time.
Otherwise, depending on what you actually need to do with RNode, you can use a template function instead.
With C++14 auto return types it’s pretty straightforward: