]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/STEERBase/AliSysInfo.h
speed up with binary search
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliSysInfo.h
CommitLineData
0e8bc704 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 */
5
6//-------------------------------------------------------------------------
7// This is the class which is to be used during the writing of
8// simulated raw data (DDL files format).
9// It is using the root functionality in order to deal correctly
10// with little/big endian issue. By convention the detector raw
11// data payload is stored always with little endian (this corresponds
12// to the real life situation when the detector data is coming from
13// the hardware).
14//-------------------------------------------------------------------------
15
16#include <TObject.h>
17class TStopwatch;
18class TTree;
6efecea1 19class TMemStatManager;
66b0310c 20using std::fstream;
0e8bc704 21
22class AliSysInfo : public TObject {
23public:
24 AliSysInfo();
25 static AliSysInfo * Instance();
02098121 26 static void AddStamp(const char *sname, Int_t id0=-1, Int_t id1=-1, Int_t id2=-1, Int_t id3=-1);
0e8bc704 27 static TTree * MakeTree(const char *lname);
6efecea1 28 static void OpenMemStat();
29 static void CloseMemStat();
30 static Bool_t Contain(const char * str1, const char * str2);
d1d8b044 31 typedef void (*StampCallback_t)(const Char_t * desription);
32 static void AddCallBack(StampCallback_t callback);
cd507f9c 33 //
34 // Object size function
35 static Double_t EstimateObjectSize(TObject* object);
ab557934 36 static TTree* Test();
1ce2c63c 37
38 static void SetVerbose(Bool_t v=kFALSE) {fgVerbose = v;}
39 static Bool_t GetVerbose() {return fgVerbose;}
40
0e8bc704 41private:
42 AliSysInfo(const AliSysInfo& source);
43 AliSysInfo& operator= (const AliSysInfo& rec);
44
6efecea1 45 fstream *fSysWatch; // system watch - Memory and CPU usage
46 TStopwatch *fTimer; // timer
47 TMemStatManager *fMemStat;
0e8bc704 48 static AliSysInfo * fInstance; //instance pointer
d1d8b044 49 StampCallback_t *fCallBackFunc; // call back functions
50 Int_t fNCallBack; // number of call back functions
1ce2c63c 51 static Bool_t fgVerbose; // do we want actually to write the stamps ?
0e8bc704 52 ClassDef(AliSysInfo,0)
53};
54
55#endif