15 void fill_tree(
const char *treeName,
const char *fileName)
17 ROOT::RDataFrame d(100);
19 d.Define(
"b1", [&i]() {
return i; })
26 .Snapshot(treeName, fileName);
29 int df005_fillAnyObject()
33 auto fileName =
"df005_fillAnyObject.root";
34 auto treeName =
"myTree";
35 fill_tree(treeName, fileName);
38 ROOT::RDataFrame d(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"});
47 auto c1 =
new TCanvas();
50 auto c2 =
new TCanvas();
53 auto c3 =
new TCanvas();
54 th2d->DrawClone(
"COLZ");