17void fill_tree(
const char *treeName,
const char *fileName)
21 d.Define(
"b1", [&i]() {
return i; })
28 .Snapshot(treeName, fileName);
31int df005_fillAnyObject()
35 auto fileName =
"df005_fillAnyObject.root";
36 auto treeName =
"myTree";
37 fill_tree(treeName, fileName);
45 auto th1d =
d.Fill<
double>(
TH1D(
"th1d",
"th1d", 64, 0, 128), {
"b1"});
46 auto th1i =
d.Fill<
float>(
TH1I(
"th1i",
"th1i", 64, 0, 128), {
"b2"});
47 auto th2d =
d.Fill<
double,
float>(
TH2D(
"th2d",
"th2d", 64, 0, 128, 64, 0, 1024), {
"b1",
"b2"});
56 th2d->DrawClone(
"COLZ");
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
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)}