is there an explicit way with which I can see how often an event loop was executed? This would be super useful for me to see for debugging purposes. Maybe there is a way to output a string every time the event loop is executed?
perhaps the simplest would be too do something like this:
ROOT::RDataFrame df(myTreename, myFileName);
auto d = df.Filter([](ULong64_t e){if (0ULL == e) std::cout << "Running evtloop" << std::endl;},{"rdfentry_"});
// now start to work on 'd'. At every loop, at he first event, you'll have a message.
We plan to add a “debug mode” to rdf and we’ll keep this topic in mind during the design: thanks for the post!
Unfortunately, when trying to define a variable next, which works without the above filter, ROOT replies to me that
ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void> ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void>::Define(experimental::basic_string_view<char,char_traits<char> > name, experimental::basic_string_view<char,char_traits<char> > expression) =>
The main RDataFrame is not reachable: did it go out of scope? (C++ exception of type runtime_error)
Now, I did a minimum running example, to test whether this is working well. Please find it attached. Essentially, I think it should be executing the event loop three times, if I understand RDataFrame correctly. So, I expect to see
the Filter which prints to screen the event loop index is attached to the eventLoopCounter node.
You should attach the subsequent Defines to it rather than to dataframe.