Logo ROOT   6.14/05
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 //////////////////////////////////////////////////////////////////////////
18 // //
19 // TMemStatShow //
20 // //
21 // class to visualize the results of TMemStat //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TObject.h"
26 
27 class TTree;
28 class TH1D;
29 class TH1I;
30 class TGToolTip;
31 class TObjArray;
32 class TCanvas;
33 
34 class TMemStatShow : public TObject {
35 
36 protected:
37  static TTree *fgT; //TMemStat Tree
38  static TH1D *fgHalloc; //histogram with allocations
39  static TH1D *fgHfree; //histogram with frees
40  static TH1D *fgH; //histogram with allocations - frees
41  static TH1I *fgHleaks; //histogram with leaks
42  static TH1I *fgHentry; //histogram with entry numbers in the TObjArray
43  static TH1I *fgHdiff; //histogram with diff of entry number between alloc/free
44 
45  static TGToolTip *fgTip1; //pointer to tool tip for canvas 1
46  static TGToolTip *fgTip2; //pointer to tool tip for canvas 2
47  static TObjArray *fgBtidlist; //list of back trace ids
48  static Double_t *fgV1; //pointer to V1 array of TTree::Draw (pos)
49  static Double_t *fgV2; //pointer to V2 array of TTree::Draw (nbytes)
50  static Double_t *fgV3; //pointer to V3 array of TTree::Draw (time)
51  static Double_t *fgV4; //pointer to V4 array of TTree::Draw (btid)
52  static TCanvas *fgC1; //pointer to canvas showing allocs/deallocs vs time
53  static TCanvas *fgC2; //pointer to canvas with leaks in decreasing order
54  static TCanvas *fgC3; //pointer to canvas showing the main leaks
55 
56  static Long64_t fgAddressFirst; //first address to process
57  static Long64_t fgAddressN; //number of addresses in bytes to process
58  static Long64_t fgEntryFirst; //first entry to process
59  static Long64_t fgEntryN; //number of entries to process
60 
61 public:
63  virtual ~TMemStatShow() {;}
64  static void EventInfo1(Int_t event, Int_t px, Int_t py, TObject *selected);
65  static void EventInfo2(Int_t event, Int_t px, Int_t py, TObject *selected);
66  static void FillBTString(Int_t bin, Int_t mode, TString &btstring);
67 
68  static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0);
69  static void SetEntryRange(Long64_t nentries=0, Long64_t first=0);
70  static void Show(Double_t update=0.1, Int_t nbigleaks=20, const char* fname="*");
71 
72  ClassDef(TMemStatShow,0) //class to visualize the results of TMemStat
73 };
74 
75 #endif
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 ...
static Double_t * fgV1
Definition: TMemStatShow.h:48
An array of TObjects.
Definition: TObjArray.h:37
static Long64_t fgEntryN
Definition: TMemStatShow.h:59
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...
long long Long64_t
Definition: RtypesCore.h:69
static TObjArray * fgBtidlist
Definition: TMemStatShow.h:47
static TH1D * fgH
Definition: TMemStatShow.h:40
static TGToolTip * fgTip2
Definition: TMemStatShow.h:46
static TCanvas * fgC3
Definition: TMemStatShow.h:54
Basic string class.
Definition: TString.h:131
int Int_t
Definition: RtypesCore.h:41
static void SetEntryRange(Long64_t nentries=0, Long64_t first=0)
Specify a range of entries to process (static function)
static Long64_t fgAddressN
Definition: TMemStatShow.h:57
static Double_t * fgV3
Definition: TMemStatShow.h:50
static TCanvas * fgC2
Definition: TMemStatShow.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:320
static TH1I * fgHentry
Definition: TMemStatShow.h:42
static TCanvas * fgC1
Definition: TMemStatShow.h:52
static Long64_t fgEntryFirst
Definition: TMemStatShow.h:58
static TH1I * fgHdiff
Definition: TMemStatShow.h:43
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.
static TH1D * fgHalloc
Definition: TMemStatShow.h:38
Utility class post-processing the file generated by TMemStat (default memstat.root) ...
Definition: TMemStatShow.h:34
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:526
static TH1I * fgHleaks
Definition: TMemStatShow.h:41
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
static Double_t * fgV4
Definition: TMemStatShow.h:51
static TH1D * fgHfree
Definition: TMemStatShow.h:39
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:610
The Canvas class.
Definition: TCanvas.h:31
static TTree * fgT
Definition: TMemStatShow.h:37
double Double_t
Definition: RtypesCore.h:55
virtual ~TMemStatShow()
Definition: TMemStatShow.h:63
static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0)
Specify a memory address range to process (static function).
static Double_t * fgV2
Definition: TMemStatShow.h:49
int nentries
Definition: THbookFile.cxx:89
static Long64_t fgAddressFirst
Definition: TMemStatShow.h:56
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.
Mother of all ROOT objects.
Definition: TObject.h:37
A TTree object has a header with a name and a title.
Definition: TTree.h:70
Definition: first.py:1
static TGToolTip * fgTip1
Definition: TMemStatShow.h:45