_ROOT Version:6.14
Platform: Not Provided
Compiler: Not Provided
should RDataFrame::Define(…)
support define a new int column?
like Define(“E1/I”,“E+1”);
_ROOT Version:6.14
Platform: Not Provided
Compiler: Not Provided
should RDataFrame::Define(…)
support define a new int column?
like Define(“E1/I”,“E+1”);
Hi,
the first argument of the Define method is the name of the column. No need to specify its type, for example:
rdf.Define("myNewColumn", "anExistingColumn + 123")
Cheers,
D
And how do you request that the “myNewColumn” is an “int” (“Int_t” or “UInt_t” or “Short_t” or …)?
In the case of just-in-time compiled string expressions, the type is inferred from the string, so for instance one might write "UInt_t(anExistingColumn + 123)"
to make sure the returned type is what one wants it to be.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.