ROOT  6.06/09
Reference Guide
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TTreeTableInterface Class Reference

TTreeTableInterface is used to interface to data that is stored in a TTree.

When the interface is created, an expression can be specified. This expression will define the columns to be shown.

A selection criterium can also be specified. A TEntryList will be created and applied to the TTree using this criterium. a new TEntryList to use can be specified using SetEntryList. TGTable->Update() will need to be called to show the effects.

WARNING: Do not apply an entrylist to the tree in any other way than through the interface, this will have undefined consequences.

Columns can be manipulated using the appropriate methods. A TGTable->Update is always needed afterwards to make the table aware of the changes.

Definition at line 27 of file TTreeTableInterface.h.

Public Member Functions

 TTreeTableInterface (TTree *tree=0, const char *varexp=0, const char *selection=0, Option_t *option=0, Long64_t nentries=0, Long64_t firstentry=0)
 
virtual ~TTreeTableInterface ()
 TTreeTableInterface destructor. More...
 
virtual Double_t GetValue (UInt_t row, UInt_t column)
 Return the value of row,column. More...
 
virtual const char * GetValueAsString (UInt_t row, UInt_t column)
 Return the content of row,column as string to use in a TGTableCell label. More...
 
virtual const char * GetRowHeader (UInt_t row)
 Return a string to use as a label for rowheader at column. More...
 
virtual const char * GetColumnHeader (UInt_t column)
 Return a string to use as a label for columnheader at column. More...
 
virtual UInt_t GetNRows ()
 Return the amount of rows in the Tree. More...
 
virtual UInt_t GetNColumns ()
 Return the amount of column available. More...
 
virtual TEntryListGetEntryList ()
 
virtual void AddColumn (const char *expression, UInt_t position)
 Add column according ot expression at position, TGTable->Update() is needed afterwards to apply the change to the TGTable. More...
 
virtual void AddColumn (TTreeFormula *formula, UInt_t position)
 Add column with formula at position, TGTable->Update() is needed afterwards to apply the change to the TGTable. More...
 
virtual void RemoveColumn (UInt_t position)
 Remove column at position, TGTable->Update() is needed afterwards to apply the change to the TGTable. More...
 
virtual void SetFormula (TTreeFormula *formula, UInt_t position)
 Set the TTreeFormula of position to formula. More...
 
virtual void SetSelection (const char *selection)
 Set the selection expression. More...
 
virtual void SetEntryList (TEntryList *entrylist=0)
 Set the currently active entrylist. More...
 
- Public Member Functions inherited from TVirtualTableInterface
 TVirtualTableInterface ()
 
virtual ~TVirtualTableInterface ()
 

Private Member Functions

void SetVariablesExpression (const char *varexp)
 Compile the variables expression from the given varexp. More...
 
void SyncFormulas ()
 Sync the formulas using the TTreeFormulaManager. More...
 
void InitEntries ()
 Initialise the TEntryList with the entries that match the selection criterium. More...
 

Private Attributes

TTreefTree
 
TListfFormulas
 
Long64_t fEntry
 
Long64_t fNEntries
 
Long64_t fFirstEntry
 
TTreeFormulaManagerfManager
 
TTreeFormulafSelect
 
TSelectorDrawfSelector
 
TListfInput
 
Bool_t fForceDim
 
TEntryListfEntries
 
UInt_t fNRows
 
UInt_t fNColumns
 

#include <TTreeTableInterface.h>

+ Inheritance diagram for TTreeTableInterface:
+ Collaboration diagram for TTreeTableInterface:

Constructor & Destructor Documentation

TTreeTableInterface::TTreeTableInterface ( TTree tree = 0,
const char *  varexp = 0,
const char *  selection = 0,
Option_t option = 0,
Long64_t  nentries = 0,
Long64_t  firstentry = 0 
)
TTreeTableInterface::~TTreeTableInterface ( )
virtual

TTreeTableInterface destructor.

Definition at line 92 of file TTreeTableInterface.cxx.

Member Function Documentation

void TTreeTableInterface::AddColumn ( const char *  expression,
UInt_t  position 
)
virtual

Add column according ot expression at position, TGTable->Update() is needed afterwards to apply the change to the TGTable.

Definition at line 386 of file TTreeTableInterface.cxx.

void TTreeTableInterface::AddColumn ( TTreeFormula formula,
UInt_t  position 
)
virtual

Add column with formula at position, TGTable->Update() is needed afterwards to apply the change to the TGTable.

Definition at line 410 of file TTreeTableInterface.cxx.

const char * TTreeTableInterface::GetColumnHeader ( UInt_t  column)
virtual

Return a string to use as a label for columnheader at column.

Implements TVirtualTableInterface.

Definition at line 354 of file TTreeTableInterface.cxx.

