13 void fill_tree(
const char *treeName,
const char *fileName)
17 d.Define(
"b1", [&i]() {
return i; })
24 .Snapshot(treeName, fileName);
27 int df005_fillAnyObject()
31 auto fileName =
"df005_fillAnyObject.root";
32 auto treeName =
"myTree";
33 fill_tree(treeName, fileName);
41 auto th1d =
d.Fill<
double>(
TH1D(
"th1d",
"th1d", 64, 0, 128), {
"b1"});
42 auto th1i =
d.Fill<
float>(
TH1I(
"th1i",
"th1i", 64, 0, 128), {
"b2"});
43 auto th2d =
d.Fill<double,
float>(
TH2D(
"th2d",
"th2d", 64, 0, 128, 64, 0, 1024), {
"b1",
"b2"});
52 th2d->DrawClone(
"COLZ");
THist< 1, int, THistStatContent > TH1I
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees, CSV's and other data formats.
THist< 2, double, THistStatContent, THistStatUncertainty > TH2D
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D