17 const std::string columnName =
"x";
21 auto d = rdf.Define(columnName,
"rdfentry_ + 1.");
25 auto aggregator = [](
double acc,
double x) {
return acc *
x; };
29 auto merger = [](std::vector<double> &accumulators) {
30 auto size = accumulators.size();
31 for (
int i = 1; i < size; ++i) {
32 accumulators[0] *= accumulators[i];
37 double initValue = 1.;
40 auto result =
d.Aggregate(aggregator, merger, columnName, initValue);
42 std::cout << *result << std::endl;
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...