ROOT » TREE » TREEPLAYER » TTreeTableInterface

class TTreeTableInterface: public TVirtualTableInterface


TTreeTableInterface.

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.


Function Members (Methods)

public:
virtual~TTreeTableInterface()
virtual voidAddColumn(const char* expression, UInt_t position)
virtual voidAddColumn(TTreeFormula* formula, UInt_t position)
static TClass*Class()
virtual const char*GetColumnHeader(UInt_t column)
virtual TEntryList*GetEntryList()
virtual UInt_tGetNColumns()
virtual UInt_tGetNRows()
virtual const char*GetRowHeader(UInt_t row)
virtual Double_tGetValue(UInt_t row, UInt_t column)
virtual const char*GetValueAsString(UInt_t row, UInt_t column)
virtual TClass*IsA() const
TTreeTableInterface&operator=(const TTreeTableInterface&)
virtual voidRemoveColumn(UInt_t position)
virtual voidSetEntryList(TEntryList* entrylist = 0)
virtual voidSetFormula(TTreeFormula* formula, UInt_t position)
virtual voidSetSelection(const char* selection)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TTreeTableInterface(const 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)
private:
voidInitEntries()
voidSetVariablesExpression(const char* varexp)
voidSyncFormulas()

Data Members

private:
TEntryList*fEntriesCurrently active entries
Long64_tfEntryPresent entry number in fTree.
Long64_tfFirstEntryFirst entry.
Bool_tfForceDimForce dimension.
TList*fFormulasArray of TTreeFormulas to display values
TList*fInputUsed for fSelector.
TTreeFormulaManager*fManagerCoordinator for the formulas.
UInt_tfNColumnsAmount of columns in the data
Long64_tfNEntriesNumber of entries in the tree.
UInt_tfNRowsAmount of rows in the data
TTreeFormula*fSelectSelection condition
TSelectorDraw*fSelectorSelector
TTree*fTreeData in a TTree

Class Charts

Inheritance Chart:
TVirtualTableInterface
TTreeTableInterface

Function documentation

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.
~TTreeTableInterface()
 TTreeTableInterface destructor.
void SetVariablesExpression(const char* varexp)
 Compile the variables expression from the given varexp.
void SetSelection(const char* selection)
 Set the selection expression.
void SyncFormulas()
 Sync the formulas using the TTreeFormulaManager.
void InitEntries()
 Initialise the TEntryList with the entries that match the
 selection criterium.
Double_t GetValue(UInt_t row, UInt_t column)
 Return the value of row,column. If the position does not exist
 or does not contain a number, 0 is returned.
const char * GetValueAsString(UInt_t row, UInt_t column)
 Return the content of row,column as string to use in a
 TGTableCell label.
const char * GetRowHeader(UInt_t row)
 Return a string to use as a label for rowheader at column.
const char * GetColumnHeader(UInt_t column)
 Return a string to use as a label for columnheader at column.
UInt_t GetNColumns()
 Return the amount of column available.
UInt_t GetNRows()
 Return the amount of rows in the Tree.
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.
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.
void RemoveColumn(UInt_t position)
 Remove column at position, TGTable->Update() is needed
 afterwards to apply the change to the TGTable.
void SetFormula(TTreeFormula* formula, UInt_t position)
 Set the TTreeFormula of position to formula.
void SetEntryList(TEntryList* entrylist = 0)
 Set the currently active entrylist.
TTreeTableInterface(TTree* tree = 0, const char* varexp = 0, const char* selection = 0, Option_t* option = 0, Long64_t nentries = 0, Long64_t firstentry = 0)
TEntryList * GetEntryList()
{ return fEntries; }