15 void fill_tree(
const char *treeName,
const char *fileName)
19 d.Define(
"b1", [&i]() {
return i++; }).Snapshot(treeName, fileName);
27 auto fileName =
"tdf011_ROOTDataSources.root";
28 auto treeName =
"myTree";
29 fill_tree(treeName, fileName);
35 auto h_s = d_s.Define(
"x",
"1./(b1 + 1.)").Histo1D({
"h_s",
"h_s", 128, 0, .6},
"x");
39 auto h = d.Define(
"x",
"1./(b1 + 1.)").Histo1D({
"h",
"h", 128, 0, .6},
"x");
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
TDataSource defines an API that TDataFrame can use to read arbitrary data formats.
TDataFrame MakeRootDataFrame(std::string_view treeName, std::string_view fileNameGlob)
ROOT's TDataFrame offers a high level interface for analyses of data stored in TTrees.