From ac8cd48de69ceb35a55fd455bac2d8c8a1ca4f09 Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 21 Mar 2003 13:15:40 +0000 Subject: [PATCH] AliPHOSMemoryWatcher moved to STEER and renamed as AliMemoryWatcher --- PHOS/PHOSLinkDef.h | 1 - PHOS/libPHOS.pkg | 3 +-- .../AliMemoryWatcher.cxx | 24 +++++++++---------- .../AliMemoryWatcher.h | 20 ++++++++-------- STEER/STEERLinkDef.h | 1 + STEER/libSTEER.pkg | 3 ++- 6 files changed, 26 insertions(+), 26 deletions(-) rename PHOS/AliPHOSMemoryWatcher.cxx => STEER/AliMemoryWatcher.cxx (92%) rename PHOS/AliPHOSMemoryWatcher.h => STEER/AliMemoryWatcher.h (84%) diff --git a/PHOS/PHOSLinkDef.h b/PHOS/PHOSLinkDef.h index 57989cc2bb2..acbd677d491 100644 --- a/PHOS/PHOSLinkDef.h +++ b/PHOS/PHOSLinkDef.h @@ -51,7 +51,6 @@ #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+; diff --git a/PHOS/libPHOS.pkg b/PHOS/libPHOS.pkg index acedb33d535..c5dda75b997 100644 --- a/PHOS/libPHOS.pkg +++ b/PHOS/libPHOS.pkg @@ -21,7 +21,7 @@ SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSv2.cxx \ 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\ @@ -35,4 +35,3 @@ DHDR= PHOSLinkDef.h - diff --git a/PHOS/AliPHOSMemoryWatcher.cxx b/STEER/AliMemoryWatcher.cxx similarity index 92% rename from PHOS/AliPHOSMemoryWatcher.cxx rename to STEER/AliMemoryWatcher.cxx index 15e94276a70..7134d17903d 100644 --- a/PHOS/AliPHOSMemoryWatcher.cxx +++ b/STEER/AliMemoryWatcher.cxx @@ -17,7 +17,7 @@ //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 ) // { @@ -45,17 +45,17 @@ // --- 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; @@ -70,7 +70,7 @@ AliPHOSMemoryWatcher::AliPHOSMemoryWatcher(UInt_t maxsize) fTimer=0; } //_____________________________________________________________________________ -AliPHOSMemoryWatcher::AliPHOSMemoryWatcher(AliPHOSMemoryWatcher& mw) +AliMemoryWatcher::AliMemoryWatcher(AliMemoryWatcher& mw) { //copy ctor fMAXSIZE = mw.fMAXSIZE ; @@ -85,7 +85,7 @@ AliPHOSMemoryWatcher::AliPHOSMemoryWatcher(AliPHOSMemoryWatcher& mw) fTimer=0; } //_____________________________________________________________________________ -AliPHOSMemoryWatcher::~AliPHOSMemoryWatcher() +AliMemoryWatcher::~AliMemoryWatcher() { // dtor delete[] fVSIZE; @@ -95,7 +95,7 @@ AliPHOSMemoryWatcher::~AliPHOSMemoryWatcher() 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 ) { @@ -128,7 +128,7 @@ void AliPHOSMemoryWatcher::Watch(Int_t x) } //_____________________________________________________________________________ TGraph* -AliPHOSMemoryWatcher::GraphVSIZE(void) +AliMemoryWatcher::GraphVSIZE(void) { // Fills the graph with the virtual memory sized used TGraph* g = 0; @@ -144,7 +144,7 @@ AliPHOSMemoryWatcher::GraphVSIZE(void) } //_____________________________________________________________________________ TGraph* -AliPHOSMemoryWatcher::GraphRSSIZE(void) +AliMemoryWatcher::GraphRSSIZE(void) { // Fills the graph with the real memory sized used TGraph* g = 0; @@ -160,7 +160,7 @@ AliPHOSMemoryWatcher::GraphRSSIZE(void) } //_____________________________________________________________________________ TGraph* -AliPHOSMemoryWatcher::GraphTIME(void) +AliMemoryWatcher::GraphTIME(void) { // Fills the raph with the used CPU time TGraph* g = 0; @@ -176,7 +176,7 @@ AliPHOSMemoryWatcher::GraphTIME(void) } //_____________________________________________________________________________ TH2* -AliPHOSMemoryWatcher::Frame(void) const +AliMemoryWatcher::Frame(void) const { //creates the frame histo in which the graphs will be plotted Double_t xmin=1E30; @@ -197,7 +197,7 @@ AliPHOSMemoryWatcher::Frame(void) const } //_____________________________________________________________________________ void -AliPHOSMemoryWatcher::Write(void) +AliMemoryWatcher::Write(void) { // Stores the graphs in a file if ( GraphVSIZE() ) GraphVSIZE()->Write("VSIZE",TObject::kOverwrite); diff --git a/PHOS/AliPHOSMemoryWatcher.h b/STEER/AliMemoryWatcher.h similarity index 84% rename from PHOS/AliPHOSMemoryWatcher.h rename to STEER/AliMemoryWatcher.h index eb6d0536304..45d065f95cc 100644 --- a/PHOS/AliPHOSMemoryWatcher.h +++ b/STEER/AliMemoryWatcher.h @@ -1,5 +1,5 @@ -#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$ */ @@ -8,7 +8,7 @@ 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 ) { @@ -40,16 +40,16 @@ 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; } @@ -62,7 +62,7 @@ public: 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 .....") @@ -75,7 +75,7 @@ private: 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 diff --git a/STEER/STEERLinkDef.h b/STEER/STEERLinkDef.h index 4b0039bf9a4..8f5e33b6959 100644 --- a/STEER/STEERLinkDef.h +++ b/STEER/STEERLinkDef.h @@ -62,6 +62,7 @@ #pragma link C++ class AliTrackMap+; #pragma link C++ class AliTrackMapper+; #pragma link C++ class AliCollisionGeometry+; +#pragma link C++ class AliMemoryWatcher+; #endif diff --git a/STEER/libSTEER.pkg b/STEER/libSTEER.pkg index fa685fd2b89..dc2db5b5794 100644 --- a/STEER/libSTEER.pkg +++ b/STEER/libSTEER.pkg @@ -14,7 +14,8 @@ AliGenEventHeader.cxx AliStack.cxx AliConfig.cxx \ 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) -- 2.31.1