14 const auto nEntries = 3;
16 auto df = _df.Define(
"one", [] {
return 1; }).
Define(
"two", [] {
return 2; });
22 auto isOne = [] (
int a) {
return a == 1; };
26 auto c1 = df.Filter(isOne, {
"one"}).
Count();
27 auto c2 = df.Filter(isNotOne, {
"two"}).
Count();
34 auto checkOneTwo = [] (
const std::vector<int> &
v) {
return v.size() == 2 &&
v[0] == 1 &&
v[1] == 2; };
RInterface< Proxied, DS_t > Define(std::string_view name, F expression, const ColumnNames_t &columns={})
Define a new column.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
auto PassAsVec(F &&f) -> RDFInternal::PassAsVecHelper< std::make_index_sequence< N >, T, F >
PassAsVec is a callable generator that allows passing N variables of type T to a function as a single...
RResultPtr< ULong64_t > Count()
Return the number of entries processed (lazy action).
auto Not(F &&f) -> decltype(RDFInternal::NotHelper(Args(), std::forward< F >(f)))
Given a callable with signature bool(T1, T2, ...) return a callable with same signature that returns ...