Logo ROOT   6.10/09
Reference Guide
tdf008_createDataSetFromScratch.C File Reference

Detailed Description

View in nbviewer Open in SWAN This tutorial shows how to create a dataset from scratch with TDataFrame

void tdf008_createDataSetFromScratch()
{
// We create an empty data frame of 100 entries
// We now fill it with random numbers
TRandom3 rnd(1);
auto tdf_1 = tdf.Define("rnd", [&rnd](){return rnd.Gaus();});
// We plot these numbers
auto hgaus = tdf_1.Histo1D("rnd");
// And we write out the dataset on disk
tdf_1.Snapshot("randomNumbers", "tdf008_createDataSetFromScratch.root");
}
Date
June 2017
Author
Danilo Piparo

Definition in file tdf008_createDataSetFromScratch.C.