20 void fill_tree(
const char *filename,
const char *treeName)
22 TFile f(filename,
"RECREATE");
23 TTree t(treeName, treeName);
28 for (
int i = 0; i < 100; ++i) {
38 int tdf005_fillAnyObject()
42 auto fileName =
"tdf005_fillAnyObject.root";
43 auto treeName =
"myTree";
44 fill_tree(fileName, treeName);
52 auto th1d = d.Fill<
double>(
TH1D(
"th1d",
"th1d", 64, 0, 128), {
"b1"});
53 auto th1i = d.Fill<
float>(
TH1I(
"th1i",
"th1i", 64, 0, 128), {
"b2"});
54 auto th2d = d.Fill<double,
float>(
TH2D(
"th2d",
"th2d", 64, 0, 128, 64, 0, 1024), {
"b1",
"b2"});
63 th2d->DrawClone(
"COLZ");
THist< 1, int, THistStatContent > TH1I
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
THist< 2, double, THistStatContent, THistStatUncertainty > TH2D
ROOT's TDataFrame offers a high level interface for analyses of data stored in TTrees.
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
A TTree object has a header with a name and a title.