15 void fill_tree(
const char *treeName,
const char *fileName)
19 d.Define(
"b1", [&i]() {
return i++; }).Snapshot(treeName, fileName);
26 auto fileName =
"df011_ROOTDataSources.root";
27 auto treeName =
"myTree";
28 fill_tree(treeName, fileName);
34 auto h_s = d_s.Define(
"x",
"1./(b1 + 1.)").Histo1D({
"h_s",
"h_s", 128, 0, .6},
"x");
38 auto h =
d.Define(
"x",
"1./(b1 + 1.)").Histo1D({
"h",
"h", 128, 0, .6},
"x");
RDataFrame MakeRootDataFrame(std::string_view treeName, std::string_view fileNameGlob)
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees, CSV's and other data formats.
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.