Logo ROOT   6.08/07
Reference Guide
List of all members | 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)
 TTreeTableInterface constructor. More...
 
virtual ~TTreeTableInterface ()
 TTreeTableInterface destructor. More...
 
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 const char * GetColumnHeader (UInt_t column)
 Return a string to use as a label for columnheader at column. More...
 
virtual TEntryListGetEntryList ()
 
virtual UInt_t GetNColumns ()
 Return the amount of column available. More...
 
virtual UInt_t GetNRows ()
 Return the amount of rows in the Tree. More...
 
virtual const char * GetRowHeader (UInt_t row)
 Return a string to use as a label for rowheader at column. 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 void RemoveColumn (UInt_t position)
 Remove column at position, TGTable->Update() is needed afterwards to apply the change to the TGTable. More...
 
virtual void SetEntryList (TEntryList *entrylist=0)
 Set the currently active entrylist. 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...
 
- Public Member Functions inherited from TVirtualTableInterface
 TVirtualTableInterface ()
 
virtual ~TVirtualTableInterface ()
 

Private Member Functions

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

Private Attributes

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

#include <TTreeTableInterface.h>

Inheritance diagram for TTreeTableInterface:
[legend]

Constructor & Destructor Documentation

◆ TTreeTableInterface()

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 constructor.

Definition at line 49 of file TTreeTableInterface.cxx.

◆ ~TTreeTableInterface()

TTreeTableInterface::~TTreeTableInterface ( )
virtual

TTreeTableInterface destructor.

Definition at line 92 of file TTreeTableInterface.cxx.

Member Function Documentation

◆ AddColumn() [1/2]

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.

◆ AddColumn() [2/2]

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.

◆ GetColumnHeader()

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.

◆ GetEntryList()

virtual TEntryList* TTreeTableInterface::GetEntryList ( )
inlinevirtual

Definition at line 62 of file TTreeTableInterface.h.

◆ GetNColumns()

UInt_t TTreeTableInterface::GetNColumns ( )
virtual

Return the amount of column available.

Implements TVirtualTableInterface.

Definition at line 368 of file TTreeTableInterface.cxx.

◆ GetNRows()

UInt_t TTreeTableInterface::GetNRows ( )
virtual

Return the amount of rows in the Tree.

Implements TVirtualTableInterface.

Definition at line 376 of file TTreeTableInterface.cxx.

◆ GetRowHeader()

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.

◆ GetValue()

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.

◆ GetValueAsString()

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.

◆ InitEntries()

void TTreeTableInterface::InitEntries ( )
private

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

Definition at line 207 of file TTreeTableInterface.cxx.

◆ RemoveColumn()

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.

◆ SetEntryList()

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

Set the currently active entrylist.

Definition at line 476 of file TTreeTableInterface.cxx.

◆ SetFormula()

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

Set the TTreeFormula of position to formula.

Definition at line 453 of file TTreeTableInterface.cxx.

◆ SetSelection()

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

Set the selection expression.

Definition at line 146 of file TTreeTableInterface.cxx.

◆ SetVariablesExpression()

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

Compile the variables expression from the given varexp.

Definition at line 106 of file TTreeTableInterface.cxx.

◆ SyncFormulas()

void TTreeTableInterface::SyncFormulas ( )
private

Sync the formulas using the TTreeFormulaManager.

Definition at line 173 of file TTreeTableInterface.cxx.

Member Data Documentation

◆ fEntries

TEntryList* TTreeTableInterface::fEntries
private

Definition at line 40 of file TTreeTableInterface.h.

◆ fEntry

Long64_t TTreeTableInterface::fEntry
private

Definition at line 32 of file TTreeTableInterface.h.

◆ fFirstEntry

Long64_t TTreeTableInterface::fFirstEntry
private

Definition at line 34 of file TTreeTableInterface.h.

◆ fForceDim

Bool_t TTreeTableInterface::fForceDim
private

Definition at line 39 of file TTreeTableInterface.h.

◆ fFormulas

TList* TTreeTableInterface::fFormulas
private

Definition at line 31 of file TTreeTableInterface.h.

◆ fInput

TList* TTreeTableInterface::fInput
private

Definition at line 38 of file TTreeTableInterface.h.

◆ fManager

TTreeFormulaManager* TTreeTableInterface::fManager
private

Definition at line 35 of file TTreeTableInterface.h.

◆ fNColumns

UInt_t TTreeTableInterface::fNColumns
private

Definition at line 42 of file TTreeTableInterface.h.

◆ fNEntries

Long64_t TTreeTableInterface::fNEntries
private

Definition at line 33 of file TTreeTableInterface.h.

◆ fNRows

UInt_t TTreeTableInterface::fNRows
private

Definition at line 41 of file TTreeTableInterface.h.

◆ fSelect

TTreeFormula* TTreeTableInterface::fSelect
private

Definition at line 36 of file TTreeTableInterface.h.

◆ fSelector

TSelectorDraw* TTreeTableInterface::fSelector
private

Definition at line 37 of file TTreeTableInterface.h.

◆ fTree

TTree* TTreeTableInterface::fTree
private

Definition at line 30 of file TTreeTableInterface.h.


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