Please read tips for efficient and successful posting and posting code
ROOT Version: 6.20
Platform: Mac OS
Compiler: Clang
Dear ROOT developers,
I am currently analyzing some TTrees employing RDataFrame. Their structure is as follows:
| particle | info_1 | info_2 | … | event |
|---|---|---|---|---|
| 1 | … | … | … | 1 |
| 2 | … | … | … | 1 |
| 3 | … | … | … | 1 |
| … | ||||
| 10 | … | … | … | 2 |
| 11 | … | … | … | 2 |
My goal is to perform a GroupBy operation grouping on the event column. Please, keep in mind that rows are unordered (e.g. particle 3 could belong to event 2 and particle 4 to event 1).
My current approach is to create a std::map where the key is the event, and the value is a user-defined struct. This map is updated, after applying some filters and definitions, using the Foreach function of RDataFrame. Is it possible to perform a GroupBy natively in RDataFrame?
Moreover, I am considering exploiting multithreading in my analysis, so having such function in RDF API would allow me to take advantage of the implicit MT capability of ROOT.
Best regards,
Loris