Use the Stats action to extract the statistics of a column.
Extract the statistics relative to RDataFrame columns and store them in TStatistic instances.
auto rr =
r.Define(
"v", [](
ULong64_t e){
return e;}, {
"rdfentry_"})
.Define(
"w", [](
ULong64_t e){
return 1./(
e+1);}, {
"v"});
auto stats_ew = rr.Stats<
ULong64_t,
double>(
"v",
"w");
auto stats_iu = rr.Stats("v");
auto stats_iw = rr.Stats("v", "w");
stats_ew->Print();
stats_iu->Print();
stats_iw->Print();
}
unsigned long long ULong64_t
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
OBJ: TStatistic Mean = 127.5 +- 4.628 RMS = 74.045 Count = 256 Min = 0 Max = 255
OBJ: TStatistic Mean = 40.8 +- 12.86 RMS = 60.318 Count = 256 Min = 0 Max = 255
OBJ: TStatistic Mean = 127.5 +- 4.628 RMS = 74.045 Count = 256 Min = 0 Max = 255
OBJ: TStatistic Mean = 40.8 +- 12.86 RMS = 60.318 Count = 256 Min = 0 Max = 255
- Date
- April 2019
- Author
- Danilo Piparo (CERN)
Definition in file df031_Stats.C.