Error introduction of tutorial df003_profiles.C


_ROOT Version:6.20.04


df003_profiles.C

auto hprof1d = d.Profile1D({"hprof1d", "Profile of pz versus px", 64, -4, 4});

should be

auto hprof1d = d.Profile1D({"hprof1d", "Profile of pz versus px", 64, -4, 4},"px",''pz");

or

auto hprof1d = d.Profile1D({"hprof1d", "Profile of pz versus px", 64, -4, 4},"px",''py");

Hi @cxwx1,
the tutorial makes use of a lesser known feature of RDF, “default columns”: the constructor invoked is ROOT::RDataFrame d(treeName, fileName, {"px", "py", "pz"}), which means that whenever RDF needs some columns it picks them from that list that is passed to the constructor, in the order they were passed.

Feel free to open a pull request on github in case you want to propose improvements to the tutorials.

Cheers,
Enrico

Thanks for reminding. @eguiraud

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