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
25class TTree;
26class TH1D;
27class TH1I;
28class TGToolTip;
29class TObjArray;
30class TCanvas;
31
32class TMemStatShow : public TObject {
33
34protected:
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
59public:
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);
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
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
int Int_t
Definition: RtypesCore.h:43
double Double_t
Definition: RtypesCore.h:57
long long Long64_t
Definition: RtypesCore.h:71
#define ClassDef(name, id)
Definition: Rtypes.h:322
int nentries
Definition: THbookFile.cxx:89
The Canvas class.
Definition: TCanvas.h:27
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:614
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:530
Utility class post-processing the file generated by TMemStat (default memstat.root)
Definition: TMemStatShow.h:32
static TCanvas * fgC3
Definition: TMemStatShow.h:52
static TCanvas * fgC2
Definition: TMemStatShow.h:51
static TH1D * fgHalloc
Definition: TMemStatShow.h:36
static TCanvas * fgC1
Definition: TMemStatShow.h:50
static TH1I * fgHdiff
Definition: TMemStatShow.h:41
static TH1I * fgHentry
Definition: TMemStatShow.h:40
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 TTree * fgT
Definition: TMemStatShow.h:35
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 * fgHfree
Definition: TMemStatShow.h:37
static TGToolTip * fgTip2
Definition: TMemStatShow.h:44
static Double_t * fgV4
Definition: TMemStatShow.h:49
static Double_t * fgV1
Definition: TMemStatShow.h:46
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.
static TH1I * fgHleaks
Definition: TMemStatShow.h:39
static Double_t * fgV3
Definition: TMemStatShow.h:48
static Long64_t fgAddressN
Definition: TMemStatShow.h:55
static TObjArray * fgBtidlist
Definition: TMemStatShow.h:45
static void SetEntryRange(Long64_t nentries=0, Long64_t first=0)
Specify a range of entries to process (static function)
virtual ~TMemStatShow()
Definition: TMemStatShow.h:61
static Long64_t fgEntryFirst
Definition: TMemStatShow.h:56
static Double_t * fgV2
Definition: TMemStatShow.h:47
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...
static TH1D * fgH
Definition: TMemStatShow.h:38
static TGToolTip * fgTip1
Definition: TMemStatShow.h:43
static Long64_t fgEntryN
Definition: TMemStatShow.h:57
static Long64_t fgAddressFirst
Definition: TMemStatShow.h:54
static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0)
Specify a memory address range to process (static function).
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
A TTree represents a columnar dataset.
Definition: TTree.h:78
Definition: first.py:1