ddavis
February 14, 2019, 2:18pm
1
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?
Hi,
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>
.
Cheers,
Enrico
ddavis
February 14, 2019, 2:36pm
3
Awesome – exactly what I was looking for. Thanks
1 Like
system
Closed
February 28, 2019, 2:36pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.