root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.71k stars 1.28k forks source link

Doc for `RInterface::Take` isn't clear about `column` parameter #16487

Open Axel-Naumann opened 2 months ago

Axel-Naumann commented 2 months ago

Explain what you would like to see improved and how.

https://root.cern/doc/master/classROOT_1_1RDF_1_1RInterface.html#aa571f08b8e4d9300cacdea039a379a22

column has a default value, but the doc doesn't say what it will do if I don't pass a value. Is that totally obvious and I'm just missing this, or is it documented elsewhere?

ROOT version

master

Installation method

n/a

Operating system

n/a

Additional context

No response

martamaja10 commented 1 month ago

Hi @Axel-Naumann, this is not directly documented at action Take but there is an explanation what happens when you use DefaultColumns here: https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches . With Take, it will be analogous to the Histo1D() or Min() shown in the example code. So Take<T>("") will act on the first of the default columns (you will have to correctly specify the template though, otherwise you'll get an error). I can extend the example to show Take as well, would that be a satisfactory solution?