AliRoot Core  ee782a0 (ee782a0)
Go to the documentation of this file.
1 #ifndef ALISYSINFO_H
2 #define ALISYSINFO_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
7 #include <TObject.h>
8 class TStopwatch;
9 class TTree;
10 class TMemStatManager;
11 using std::fstream;
13 class AliSysInfo : public TObject {
14 public:
15  AliSysInfo();
16  static AliSysInfo * Instance();
17  static void AddStamp(const char *sname, Int_t id0=-1, Int_t id1=-1, Int_t id2=-1, Int_t id3=-1);
18  static TTree * MakeTree(const char *lname, const char * fout=0);
19  static TTree * MakeDUTree(const char *lname, const char * fout);
20  static void OpenMemStat();
21  static void CloseMemStat();
22  static Bool_t Contain(const char * str1, const char * str2);
23  typedef void (*StampCallback_t)(const Char_t * desription);
24  static void AddCallBack(StampCallback_t callback);
25  //
26  // Object size function
27  static Double_t EstimateObjectSize(TObject* object);
28  static TTree* Test();
30  static void SetVerbose(Bool_t v=kFALSE) {fgVerbose = v;}
31  static Bool_t GetVerbose() {return fgVerbose;}
32  static void SetDisabled(Bool_t v=kTRUE) {fgDisabled = v; fgVerbose=kFALSE;}
33  static Bool_t IsDisabled() {return fgDisabled;}
34  static void PrintJiraTable(TTree * tree, const char *var, const char *cut, const char *format, const char *output="syswatch.table");
35 private:
36  AliSysInfo(const AliSysInfo& source);
39  fstream *fSysWatch; // system watch - Memory and CPU usage
40  TStopwatch *fTimer; // timer
41  TMemStatManager *fMemStat;
42  static AliSysInfo * fInstance; //instance pointer
43  StampCallback_t *fCallBackFunc; // call back functions
44  Int_t fNCallBack; // number of call back functions
45  static Bool_t fgVerbose; // do we want actually to write the stamps ?
46  static Bool_t fgDisabled; // do not even open the file
47  ClassDef(AliSysInfo,0)
48 };
50 #endif
static void SetDisabled(Bool_t v=kTRUE)
Definition: AliSysInfo.h:32
static Bool_t IsDisabled()
Definition: AliSysInfo.h:33
static void PrintJiraTable(TTree *tree, const char *var, const char *cut, const char *format, const char *output="syswatch.table")
Definition: AliSysInfo.cxx:383
void(* StampCallback_t)(const Char_t *desription)
Definition: AliSysInfo.h:23
static Bool_t fgDisabled
Definition: AliSysInfo.h:46
static void CloseMemStat()
Definition: AliSysInfo.cxx:303
static TTree * Test()
Definition: AliSysInfo.cxx:327
AliSysInfo & operator=(const AliSysInfo &rec)
static void OpenMemStat()
Definition: AliSysInfo.cxx:293
static TTree * MakeTree(const char *lname, const char *fout=0)
Definition: AliSysInfo.cxx:263
TMemStatManager * fMemStat
Definition: AliSysInfo.h:41
TTree * tree
static Double_t EstimateObjectSize(TObject *object)
Definition: AliSysInfo.cxx:366
StampCallback_t * fCallBackFunc
Definition: AliSysInfo.h:43
static Bool_t Contain(const char *str1, const char *str2)
Definition: AliSysInfo.cxx:283
TFile * fout
Definition: PlotSys.C:39
static Bool_t fgVerbose
Definition: AliSysInfo.h:45
void rec(const char *filename="raw.root")
Definition: rec.C:1
static void AddCallBack(StampCallback_t callback)
Definition: AliSysInfo.cxx:314
static void SetVerbose(Bool_t v=kFALSE)
Definition: AliSysInfo.h:30
fstream * fSysWatch
Definition: AliSysInfo.h:39
Int_t fNCallBack
Definition: AliSysInfo.h:44
static Bool_t GetVerbose()
Definition: AliSysInfo.h:31
static AliSysInfo * Instance()
Definition: AliSysInfo.cxx:168
static AliSysInfo * fInstance
Definition: AliSysInfo.h:42
TStopwatch * fTimer
Definition: AliSysInfo.h:40
static void AddStamp(const char *sname, Int_t id0=-1, Int_t id1=-1, Int_t id2=-1, Int_t id3=-1)
Definition: AliSysInfo.cxx:179
TCut cut
Definition: MakeGlobalFit.C:75
static TTree * MakeDUTree(const char *lname, const char *fout)
Definition: AliSysInfo.cxx:408