Logo ROOT  
Reference Guide
TGTreeTable.cxx
Go to the documentation of this file.
1// Author: Roel Aaij 30/08/2007
2
3/*************************************************************************
4 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#include "TGTable.h"
12#include "TClass.h"
13#include "TGWindow.h"
14#include "TGResourcePool.h"
15#include "Riostream.h"
16#include "TSystem.h"
17#include "TImage.h"
18#include "TGToolTip.h"
19#include "TGPicture.h"
20#include "TRandom3.h"
21#include "TTreeTableInterface.h"
22#include "TGTreeTable.h"
23
25
26/** \class TGTreeTable
27
28TGTreeTable is a TGTable that owns it's own interface.
29It can be used to view a TTree. If an expression is given to the
30constructor, it will be used to define the columns. A selection can
31also be given. This selection is applied to the TTree as a
32TEntryList. See the documentation of TGTable for more information
33
34The interface is accesible after the creation through the
35GetInterface() method.
36*/
37
38////////////////////////////////////////////////////////////////////////////////
39/// TGTreeTable constructor.
40
42 const char *expression, const char *selection,
43 const char *option, UInt_t nrows, UInt_t ncolumns)
44 : TGTable(p, id, 0, nrows, ncolumns)
45{
46 TTreeTableInterface *iface = new TTreeTableInterface(tree, expression,
47 selection, option);
48 SetInterface(iface, nrows, ncolumns);
49 Update();
50}
51
52////////////////////////////////////////////////////////////////////////////////
53/// TGTreeTable destructor.
54
56{
57 //FIXME this causes a double delete segfault, why???
58// delete fInterface;
59}
60
#define ClassImp(name)
Definition: Rtypes.h:361
XFontStruct * id
Definition: TGX11.cxx:108
virtual void SetInterface(TVirtualTableInterface *interface, UInt_t nrows=50, UInt_t ncolumns=20)
Set the interface that the TGTable uses to interface.
Definition: TGTable.cxx:683
virtual void Update()
Update the range of the available data and refresh the current view.
Definition: TGTable.cxx:1544
TGTreeTable is a TGTable that owns it's own interface.
Definition: TGTreeTable.h:18
TGTreeTable(TGWindow *p=0, Int_t id=-1, TTree *tree=0, const char *expression=0, const char *selection=0, const char *option=0, UInt_t nrows=50, UInt_t ncolumns=10)
TGTreeTable constructor.
Definition: TGTreeTable.cxx:41
~TGTreeTable()
TGTreeTable destructor.
Definition: TGTreeTable.cxx:55
TTreeTableInterface is used to interface to data that is stored in a TTree.
A TTree represents a columnar dataset.
Definition: TTree.h:78
Definition: tree.py:1