Use Range to limit the amount of data processed.
This tutorial shows how to express the concept of ranges when working with the RDataFrame.
import ROOT
.Define("b2", "(float) rdfentry_ * rdfentry_").Snapshot(treeName, fileName)
fileName = "df006_ranges_py.root"
treeName = "myTree"
c_0_3_after_even_b1 =
d.Filter(
"0 == b1 % 2").
Range(0, 3).Count()
print("Usage of ranges:")
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 ,...
Usage of ranges:
- All entries: 100
- Entries from 0 to 30: 30
- Entries from 15 onwards: 85
- Entries from 15 onwards in steps of 3: 29
- Entries from 0 to 50, odd only: 25
- First three entries of all even entries: 3
- Date
- March 2017
- Author
- Danilo Piparo (CERN)
Definition in file df006_ranges.py.