Logo ROOT  
Reference Guide
TMemStatShow.h
Go to the documentation of this file.
1 // @(#)root/treeviewer:$Id$
2 // Author: Rene Brun 21/09/2010
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2010, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TMemStatShow
13 #define ROOT_TMemStatShow
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TMemStatShow //
18 // //
19 // class to visualize the results of TMemStat //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TObject.h"
24 
25 class TTree;
26 class TH1D;
27 class TH1I;
28 class TGToolTip;
29 class TObjArray;
30 class TCanvas;
31 
32 class TMemStatShow : public TObject {
33 
34 protected:
35  static TTree *fgT; //TMemStat Tree
36  static TH1D *fgHalloc; //histogram with allocations
37  static TH1D *fgHfree; //histogram with frees
38  static TH1D *fgH; //histogram with allocations - frees
39  static TH1I *fgHleaks; //histogram with leaks
40  static TH1I *fgHentry; //histogram with entry numbers in the TObjArray
41  static TH1I *fgHdiff; //histogram with diff of entry number between alloc/free
42 
43  static TGToolTip *fgTip1; //pointer to tool tip for canvas 1
44  static TGToolTip *fgTip2; //pointer to tool tip for canvas 2
45  static TObjArray *fgBtidlist; //list of back trace ids
46  static Double_t *fgV1; //pointer to V1 array of TTree::Draw (pos)
47  static Double_t *fgV2; //pointer to V2 array of TTree::Draw (nbytes)
48  static Double_t *fgV3; //pointer to V3 array of TTree::Draw (time)
49  static Double_t *fgV4; //pointer to V4 array of TTree::Draw (btid)
50  static TCanvas *fgC1; //pointer to canvas showing allocs/deallocs vs time
51  static TCanvas *fgC2; //pointer to canvas with leaks in decreasing order
52  static TCanvas *fgC3; //pointer to canvas showing the main leaks
53 
54  static Long64_t fgAddressFirst; //first address to process
55  static Long64_t fgAddressN; //number of addresses in bytes to process
56  static Long64_t fgEntryFirst; //first entry to process
57  static Long64_t fgEntryN; //number of entries to process
58 
59 public:
61  virtual ~TMemStatShow() {;}
62  static void EventInfo1(Int_t event, Int_t px, Int_t py, TObject *selected);
63  static void EventInfo2(Int_t event, Int_t px, Int_t py, TObject *selected);
64  static void FillBTString(Int_t bin, Int_t mode, TString &btstring);
65 
66  static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0);
67  static void SetEntryRange(Long64_t nentries=0, Long64_t first=0);
68  static void Show(Double_t update=0.1, Int_t nbigleaks=20, const char* fname="*");
69 
70  ClassDef(TMemStatShow,0) //class to visualize the results of TMemStat
71 };
72 
73 #endif
TMemStatShow::SetAddressRange
static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0)
Specify a memory address range to process (static function).
Definition: TMemStatShow.cxx:141
first
Definition: first.py:1
TMemStatShow::fgHalloc
static TH1D * fgHalloc
Definition: TMemStatShow.h:36
TObjArray
Definition: TObjArray.h:37
TMemStatShow::fgTip1
static TGToolTip * fgTip1
Definition: TMemStatShow.h:43
TMemStatShow::EventInfo2
static void EventInfo2(Int_t event, Int_t px, Int_t py, TObject *selected)
Static: draw the tooltip showing the backtrace for the histogram of leaks.
Definition: TMemStatShow.cxx:588
TH1I
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:531
TMemStatShow::EventInfo1
static void EventInfo1(Int_t event, Int_t px, Int_t py, TObject *selected)
Static: draw the tooltip showing the backtrace for the allocatios histogram.
Definition: TMemStatShow.cxx:539
TMemStatShow::fgTip2
static TGToolTip * fgTip2
Definition: TMemStatShow.h:44
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TTree
Definition: TTree.h:79
TH1D
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:615
TMemStatShow::fgEntryN
static Long64_t fgEntryN
Definition: TMemStatShow.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TMemStatShow::fgC1
static TCanvas * fgC1
Definition: TMemStatShow.h:50
TGToolTip
Definition: TGToolTip.h:35
nentries
int nentries
Definition: THbookFile.cxx:91
TMemStatShow::fgHdiff
static TH1I * fgHdiff
Definition: TMemStatShow.h:41
TMemStatShow::FillBTString
static void FillBTString(Int_t bin, Int_t mode, TString &btstring)
Static: fill btstring with the traceback corresponding to entry in T btstring must be initialized in ...
Definition: TMemStatShow.cxx:615
TMemStatShow::fgH
static TH1D * fgH
Definition: TMemStatShow.h:38
TString
Definition: TString.h:136
TMemStatShow::SetEntryRange
static void SetEntryRange(Long64_t nentries=0, Long64_t first=0)
Specify a range of entries to process (static function)
Definition: TMemStatShow.cxx:155
TMemStatShow::fgC3
static TCanvas * fgC3
Definition: TMemStatShow.h:52
update
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
Definition: RooAdaptiveGaussKronrodIntegrator1D.cxx:652
TMemStatShow::Show
static void Show(Double_t update=0.1, Int_t nbigleaks=20, const char *fname="*")
Function called by TMemStat::Show Open the memstat data file, then call TTree::Draw to precompute the...
Definition: TMemStatShow.cxx:172
TMemStatShow::fgV4
static Double_t * fgV4
Definition: TMemStatShow.h:49
TMemStatShow::TMemStatShow
TMemStatShow()
Definition: TMemStatShow.h:60
TMemStatShow::fgHentry
static TH1I * fgHentry
Definition: TMemStatShow.h:40
TMemStatShow::fgEntryFirst
static Long64_t fgEntryFirst
Definition: TMemStatShow.h:56
TMemStatShow::~TMemStatShow
virtual ~TMemStatShow()
Definition: TMemStatShow.h:61
TMemStatShow
Definition: TMemStatShow.h:32
TMemStatShow::fgC2
static TCanvas * fgC2
Definition: TMemStatShow.h:51
TMemStatShow::fgAddressFirst
static Long64_t fgAddressFirst
Definition: TMemStatShow.h:54
TMemStatShow::fgBtidlist
static TObjArray * fgBtidlist
Definition: TMemStatShow.h:45
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject.h
TCanvas
Definition: TCanvas.h:23
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMemStatShow::fgV1
static Double_t * fgV1
Definition: TMemStatShow.h:46
TMemStatShow::fgV3
static Double_t * fgV3
Definition: TMemStatShow.h:48
TMemStatShow::fgAddressN
static Long64_t fgAddressN
Definition: TMemStatShow.h:55
TMemStatShow::fgHleaks
static TH1I * fgHleaks
Definition: TMemStatShow.h:39
TMemStatShow::fgV2
static Double_t * fgV2
Definition: TMemStatShow.h:47
TMemStatShow::fgHfree
static TH1D * fgHfree
Definition: TMemStatShow.h:37
TMemStatShow::fgT
static TTree * fgT
Definition: TMemStatShow.h:35