Using RNode in RDataFrame

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:

// c++14
template <typename RDF_t>
auto AddFilter(RDF_t node, string_view filterStr)
 {
    return node.Filter(filterStr);
 }

This becomes more awkward in C++11, where we have to specify the return type somehow (trailing return types to the rescue):

// c++11
template <typename RDF_t>
auto AddFilter(RDF_t node, string_view filterStr) -> decltype(node.Filter(filterStr))
 {
    return node.Filter(filterStr);
 }

Feel free to ask if you encounter any further problems.
Cheers,
Enrico