15void fill_tree(
const char *treeName,
const char *fileName)
19 d.Define(
"b1", [&i]() {
return i; })
26 .Snapshot(treeName, fileName);
29int df005_fillAnyObject()
33 auto fileName =
"df005_fillAnyObject.root";
34 auto treeName =
"myTree";
35 fill_tree(treeName, fileName);
43 auto th1d =
d.Fill<
double>(
TH1D(
"th1d",
"th1d", 64, 0, 128), {
"b1"});
44 auto th1i =
d.Fill<
float>(
TH1I(
"th1i",
"th1i", 64, 0, 128), {
"b2"});
45 auto th2d =
d.Fill<double,
float>(
TH2D(
"th2d",
"th2d", 64, 0, 128, 64, 0, 1024), {
"b1",
"b2"});
54 th2d->DrawClone(
"COLZ");
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
1-D histogram with a double per channel (see TH1 documentation)}
1-D histogram with an int per channel (see TH1 documentation)}
2-D histogram with a double per channel (see TH1 documentation)}