TTreeReaderValue
TTreeReaderValue is a class in the ROOT data analysis framework used for reading leaf values from TTrees and TNtuples. It is part of the TTreeReader facility, which provides a simplified, stream‑based approach to data access compared to the traditional GetEntry method. A TTreeReaderValue object is templated on the leaf data type, enabling compile‑time type safety for the values retrieved from a TTree.
When a TTreeReaderValue is constructed, it takes a reference to a TTreeReader and the name of the
Typical usage involves creating a TTreeReader with the name of the tree and its associated TFile, then
TTreeReaderValue is particularly convenient in interactive ROOT sessions, CINT/Cling macros, and compiled analysis code. It offers