19 const std::string columnName =
"x";
23 auto d = rdf.Define(columnName,
"rdfentry_ + 1.");
27 auto aggregator = [](
double acc,
double x) {
return acc *
x; };
31 auto merger = [](std::vector<double> &accumulators) {
32 auto size = accumulators.size();
33 for (
int i = 1; i <
size; ++i) {
34 accumulators[0] *= accumulators[i];
39 double initValue = 1.;
42 auto result =
d.Aggregate(aggregator, merger, columnName, initValue);
44 std::cout << *
result << std::endl;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...