I have recently changed my ROOT version from 6.12.6 to 6.14 and I noticed that the results of RDataframe.Filter(…) cannot be stored in a std::vector anymore, which was possible which the former TDataFrame.
I vary the number of cuts based on different analyses, but I also need to be able to address each filter. This rules out chaining of filters, because it would require to change the code and recompile or to hard code each filter set. Now I am wondering, if there is an equivalent way to store or address each filter separately.
Hi Thomas,
just wanted to add that yes, there were breaking changes between v6.12 and v6.14 as RDataFrame left the ROOT::Experimental namespace – it was a one-time thing and it shouldn’t happen again
For string filters, i.e. Filter("x > 0"), you can store them in a std::vector<ROOT::RDF::Interface<ROOT::Detail::RDF::RJittedFilter>>.
Lambda filters, i.e. Filter([] (int x) { return x > 0; }, {"x"}) are trickier.
Soon™ you will just be able to cast every dataframe node to the same simple type RNode, see this PR which was spurred by an use-case similar to yours.
thanks for your fast replies :). I am looking forward to the mentioned RNode. Is there an approximate eta when this abstraction could go live? Is more like month or weeks?.
For reference the following code was possible with TDataFrame:
Hi Thomas,
I see, thank you. This is a bug report then: we (or, given the commit’s author, I) inadvertently removed a useful feature that you (and possibly others) were using.
As for the RNode PR, it should be merged in master hopefully in O(days/few weeks).
I also opened ROOT-9506 to make sure that we solve the problem in v6.14 as well, in one way or another. You can follow the issue there.