Logo ROOT   6.12/07
Reference Guide
List of all members | Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Experimental::TDF::TArrayBranch< T > Class Template Reference

template<typename T>
class ROOT::Experimental::TDF::TArrayBranch< T >

When using TDataFrame to read data from a ROOT file, users can specify that the type of a branch is TArrayBranch<T> to indicate the branch is a c-style array, an STL array or any other type that can/must be accessed through a TTreeReaderArray<T> (as opposed to a TTreeReaderValue<T>).

Column values of type TArrayBranch perform no copy of the underlying array data and offer a minimal array-like interface to access the array elements: either via square brackets, or with C++11 range-based for loops.

Definition at line 26 of file TArrayBranch.hxx.

Public Types

using const_iterator = typename TTreeReaderArray< T >::const_iterator
 
using iterator = typename TTreeReaderArray< T >::iterator
 
using value_type = T
 

Public Member Functions

 TArrayBranch ()
 
 TArrayBranch (TTreeReaderArray< T > &arr)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
T * GetData ()
 
const T & operator[] (std::size_t n) const
 
std::size_t size () const
 

Private Attributes

TTreeReaderArray< T > * fReaderArray = nullptr
 Pointer to the TTreeReaderArray that actually owns the data. More...
 

#include <ROOT/TArrayBranch.hxx>

Member Typedef Documentation

◆ const_iterator

Definition at line 30 of file TArrayBranch.hxx.

◆ iterator

template<typename T>
using ROOT::Experimental::TDF::TArrayBranch< T >::iterator = typename TTreeReaderArray<T>::iterator

Definition at line 29 of file TArrayBranch.hxx.

◆ value_type

template<typename T>
using ROOT::Experimental::TDF::TArrayBranch< T >::value_type = T

Definition at line 31 of file TArrayBranch.hxx.

Constructor & Destructor Documentation

◆ TArrayBranch() [1/2]

template<typename T>
ROOT::Experimental::TDF::TArrayBranch< T >::TArrayBranch ( )
inline

Definition at line 33 of file TArrayBranch.hxx.

◆ TArrayBranch() [2/2]

template<typename T>
ROOT::Experimental::TDF::TArrayBranch< T >::TArrayBranch ( TTreeReaderArray< T > &  arr)
inline

Definition at line 34 of file TArrayBranch.hxx.

Member Function Documentation

◆ begin() [1/2]

template<typename T>
iterator ROOT::Experimental::TDF::TArrayBranch< T >::begin ( )
inline

Definition at line 50 of file TArrayBranch.hxx.

◆ begin() [2/2]

template<typename T>
const_iterator ROOT::Experimental::TDF::TArrayBranch< T >::begin ( ) const
inline

Definition at line 52 of file TArrayBranch.hxx.

◆ end() [1/2]

template<typename T>
iterator ROOT::Experimental::TDF::TArrayBranch< T >::end ( )
inline

Definition at line 51 of file TArrayBranch.hxx.

◆ end() [2/2]

template<typename T>
const_iterator ROOT::Experimental::TDF::TArrayBranch< T >::end ( ) const
inline

Definition at line 53 of file TArrayBranch.hxx.

◆ GetData()

template<typename T>
T* ROOT::Experimental::TDF::TArrayBranch< T >::GetData ( void  )
inline

Definition at line 48 of file TArrayBranch.hxx.

◆ operator[]()

template<typename T>
const T& ROOT::Experimental::TDF::TArrayBranch< T >::operator[] ( std::size_t  n) const
inline

Definition at line 45 of file TArrayBranch.hxx.

◆ size()

template<typename T>
std::size_t ROOT::Experimental::TDF::TArrayBranch< T >::size ( ) const
inline

Definition at line 55 of file TArrayBranch.hxx.

Member Data Documentation

◆ fReaderArray

template<typename T>
TTreeReaderArray<T>* ROOT::Experimental::TDF::TArrayBranch< T >::fReaderArray = nullptr
private

Pointer to the TTreeReaderArray that actually owns the data.

Definition at line 27 of file TArrayBranch.hxx.


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