StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMemStat.h
1 
10 /***************************************************************************
11  *
12  * $Id: StMemStat.h,v 1.6 2019/07/22 18:27:12 smirnovd Exp $
13  *
14  * Author: Victor Perev, Jul 2000
15  **************************************************************************/
16 #ifndef StMemStat_h
17 #define StMemStat_h
18 
19 #include <map>
20 
21 #include "TNamed.h"
22 
23 class TList;
24 
25 class StMemStat :public TNamed {
26 public:
27  StMemStat(const char *name=0);
28  ~StMemStat();
29  void Start();
30  void Stop();
31  virtual void Print(const char *tit="") const;
32 
33  //static methods
34 
35  static Double_t Used();
36  static Double_t Free();
37  static Double_t ProgSize();
38  static void PrintMem(std::string prefix="");
40  static std::string AsString(std::string prefix="");
42 
43  static void PM();
44  static void Summary();
45  static void doPs(std::string who, std::string where);
46 
49  static void SaveProcStatus(std::string callerId);
50 
51  private:
52  Double_t fLast;
53  Double_t fMin;
54  Double_t fAver;
55  Double_t fMax;
56  Double_t fRms;
57  Int_t fTally;
58 
59  static Double_t fgUsed;
60  static TList *fgList;
61 
63  typedef std::map<std::string, double> ProcStatusMap_t;
64  typedef ProcStatusMap_t::value_type ProcStatus_t;
65 
67  static ProcStatusMap_t ReadProcStatus();
68 
69  ClassDef(StMemStat,0)
70 };
71 
72 #endif
static void Summary()
Definition: StMemStat.cxx:87
static std::string AsString(std::string prefix="")
Returns a string with memory utilization estimates for the current process.
Definition: StMemStat.cxx:218
static Double_t Free()
Definition: StMemStat.cxx:149
static Double_t Used()
Definition: StMemStat.cxx:142
static void PrintMem(std::string prefix="")
Definition: StMemStat.cxx:212
static void PM()
Definition: StMemStat.cxx:231
static void SaveProcStatus(std::string callerId)
Definition: StMemStat.cxx:281
static Double_t ProgSize()
Definition: StMemStat.cxx:157