TMemStatShow.h

Go to the documentation of this file.
00001 // @(#)root/treeviewer:$Id: TMemStatShow.h 37300 2010-12-05 17:25:20Z brun $
00002 // Author: Rene Brun   21/09/2010
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2010, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TMemStatShow
00013 #define ROOT_TMemStatShow
00014 
00015 
00016 
00017 //////////////////////////////////////////////////////////////////////////
00018 //                                                                      //
00019 // TMemStatShow                                                         //
00020 //                                                                      //
00021 // class to visualize the results of TMemStat                           //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 
00029 class TTree;
00030 class TH1D;
00031 class TH1I;
00032 class TGToolTip;
00033 class TObjArray;
00034 class TCanvas;
00035 
00036 class TMemStatShow : public TObject {
00037    
00038 protected:
00039    static TTree     *fgT;        //TMemStat Tree
00040    static TH1D      *fgHalloc;   //histogram with allocations
00041    static TH1D      *fgHfree;    //histogram with frees
00042    static TH1D      *fgH;        //histogram with allocations - frees
00043    static TH1I      *fgHleaks;   //histogram with leaks
00044    static TH1I      *fgHentry;   //histogram with entry numbers in the TObjArray
00045    static TH1I      *fgHdiff;    //histogram with diff of entry number between alloc/free
00046    
00047    static TGToolTip *fgTip1;     //pointer to tool tip for canvas 1
00048    static TGToolTip *fgTip2;     //pointer to tool tip for canvas 2
00049    static TObjArray *fgBtidlist; //list of back trace ids
00050    static Double_t  *fgV1;       //pointer to V1 array of TTree::Draw (pos)
00051    static Double_t  *fgV2;       //pointer to V2 array of TTree::Draw (nbytes)
00052    static Double_t  *fgV3;       //pointer to V3 array of TTree::Draw (time)
00053    static Double_t  *fgV4;       //pointer to V4 array of TTree::Draw (btid)
00054    static TCanvas   *fgC1;       //pointer to canvas showing allocs/deallocs vs time
00055    static TCanvas   *fgC2;       //pointer to canvas with leaks in decreasing order
00056    static TCanvas   *fgC3;       //pointer to canvas showing the main leaks
00057    
00058    static Long64_t fgAddressFirst; //first address to process
00059    static Long64_t fgAddressN;     //number of addresses in bytes to process
00060    static Long64_t fgEntryFirst;   //first entry to process
00061    static Long64_t fgEntryN;       //number of entries to process
00062 
00063 public:
00064    TMemStatShow() {;}
00065    virtual   ~TMemStatShow() {;}
00066    static void EventInfo1(Int_t event, Int_t px, Int_t py, TObject *selected);
00067    static void EventInfo2(Int_t event, Int_t px, Int_t py, TObject *selected);
00068    static void FillBTString(Int_t bin, Int_t mode, TString &btstring);
00069    
00070    static void SetAddressRange(Long64_t nbytes=0, Long64_t first=0);
00071    static void SetEntryRange(Long64_t nentries=0, Long64_t first=0);
00072    static void Show(Double_t update=0.1, Int_t nbigleaks=20, const char* fname="*");
00073 
00074    ClassDef(TMemStatShow,0)  //class to visualize the results of TMemStat 
00075 };
00076 
00077 #endif

Generated on Tue Jul 5 14:27:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1