Is there an example of defineslot with RDataFrame?


_ROOT Version:6.16
_Platform:ubuntu
_Compiler:gcc


Hi all
I’d love to define a new branch with parallel,
I found Defineslot(UInt_t I, double x) in RDataFrame.
Is there any example? I don’t found any @ tutorial.

for example
Defineslot(“y”, [](unsigned i, double x){return x*x;}, {“x”})

is that OK with parallel?

Hi,

https://root.cern/doc/master/classROOT_1_1RDF_1_1RInterface.html#acaacf727b8a41d27c6bb4513348ac892
and yes! it is by definition parallel safe since a slot per thread is assigned.

Cheers,
Danilo

cheers!
by the way.

df.Define(“x”, function, {“rdfslot_”, “column1”, “column2”})
should I define the “rdfslot_” in the tree?

Hi,

it is not needed and the link in my previous post points to the very documentation.

D

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.