Logo ROOT   6.16/01
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 "TEnv.h"
19#include "TGToolTip.h"
20#include "TGPicture.h"
21#include "TRandom3.h"
22#include "TTreeTableInterface.h"
23#include "TGTreeTable.h"
24
26
27/** \class TGTreeTable
28
29TGTreeTable is a TGTable that owns it's own interface.
30It can be used to view a TTree. If an expression is given to the
31constructor, it will be used to define the columns. A selection can
32also be given. This selection is applied to the TTree as a
33TEntryList. See the documentation of TGTable for more information
34
35The interface is accesible after the creation through the
36GetInterface() method.
37*/
38
39////////////////////////////////////////////////////////////////////////////////
40/// TGTreeTable constructor.
41
43 const char *expression, const char *selection,
44 const char *option, UInt_t nrows, UInt_t ncolumns)
45 : TGTable(p, id, 0, nrows, ncolumns)
46{
47 TTreeTableInterface *iface = new TTreeTableInterface(tree, expression,
48 selection, option);
49 SetInterface(iface, nrows, ncolumns);
50 Update();
51}
52
53////////////////////////////////////////////////////////////////////////////////
54/// TGTreeTable destructor.
55
57{
58 //FIXME this causes a double delete segfault, why???
59// delete fInterface;
60}
61
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
#define ClassImp(name)
Definition: Rtypes.h:363
virtual void SetInterface(TVirtualTableInterface *interface, UInt_t nrows=50, UInt_t ncolumns=20)
virtual void Update()
TGTreeTable is a TGTable that owns it's own interface.
Definition: TGTreeTable.h:19
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:42
~TGTreeTable()
TGTreeTable destructor.
Definition: TGTreeTable.cxx:56
TTreeTableInterface is used to interface to data that is stored in a TTree.
A TTree object has a header with a name and a title.
Definition: TTree.h:71
Definition: tree.py:1