ROOT logo
#ifndef ALISYSINFO_H
#define ALISYSINFO_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

//-------------------------------------------------------------------------
// This is the class which is to be used during the writing of
// simulated raw data (DDL files format).
// It is using the root functionality in order to deal correctly
// with little/big endian issue. By convention the detector raw
// data payload is stored always with little endian (this corresponds
// to the real life situation when the detector data is coming from
// the hardware).
//-------------------------------------------------------------------------

#include <TObject.h>
class TStopwatch;
class TTree;
class TMemStatManager;
using std::fstream;

class AliSysInfo : public TObject {
public:
  AliSysInfo();
  static AliSysInfo * Instance();
  static void AddStamp(const char *sname, Int_t id0=-1, Int_t id1=-1, Int_t id2=-1, Int_t id3=-1);
  static TTree * MakeTree(const char *lname);
  static void OpenMemStat();
  static void CloseMemStat();
  static Bool_t Contain(const char * str1, const char * str2);
  typedef void (*StampCallback_t)(const Char_t * desription);
  static  void AddCallBack(StampCallback_t callback);
  //
  // Object size function
  static Double_t EstimateObjectSize(TObject* object);
  static  TTree* Test();
  
  static void SetVerbose(Bool_t v=kFALSE)   {fgVerbose = v;}
  static Bool_t GetVerbose()                {return fgVerbose;} 

private:
  AliSysInfo(const AliSysInfo& source);
  AliSysInfo& operator= (const AliSysInfo& rec);

  fstream         *fSysWatch;       // system watch - Memory and CPU usage 
  TStopwatch      *fTimer;          // timer
  TMemStatManager *fMemStat;      
  static AliSysInfo *   fInstance; //instance pointer
  StampCallback_t *fCallBackFunc; // call back functions
  Int_t           fNCallBack;        // number of call back functions
  static Bool_t   fgVerbose;      // do we want actually to write the stamps ?
  ClassDef(AliSysInfo,0)
};

#endif
 AliSysInfo.h:1
 AliSysInfo.h:2
 AliSysInfo.h:3
 AliSysInfo.h:4
 AliSysInfo.h:5
 AliSysInfo.h:6
 AliSysInfo.h:7
 AliSysInfo.h:8
 AliSysInfo.h:9
 AliSysInfo.h:10
 AliSysInfo.h:11
 AliSysInfo.h:12
 AliSysInfo.h:13
 AliSysInfo.h:14
 AliSysInfo.h:15
 AliSysInfo.h:16
 AliSysInfo.h:17
 AliSysInfo.h:18
 AliSysInfo.h:19
 AliSysInfo.h:20
 AliSysInfo.h:21
 AliSysInfo.h:22
 AliSysInfo.h:23
 AliSysInfo.h:24
 AliSysInfo.h:25
 AliSysInfo.h:26
 AliSysInfo.h:27
 AliSysInfo.h:28
 AliSysInfo.h:29
 AliSysInfo.h:30
 AliSysInfo.h:31
 AliSysInfo.h:32
 AliSysInfo.h:33
 AliSysInfo.h:34
 AliSysInfo.h:35
 AliSysInfo.h:36
 AliSysInfo.h:37
 AliSysInfo.h:38
 AliSysInfo.h:39
 AliSysInfo.h:40
 AliSysInfo.h:41
 AliSysInfo.h:42
 AliSysInfo.h:43
 AliSysInfo.h:44
 AliSysInfo.h:45
 AliSysInfo.h:46
 AliSysInfo.h:47
 AliSysInfo.h:48
 AliSysInfo.h:49
 AliSysInfo.h:50
 AliSysInfo.h:51
 AliSysInfo.h:52
 AliSysInfo.h:53
 AliSysInfo.h:54
 AliSysInfo.h:55