virtual TEntryList* TTreeTableInterface::GetEntryList ( )
inlinevirtual

Definition at line 62 of file TTreeTableInterface.h.

UInt_t TTreeTableInterface::GetNColumns ( )
virtual

Return the amount of column available.

Implements TVirtualTableInterface.

Definition at line 368 of file TTreeTableInterface.cxx.

UInt_t TTreeTableInterface::GetNRows ( )
virtual

Return the amount of rows in the Tree.

Implements TVirtualTableInterface.

Definition at line 376 of file TTreeTableInterface.cxx.

const char * TTreeTableInterface::GetRowHeader ( UInt_t  row)
virtual

Return a string to use as a label for rowheader at column.

Implements TVirtualTableInterface.

Definition at line 341 of file TTreeTableInterface.cxx.

Double_t TTreeTableInterface::GetValue ( UInt_t  row,
UInt_t  column 
)
virtual

Return the value of row,column.

If the position does not exist or does not contain a number, 0 is returned.

Implements TVirtualTableInterface.

Definition at line 272 of file TTreeTableInterface.cxx.

const char * TTreeTableInterface::GetValueAsString ( UInt_t  row,
UInt_t  column 
)
virtual

Return the content of row,column as string to use in a TGTableCell label.

Implements TVirtualTableInterface.

Definition at line 308 of file TTreeTableInterface.cxx.

void TTreeTableInterface::InitEntries ( )
private

Initialise the TEntryList with the entries that match the selection criterium.

Definition at line 207 of file TTreeTableInterface.cxx.

Referenced by SetSelection().

void TTreeTableInterface::RemoveColumn ( UInt_t  position)
virtual

Remove column at position, TGTable->Update() is needed afterwards to apply the change to the TGTable.

Definition at line 429 of file TTreeTableInterface.cxx.

void TTreeTableInterface::SetEntryList ( TEntryList entrylist = 0)
virtual

Set the currently active entrylist.

Definition at line 476 of file TTreeTableInterface.cxx.

Referenced by InitEntries().

void TTreeTableInterface::SetFormula ( TTreeFormula formula,
UInt_t  position 
)
virtual

Set the TTreeFormula of position to formula.

Definition at line 453 of file TTreeTableInterface.cxx.

void TTreeTableInterface::SetSelection ( const char *  selection)
virtual

Set the selection expression.

Definition at line 146 of file TTreeTableInterface.cxx.

void TTreeTableInterface::SetVariablesExpression ( const char *  varexp)
private

Compile the variables expression from the given varexp.

Definition at line 106 of file TTreeTableInterface.cxx.

void TTreeTableInterface::SyncFormulas ( )
private

Sync the formulas using the TTreeFormulaManager.

Definition at line 173 of file TTreeTableInterface.cxx.

Referenced by SetSelection().

Member Data Documentation

TEntryList* TTreeTableInterface::fEntries
private

Definition at line 40 of file TTreeTableInterface.h.

Referenced by GetEntryList(), SetEntryList(), and ~TTreeTableInterface().

Long64_t TTreeTableInterface::fEntry
private

Definition at line 32 of file TTreeTableInterface.h.

Long64_t TTreeTableInterface::fFirstEntry
private

Definition at line 34 of file TTreeTableInterface.h.

Referenced by InitEntries().

Bool_t TTreeTableInterface::fForceDim
private

Definition at line 39 of file TTreeTableInterface.h.

Referenced by InitEntries(), and SyncFormulas().

TList* TTreeTableInterface::fFormulas
private

Definition at line 31 of file TTreeTableInterface.h.

Referenced by ~TTreeTableInterface().

TList* TTreeTableInterface::fInput
private

Definition at line 38 of file TTreeTableInterface.h.

Referenced by ~TTreeTableInterface().

TTreeFormulaManager* TTreeTableInterface::fManager
private

Definition at line 35 of file TTreeTableInterface.h.

UInt_t TTreeTableInterface::fNColumns
private

Definition at line 42 of file TTreeTableInterface.h.

Referenced by GetNColumns(), InitEntries(), and SetVariablesExpression().

Long64_t TTreeTableInterface::fNEntries
private

Definition at line 33 of file TTreeTableInterface.h.

Referenced by InitEntries().

UInt_t TTreeTableInterface::fNRows
private

Definition at line 41 of file TTreeTableInterface.h.

Referenced by GetNRows().

TTreeFormula* TTreeTableInterface::fSelect
private

Definition at line 36 of file TTreeTableInterface.h.

Referenced by SetSelection().

TSelectorDraw* TTreeTableInterface::fSelector
private

Definition at line 37 of file TTreeTableInterface.h.

Referenced by ~TTreeTableInterface().

TTree* TTreeTableInterface::fTree
private

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