Logo ROOT   6.10/09
Reference Guide
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
TTreeReaderArray< T > Class Template Reference

template<typename T>
class TTreeReaderArray< T >

Extracts array data from a TTree.

Definition at line 62 of file TTreeReaderArray.h.

Classes

struct  Iterator_t
 

Public Types

typedef Iterator_t iterator
 
- Public Types inherited from ROOT::Internal::TTreeReaderValueBase
enum  EReadStatus { kReadSuccess = 0, kReadNothingYet, kReadError }
 
enum  ESetupStatus {
  kSetupNotSetup = -7, kSetupTreeDestructed = -8, kSetupMakeClassModeMismatch = -7, kSetupMissingCounterBranch = -6,
  kSetupMissingBranch = -5, kSetupInternalError = -4, kSetupMissingDictionary = -3, kSetupMismatch = -2,
  kSetupNotACollection = -1, kSetupMatch = 0, kSetupMatchBranch = 0, kSetupNoCheck = 5,
  kSetupMatchLeaf = 6
}
 

Public Member Functions

 TTreeReaderArray (TTreeReader &tr, const char *branchname)
 
T & At (size_t idx)
 
Iterator_t begin ()
 
Iterator_t end () const
 
T & operator[] (size_t idx)
 
- Public Member Functions inherited from ROOT::Internal::TTreeReaderArrayBase
 TTreeReaderArrayBase (TTreeReader *reader, const char *branchname, TDictionary *dict)
 
virtual EReadStatus GetReadStatus () const
 
size_t GetSize () const
 
Bool_t IsEmpty () const
 
- Public Member Functions inherited from ROOT::Internal::TTreeReaderValueBase
virtual ~TTreeReaderValueBase ()
 Unregister from tree reader, cleanup. More...
 
voidGetAddress ()
 Returns the memory address of the object being read. More...
 
const char * GetBranchName () const
 
TLeafGetLeaf ()
 If we are reading a leaf, return the corresponding TLeaf. More...
 
ESetupStatus GetSetupStatus () const
 
Bool_t IsValid () const
 
EReadStatus ProxyRead ()
 Try to read the value from the TBranchProxy, returns the status of the read. More...
 

Protected Member Functions

virtual const char * GetDerivedTypeName () const
 
- Protected Member Functions inherited from ROOT::Internal::TTreeReaderArrayBase
virtual void CreateProxy ()
 Create the proxy object for our branch. More...
 
bool GetBranchAndLeaf (TBranch *&branch, TLeaf *&myLeaf, TDictionary *&branchActualType)
 Determine the branch / leaf and its type; reset fProxy / fSetupStatus on error. More...
 
const char * GetBranchContentDataType (TBranch *branch, TString &contentTypeName, TDictionary *&dict)
 Access a branch's collection content (not the collection itself) through a proxy. More...
 
void SetImpl (TBranch *branch, TLeaf *myLeaf)
 Create the TVirtualCollectionReader object for our branch. More...
 
voidUntypedAt (size_t idx) const
 
- Protected Member Functions inherited from ROOT::Internal::TTreeReaderValueBase
 TTreeReaderValueBase (TTreeReader *reader=0, const char *branchname=0, TDictionary *dict=0)
 Construct a tree value reader and register it with the reader object. More...
 
 TTreeReaderValueBase (const TTreeReaderValueBase &)
 Copy-construct. More...
 
const char * GetBranchDataType (TBranch *branch, TDictionary *&dict) const
 Retrieve the type of data stored by branch; put its dictionary into dict, return its type name. More...
 
Detail::TBranchProxyGetProxy () const
 
void MarkTreeReaderUnavailable ()
 
void NotifyNewTree (TTree *newTree)
 The TTreeReader has switched to a new TTree. Update the leaf. More...
 
TTreeReaderValueBaseoperator= (const TTreeReaderValueBase &)
 Copy-assign. More...
 
void RegisterWithTreeReader ()
 Register with tree reader. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from ROOT::Internal::TTreeReaderValueBase
static std::string GetElementTypeName (const std::type_info &ti)
 Stringify the template argument. More...
 
- Protected Attributes inherited from ROOT::Internal::TTreeReaderArrayBase
TVirtualCollectionReaderfImpl
 
- Protected Attributes inherited from ROOT::Internal::TTreeReaderValueBase
TString fBranchName
 
TDictionaryfDict
 
TLeaffLeaf
 
TString fLeafName
 
Detail::TBranchProxyfProxy
 
EReadStatus fReadStatus
 
ESetupStatus fSetupStatus
 
std::vector< Long64_tfStaticClassOffsets
 
TTreeReaderfTreeReader
 

#include <TTreeReaderArray.h>

Inheritance diagram for TTreeReaderArray< T >:
[legend]

Member Typedef Documentation

◆ iterator

template<typename T>
typedef Iterator_t TTreeReaderArray< T >::iterator

Definition at line 122 of file TTreeReaderArray.h.

Constructor & Destructor Documentation

◆ TTreeReaderArray()

template<typename T>
TTreeReaderArray< T >::TTreeReaderArray ( TTreeReader tr,
const char *  branchname 
)
inline

Definition at line 124 of file TTreeReaderArray.h.

Member Function Documentation

◆ At()

template<typename T>
T& TTreeReaderArray< T >::At ( size_t  idx)
inline

Definition at line 130 of file TTreeReaderArray.h.

◆ begin()

template<typename T>
Iterator_t TTreeReaderArray< T >::begin ( )
inline

Definition at line 133 of file TTreeReaderArray.h.

◆ end()

template<typename T>
Iterator_t TTreeReaderArray< T >::end ( ) const
inline

Definition at line 138 of file TTreeReaderArray.h.

◆ GetDerivedTypeName()

template<typename T>
virtual const char* TTreeReaderArray< T >::GetDerivedTypeName ( ) const
inlineprotectedvirtual

Implements ROOT::Internal::TTreeReaderValueBase.

Definition at line 142 of file TTreeReaderArray.h.

◆ operator[]()

template<typename T>
T& TTreeReaderArray< T >::operator[] ( size_t  idx)
inline

Definition at line 131 of file TTreeReaderArray.h.


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