ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Internal::TTreeReaderGenerator Class Reference

Definition at line 86 of file TTreeReaderGenerator.h.

Public Member Functions

 TTreeReaderGenerator (TTree *tree, const char *classname, Option_t *option)
 Constructor. Analyzes the tree and writes selector. More...
 
- Public Member Functions inherited from ROOT::Internal::TTreeGeneratorBase
 TTreeGeneratorBase (TTree *tree, const char *option)
 Constructor. More...
 
void AddHeader (TClass *cl)
 Add a header inclusion request. More...
 
void AddHeader (const char *classname)
 Add a header inclusion request. More...
 
TString GetContainedClassName (TBranchElement *branch, TStreamerElement *element, Bool_t ispointer)
 Get name of class inside a container. More...
 
TVirtualStreamerInfoGetBaseClass (TStreamerElement *element)
 Check if element is a base class and if yes, return the base class. More...
 
TVirtualStreamerInfoGetStreamerInfo (TBranch *branch, TIter current, TClass *cl)
 Return the correct TStreamerInfo of class 'cl' in the list of branches (current) [Assuming these branches correspond to a flattened version of the class. More...
 

Private Member Functions

void AddReader (TTreeReaderDescriptor::ReaderType type, TString dataType, TString name, TString branchName, TBranchDescriptor *parent=0, Bool_t isLeaf=kTRUE)
 Add a reader to the generated code. More...
 
UInt_t AnalyzeBranches (TBranchDescriptor *desc, TBranchElement *branch, TVirtualStreamerInfo *info)
 Analyse sub-branches of 'branch' recursively and extract readers. More...
 
UInt_t AnalyzeBranches (TBranchDescriptor *desc, TIter &branches, TVirtualStreamerInfo *info)
 Analyse sub-branches 'branches' recursively and extract readers. More...
 
UInt_t AnalyzeOldBranch (TBranch *branch)
 Analyze branch and add the variables found. More...
 
UInt_t AnalyzeOldLeaf (TLeaf *leaf, Int_t nleaves)
 Analyze the leaf and add the variables found. More...
 
Bool_t BranchNeedsReader (TString branchName, TBranchDescriptor *parent, Bool_t isLeaf)
 Check whether a branch should have a corresponding reader added, depending on the options provided by the user. More...
 
void ParseOptions ()
 Parse the user options. More...
 
void AnalyzeTree (TTree *tree)
 Analyze tree and extract readers. More...
 
void WriteSelector ()
 Generate code for selector class. More...
 

Private Attributes

TString fClassname
 
TList fListOfReaders
 
Bool_t fIncludeAllLeaves
 
Bool_t fIncludeAllTopmost
 
std::vector< TStringfIncludeLeaves
 
std::vector< TStringfIncludeStruct
 

Additional Inherited Members

- Public Attributes inherited from ROOT::Internal::TTreeGeneratorBase
TList fListOfHeaders
 
TTreefTree
 
TString fOptionStr
 

#include <TTreeReaderGenerator.h>

Inheritance diagram for ROOT::Internal::TTreeReaderGenerator:
[legend]

Constructor & Destructor Documentation

ROOT::Internal::TTreeReaderGenerator::TTreeReaderGenerator ( TTree tree,
const char *  classname,
Option_t option 
)

Constructor. Analyzes the tree and writes selector.

Definition at line 40 of file TTreeReaderGenerator.cxx.

Member Function Documentation

void ROOT::Internal::TTreeReaderGenerator::AddReader ( TTreeReaderDescriptor::ReaderType  type,
TString  dataType,
TString  name,
TString  branchName,
TBranchDescriptor parent = 0,
Bool_t  isLeaf = kTRUE 
)
private

Add a reader to the generated code.

Definition at line 52 of file TTreeReaderGenerator.cxx.

Referenced by AnalyzeBranches(), AnalyzeOldLeaf(), and AnalyzeTree().

UInt_t ROOT::Internal::TTreeReaderGenerator::AnalyzeBranches ( TBranchDescriptor desc,
TBranchElement branch,
TVirtualStreamerInfo info 
)
private

Analyse sub-branches of 'branch' recursively and extract readers.

Definition at line 84 of file TTreeReaderGenerator.cxx.

Referenced by AnalyzeBranches(), and AnalyzeTree().

UInt_t ROOT::Internal::TTreeReaderGenerator::AnalyzeBranches ( TBranchDescriptor desc,
TIter branches,
TVirtualStreamerInfo info 
)
private

Analyse sub-branches 'branches' recursively and extract readers.

Definition at line 96 of file TTreeReaderGenerator.cxx.

UInt_t ROOT::Internal::TTreeReaderGenerator::AnalyzeOldBranch ( TBranch branch)
private

Analyze branch and add the variables found.

The number of analyzed sub-branches is returned.

Definition at line 457 of file TTreeReaderGenerator.cxx.

Referenced by AnalyzeTree().

UInt_t ROOT::Internal::TTreeReaderGenerator::AnalyzeOldLeaf ( TLeaf leaf,
Int_t  nleaves 
)
private

Analyze the leaf and add the variables found.

Definition at line 479 of file TTreeReaderGenerator.cxx.

Referenced by AnalyzeOldBranch().

void ROOT::Internal::TTreeReaderGenerator::AnalyzeTree ( TTree tree)
private

Analyze tree and extract readers.

Definition at line 644 of file TTreeReaderGenerator.cxx.

Referenced by TTreeReaderGenerator().

Bool_t ROOT::Internal::TTreeReaderGenerator::BranchNeedsReader ( TString  branchName,
TBranchDescriptor parent,
Bool_t  isLeaf 
)
private

Check whether a branch should have a corresponding reader added, depending on the options provided by the user.

Definition at line 587 of file TTreeReaderGenerator.cxx.

Referenced by AddReader().

void ROOT::Internal::TTreeReaderGenerator::ParseOptions ( )
private

Parse the user options.

Definition at line 616 of file TTreeReaderGenerator.cxx.

Referenced by TTreeReaderGenerator().

void ROOT::Internal::TTreeReaderGenerator::WriteSelector ( )
private

Generate code for selector class.

Definition at line 782 of file TTreeReaderGenerator.cxx.

Referenced by TTreeReaderGenerator().

Member Data Documentation

TString ROOT::Internal::TTreeReaderGenerator::fClassname
private

Definition at line 88 of file TTreeReaderGenerator.h.

Referenced by WriteSelector().

Bool_t ROOT::Internal::TTreeReaderGenerator::fIncludeAllLeaves
private

Definition at line 90 of file TTreeReaderGenerator.h.

Referenced by BranchNeedsReader(), and ParseOptions().

Bool_t ROOT::Internal::TTreeReaderGenerator::fIncludeAllTopmost
private

Definition at line 91 of file TTreeReaderGenerator.h.

Referenced by BranchNeedsReader(), and ParseOptions().

std::vector<TString> ROOT::Internal::TTreeReaderGenerator::fIncludeLeaves
private

Definition at line 92 of file TTreeReaderGenerator.h.

Referenced by BranchNeedsReader(), and ParseOptions().

std::vector<TString> ROOT::Internal::TTreeReaderGenerator::fIncludeStruct
private

Definition at line 93 of file TTreeReaderGenerator.h.

Referenced by BranchNeedsReader(), and ParseOptions().

TList ROOT::Internal::TTreeReaderGenerator::fListOfReaders
private

Definition at line 89 of file TTreeReaderGenerator.h.

Referenced by AddReader(), and WriteSelector().

Collaboration diagram for ROOT::Internal::TTreeReaderGenerator:
[legend]

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