Filling RHist using RDataFrame.
{
auto dfX = df.Define(
"x",
double v = std::exp(0.1 *
e);
return std::fmod(
v, 20.0);
},
{"rdfentry_"});
auto hist =
dfX.Hist(40, {0.0, 20.0},
"x");
std::cout << "entries = " << hist->GetNEntries();
std::cout << ", mean = " << hist->ComputeMean();
std::cout << ", stddev = " << hist->ComputeStdDev();
std::cout << "\n";
auto *
c =
new TCanvas(
"c",
"", 10, 10, 900, 500);
}
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
std::unique_ptr< TH1D > ConvertToTH1D(const RHistEngine< double > &engine)
Convert a one-dimensional histogram to TH1D.
entries = 100, mean = 8.2544, stddev = 5.95187
- Date
- February 2026
- Author
- The ROOT Team
Definition in file hist101_RDataFrame_Hist.C.