Logo ROOT  
Reference Guide
df008_createDataSetFromScratch.C File Reference

Detailed Description

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

{
// We create an empty data frame of 100 entries
// We now fill it with random numbers
auto df_1 = df.Define("rnd", []() { return gRandom->Gaus(); });
// And we write out the dataset on disk
df_1.Snapshot("randomNumbers", "df008_createDataSetFromScratch.root");
}
Date
June 2017
Author
Danilo Piparo

Definition in file df008_createDataSetFromScratch.C.

TRandom::Gaus
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Definition: TRandom.cxx:263
df008_createDataSetFromScratch
Definition: df008_createDataSetFromScratch.py:1
ROOT::RDataFrame
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Definition: RDataFrame.hxx:42
gRandom
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
TRandom::SetSeed
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Definition: TRandom.cxx:597