Container of RDataFrame Filters

Hi all,

My current strategy for managing a container of DataFrame filters is like so:

ROOT::RDataFrame df(myChain);
using Filter_t = ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter, void>;
using FilterTable_t = std::map<std::string, Filter_t>;
FilterTable_t filters = {{"f1",  df.Filter("x>0")}, {"f2", df.Filter("x<0")}};

The fact that I’m using the ROOT::Detail namespace makes this feel a little dirty. Could there be a more elegant solution to this?

with ROOT v6.16, you can convert every dataframe variable to the special type ROOT::RDF::RNode.
We have an example usage in this tutorial.
In short, you can stuff results of Filter calls in a std::vector<ROOT::RDF::RNode>.


Awesome – exactly what I was looking for. Thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.