When I am doing migration of analysis code from previous work to RDataFrame, there can be cases when some code can finish the calculation of multiple variables in a single call. (like calculate various kinematics variables for one reconstructed particle). While I could be using RDataFrame to write code like:
with an overload of Define that looks like:
RDataFrame::Define(const ColumnNames_t &, F && , const ColumnNames_t &).
Or to say, is it possible to add another overload that takes a list of names of variables to define, and takes a callable object that returns a tuple. Internally it will unpack the tuple and put all the variables in different columns.
Alternatives considered
Actually my current workaround is to define a column with tuple and unpack it with multiple define, since I am not planning to do so many modification to old code.
Feature description
When I am doing migration of analysis code from previous work to
RDataFrame
, there can be cases when some code can finish the calculation of multiple variables in a single call. (like calculate various kinematics variables for one reconstructed particle). While I could be usingRDataFrame
to write code like:, but it would be great if I could do something like
with an overload of Define that looks like:
RDataFrame::Define(const ColumnNames_t &, F && , const ColumnNames_t &)
.Or to say, is it possible to add another overload that takes a list of names of variables to define, and takes a callable object that returns a tuple. Internally it will unpack the tuple and put all the variables in different columns.
Alternatives considered
Actually my current workaround is to define a column with tuple and unpack it with multiple define, since I am not planning to do so many modification to old code.
Additional context
No response