Use just-in-time-compiled Filters and Defines for quick prototyping.
This tutorial illustrates how to save some typing when using RDataFrame by invoking functions that perform jit-compiling at runtime.
{
auto pidf = df.Define(
"x",
"gRandom->Uniform(-1.0, 1.0)")
.Define("y", "gRandom->Uniform(-1.0, 1.0)")
.Define("p", "std::array<double, 2> v{x, y}; return v;")
.Define("r", "double r2 = 0.0; for (auto&& x : p) r2 += x*x; return sqrt(r2);");
std::cout <<
"pi is approximately equal to " <<
pi_approx << std::endl;
}
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 ,...
pi is approximately equal to 3.14146
- Date
- October 2017
- Author
- Guilherme Amadio (CERN)
Definition in file df012_DefinesAndFiltersAsStrings.C.