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