Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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:
60  TMemStatShow() {;}
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