Hi Experts, I want to use RDataFrame to remove events in a TTree which do not appear in a JSON file before doing further operations on it. My (intended) strategy is to declare a snippet of C++ code using ROOT.gInterpreter.Declare() to then use in an RDF.Define() which would pass two branches of the tree to the C++ code to give back a yes/no for that event.
I am unsure however how to accomplish this: is there native JSON support in the gInterpreter already, or do I have to build this from scratch? Is there a simple way to do this?
For your first suggestion, I’m not sure I understand: you can declare python code in the gInterpreter? Or do you mean to do the computations outside of RDF and then import the results?