#pragma link C++ class AliPHOSClusterizerv2+;
#pragma link C++ class AliPHOSEvalRecPoint+;
#pragma link C++ class AliPHOSPIDv1+;
-#pragma link C++ class AliPHOSMemoryWatcher+;
#pragma link C++ class AliPHOSRaw2Digits+;
#pragma link C++ class AliPHOSBeamTestEvent+;
#pragma link C++ class AliPHOSCalibrManager+;
AliPHOSQAObjectCheckable.cxx AliPHOSQAChecker.cxx AliPHOSQAMeanChecker.cxx AliPHOSQAAlarm.cxx \
AliPHOSIhepAnalyze.cxx AliPHOSEvalRecPoint.cxx \
AliPHOSRecManager.cxx AliPHOSRecCpvManager.cxx AliPHOSRecEmcManager.cxx \
- AliPHOSClusterizerv2.cxx AliPHOSPIDv1.cxx AliPHOSMemoryWatcher.cxx \
+ AliPHOSClusterizerv2.cxx AliPHOSPIDv1.cxx \
AliPHOSRaw2Digits.cxx AliPHOSBeamTestEvent.cxx \
AliPHOSCalibrManager.cxx \
AliPHOSConTableDB.cxx AliPHOSCalibrator.cxx\
-
//Basic Memory Leak utility.
// You can use this tiny class to *see* if your program is leaking.
// Usage:
-// AliPHOSMemoryWatcher memwatcher;
+// AliMemoryWatcher memwatcher;
// some program loop on events here {
// if ( nevents % x == 0 )
// {
// --- std system ---
class assert ;
// --- AliRoot header files ---
-#include "AliPHOSMemoryWatcher.h"
+#include "AliMemoryWatcher.h"
// --- ROOT system ---
#include "TSystem.h"
#include "TGraph.h"
#include "TH2.h"
#include "TStopwatch.h"
-ClassImp(AliPHOSMemoryWatcher)
+ClassImp(AliMemoryWatcher)
//_____________________________________________________________________________
-AliPHOSMemoryWatcher::AliPHOSMemoryWatcher(UInt_t maxsize)
+AliMemoryWatcher::AliMemoryWatcher(UInt_t maxsize)
{
//ctor
fMAXSIZE=maxsize;
fTimer=0;
}
//_____________________________________________________________________________
-AliPHOSMemoryWatcher::AliPHOSMemoryWatcher(AliPHOSMemoryWatcher& mw)
+AliMemoryWatcher::AliMemoryWatcher(AliMemoryWatcher& mw)
{
//copy ctor
fMAXSIZE = mw.fMAXSIZE ;
fTimer=0;
}
//_____________________________________________________________________________
-AliPHOSMemoryWatcher::~AliPHOSMemoryWatcher()
+AliMemoryWatcher::~AliMemoryWatcher()
{
// dtor
delete[] fVSIZE;
delete fTimer;
}
//_____________________________________________________________________________
-void AliPHOSMemoryWatcher::Watch(Int_t x)
+void AliMemoryWatcher::Watch(Int_t x)
{
// Sets the point where CPU parameters have to be monitored
if ( !fDisabled && fSize < fMAXSIZE ) {
}
//_____________________________________________________________________________
TGraph*
-AliPHOSMemoryWatcher::GraphVSIZE(void)
+AliMemoryWatcher::GraphVSIZE(void)
{
// Fills the graph with the virtual memory sized used
TGraph* g = 0;
}
//_____________________________________________________________________________
TGraph*
-AliPHOSMemoryWatcher::GraphRSSIZE(void)
+AliMemoryWatcher::GraphRSSIZE(void)
{
// Fills the graph with the real memory sized used
TGraph* g = 0;
}
//_____________________________________________________________________________
TGraph*
-AliPHOSMemoryWatcher::GraphTIME(void)
+AliMemoryWatcher::GraphTIME(void)
{
// Fills the raph with the used CPU time
TGraph* g = 0;
}
//_____________________________________________________________________________
TH2*
-AliPHOSMemoryWatcher::Frame(void) const
+AliMemoryWatcher::Frame(void) const
{
//creates the frame histo in which the graphs will be plotted
Double_t xmin=1E30;
}
//_____________________________________________________________________________
void
-AliPHOSMemoryWatcher::Write(void)
+AliMemoryWatcher::Write(void)
{
// Stores the graphs in a file
if ( GraphVSIZE() ) GraphVSIZE()->Write("VSIZE",TObject::kOverwrite);
-#ifndef AliPHOSMEMORYWATCHER_H
-#define AliPHOSMEMORYWATCHER_H
+#ifndef ALIMEMORYWATCHER_H
+#define ALIMEMORYWATCHER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
You can use this tiny class to *see* if your program is leaking.
Usage:
- AliPHOSMemoryWatcher memwatcher;
+ AliMemoryWatcher memwatcher;
some program loop on events here {
if ( nevents % x == 0 )
{
class TH2;
class TGraph;
class TStopwatch;
-class AliPHOSMemoryWatcher : public TObject
+class AliMemoryWatcher : public TObject
{
public:
- AliPHOSMemoryWatcher(UInt_t maxsize=10000);
- AliPHOSMemoryWatcher(AliPHOSMemoryWatcher& mw);
- AliPHOSMemoryWatcher(const AliPHOSMemoryWatcher & watcher) {
+ AliMemoryWatcher(UInt_t maxsize=10000);
+ AliMemoryWatcher(AliMemoryWatcher& mw);
+ AliMemoryWatcher(const AliMemoryWatcher & watcher) {
// copy ctor: no implementation yet
Fatal("cpy ctor", "not implemented") ;
}
- ~AliPHOSMemoryWatcher() ;
+ ~AliMemoryWatcher() ;
void Watch(Int_t x);
UInt_t Size(void) const { return fSize; }
TGraph* GraphTIME(void);
TH2* Frame(void) const ;
void Write(void);
- AliPHOSMemoryWatcher & operator = (const AliPHOSMemoryWatcher &) { return *this; }
+ AliMemoryWatcher & operator = (const AliMemoryWatcher &) { return *this; }
private:
Int_t fPID; // PID of the process to watch
char fCmd[1024]; // the command sent to the system to retrieve things ("ps .....")
TStopwatch* fTimer; // the chronometer
Bool_t fDisabled; // to switch on/off the monitoring
- ClassDef(AliPHOSMemoryWatcher,1) // General purpose memory watcher
+ ClassDef(AliMemoryWatcher,1) // General purpose memory watcher
} ;
#endif
#pragma link C++ class AliTrackMap+;
#pragma link C++ class AliTrackMapper+;
#pragma link C++ class AliCollisionGeometry+;
+#pragma link C++ class AliMemoryWatcher+;
#endif
AliRunDigitizer.cxx AliDigitizer.cxx AliStream.cxx \
AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \
AliGausCorr.cxx AliTrackReference.cxx AliESD.cxx \
-AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx
+AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \
+AliMemoryWatcher.cxx
HDRS:= $(SRCS:.cxx=.h)