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 25 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 TEntryList * | GetEntryList () |
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 () |
virtual const char * | GetColumnHeader (UInt_t column)=0 |
virtual UInt_t | GetNColumns ()=0 |
virtual UInt_t | GetNRows ()=0 |
virtual const char * | GetRowHeader (UInt_t row)=0 |
virtual Double_t | GetValue (UInt_t row, UInt_t column)=0 |
virtual const char * | GetValueAsString (UInt_t row, UInt_t column)=0 |
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 | |
TEntryList * | fEntries |
Long64_t | fEntry |
Long64_t | fFirstEntry |
Bool_t | fForceDim |
TList * | fFormulas |
TList * | fInput |
TTreeFormulaManager * | fManager |
UInt_t | fNColumns |
Long64_t | fNEntries |
UInt_t | fNRows |
TTreeFormula * | fSelect |
TSelectorDraw * | fSelector |
TTree * | fTree |
#include <TTreeTableInterface.h>
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.
|
virtual |
TTreeTableInterface destructor.
Definition at line 92 of file TTreeTableInterface.cxx.
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.
|
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.
|
virtual |
Return a string to use as a label for columnheader at column.
Implements TVirtualTableInterface.
Definition at line 354 of file TTreeTableInterface.cxx.
|
inlinevirtual |
Definition at line 60 of file TTreeTableInterface.h.
|
virtual |
Return the amount of column available.
Implements TVirtualTableInterface.
Definition at line 368 of file TTreeTableInterface.cxx.
|
virtual |
Return the amount of rows in the Tree.
Implements TVirtualTableInterface.
Definition at line 376 of file TTreeTableInterface.cxx.
|
virtual |
Return a string to use as a label for rowheader at column.
Implements TVirtualTableInterface.
Definition at line 341 of file TTreeTableInterface.cxx.
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.
Return the content of row,column as string to use in a TGTableCell label.
Implements TVirtualTableInterface.
Definition at line 308 of file TTreeTableInterface.cxx.
|
private |
Initialise the TEntryList with the entries that match the selection criterium.
Definition at line 207 of file TTreeTableInterface.cxx.
Remove column at position, TGTable->Update() is needed afterwards to apply the change to the TGTable.
Definition at line 429 of file TTreeTableInterface.cxx.
|
virtual |
Set the currently active entrylist.
Definition at line 476 of file TTreeTableInterface.cxx.
|
virtual |
Set the TTreeFormula of position to formula.
Definition at line 453 of file TTreeTableInterface.cxx.
|
virtual |
Set the selection expression.
Definition at line 146 of file TTreeTableInterface.cxx.
|
private |
Compile the variables expression from the given varexp.
Definition at line 106 of file TTreeTableInterface.cxx.
|
private |
Sync the formulas using the TTreeFormulaManager.
Definition at line 173 of file TTreeTableInterface.cxx.
|
private |
Definition at line 38 of file TTreeTableInterface.h.
|
private |
Definition at line 30 of file TTreeTableInterface.h.
|
private |
Definition at line 32 of file TTreeTableInterface.h.
|
private |
Definition at line 37 of file TTreeTableInterface.h.
|
private |
Definition at line 29 of file TTreeTableInterface.h.
|
private |
Definition at line 36 of file TTreeTableInterface.h.
|
private |
Definition at line 33 of file TTreeTableInterface.h.
|
private |
Definition at line 40 of file TTreeTableInterface.h.
|
private |
Definition at line 31 of file TTreeTableInterface.h.
|
private |
Definition at line 39 of file TTreeTableInterface.h.
|
private |
Definition at line 34 of file TTreeTableInterface.h.
|
private |
Definition at line 35 of file TTreeTableInterface.h.
|
private |
Definition at line 28 of file TTreeTableInterface.h.