Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TTreeReader::Iterator_t Class Reference

Iterate through the entries of a TTree.

This iterator drives the associated TTreeReader; its dereferencing (and actually even the iteration) will set the entry number represented by this iterator. It does not really represent a data element; it simply returns the entry number (or -1 once the end of the tree is reached).

Definition at line 55 of file TTreeReader.h.

Public Member Functions

 Iterator_t ()
 Default-initialize the iterator as "past the end". More...
 
 Iterator_t (TTreeReader &reader, Long64_t entry)
 Initialize the iterator with the reader it steers and a tree entry number; -1 is invalid. More...
 
bool operator!= (const Iterator_t &lhs) const
 Compare two iterators for inequality. More...
 
const Long64_toperator* ()
 Set the entry number in the reader and return it. More...
 
const Long64_toperator* () const
 
Iterator_t operator++ (int)
 Increment the iterator (postfix i++). More...
 
Iterator_toperator++ ()
 Increment the iterator (prefix ++i). More...
 
bool operator== (const Iterator_t &lhs) const
 Compare two iterators for equality. More...
 

Private Member Functions

bool IsValid () const
 Whether the iterator points to a valid entry. More...
 

Private Attributes

Long64_t fEntry
 Entry number of the tree referenced by this iterator; -1 is invalid. More...
 
TTreeReaderfReader
 The reader we select the entries on. More...
 

#include <TTreeReader.h>

Inheritance diagram for TTreeReader::Iterator_t:
[legend]

Constructor & Destructor Documentation

◆ Iterator_t() [1/2]

TTreeReader::Iterator_t::Iterator_t ( )
inline

Default-initialize the iterator as "past the end".

Definition at line 66 of file TTreeReader.h.

◆ Iterator_t() [2/2]

TTreeReader::Iterator_t::Iterator_t ( TTreeReader reader,
Long64_t  entry 
)
inline

Initialize the iterator with the reader it steers and a tree entry number; -1 is invalid.

Definition at line 70 of file TTreeReader.h.

Member Function Documentation

◆ IsValid()

bool TTreeReader::Iterator_t::IsValid ( ) const
inlineprivate

Whether the iterator points to a valid entry.

Definition at line 62 of file TTreeReader.h.

◆ operator!=()

bool TTreeReader::Iterator_t::operator!= ( const Iterator_t lhs) const
inline

Compare two iterators for inequality.

Definition at line 81 of file TTreeReader.h.

◆ operator*() [1/2]

const Long64_t& TTreeReader::Iterator_t::operator* ( )
inline

Set the entry number in the reader and return it.

Definition at line 106 of file TTreeReader.h.

◆ operator*() [2/2]

const Long64_t& TTreeReader::Iterator_t::operator* ( ) const
inline

Definition at line 117 of file TTreeReader.h.

◆ operator++() [1/2]

Iterator_t TTreeReader::Iterator_t::operator++ ( int  )
inline

Increment the iterator (postfix i++).

Definition at line 86 of file TTreeReader.h.

◆ operator++() [2/2]

Iterator_t& TTreeReader::Iterator_t::operator++ ( )
inline

Increment the iterator (prefix ++i).

Definition at line 93 of file TTreeReader.h.

◆ operator==()

bool TTreeReader::Iterator_t::operator== ( const Iterator_t lhs) const
inline

Compare two iterators for equality.

Definition at line 74 of file TTreeReader.h.

Member Data Documentation

◆ fEntry

Long64_t TTreeReader::Iterator_t::fEntry
private

Entry number of the tree referenced by this iterator; -1 is invalid.

Definition at line 58 of file TTreeReader.h.

◆ fReader

TTreeReader* TTreeReader::Iterator_t::fReader
private

The reader we select the entries on.

Definition at line 59 of file TTreeReader.h.

Libraries for TTreeReader::Iterator_t:
[legend]

The documentation for this class was generated from the following file: