I am trying to save to the .txt file values of basic variables, such as event and run number for cases, when the transverse mass is bigger than 90. How can one do that?
I was thinking about a filter, but I do not know what do I do after. F.g.
auto interesting_evts = df.Filter( [] (const float& mt, const UInt_t& run, const ULong64_t& event){
if ( mt > 90 ) {
DO SOMETHING TO SAVE EVENT AND RUN NUMBERS (but how?)
}
}, {"mt", "run", "event"});
I am not sure if " auto " is a right approach here, because it has to be called somewhere so that it gets “activated” and I do not call it anywhere…
What I want to have as an outcome is a txt file like:
and I get a compilation error : " static assertion failed: filter expression returns a type that is not convertable to bool static_assert(std::is_convertible<FilterRet_t, bool>::value,
It still gives me a compilation error no match for " operator<<" (operand types are "std::ostream" {aka "std::basic_ostream<char>"} and "ROOT::RDF::RResultPtr<long long unsigned int>")
and note no known conversion for argument 2 from "ROOT::RDF::RResultPtr<long long unsigned int>" to "int"
It worked and the output is that " 20 entries passed all filters ".
It gave me some hope, how can I get the " event " and " run " information for those entries?