class AliPHOSMemoryWatcher : public TObject
{
public:
- AliPHOSMemoryWatcher(unsigned int maxsize=10000);
- ~AliPHOSMemoryWatcher();
- void watch(int x);
+ AliPHOSMemoryWatcher(UInt_t maxsize=10000);
+ AliPHOSMemoryWatcher(AliPHOSMemoryWatcher& mw);
+ AliPHOSMemoryWatcher(const AliPHOSMemoryWatcher & watcher) {
+ // copy ctor: no implementation yet
+ Fatal("cpy ctor", "not implemented") ;
+ }
+ ~AliPHOSMemoryWatcher() ;
+ void Watch(Int_t x);
- unsigned int size(void) const { return fSize; }
- int X(int n) const { return fX[n]; }
- int VSIZE(int n) const { return fVSIZE[n]; }
- int RSSIZE(int n) const { return fRSSIZE[n]; }
- double TIME(int n) const { return fTIME[n]; }
- TGraph* graphVSIZE(void);
- TGraph* graphRSSIZE(void);
- TGraph* graphTIME(void);
- TH2* frame(void);
- void write(void);
+ UInt_t Size(void) const { return fSize; }
+ Int_t X(Int_t n) const { return fX[n]; }
+ Int_t VSIZE(Int_t n) const { return fVSIZE[n]; }
+ Int_t RSSIZE(Int_t n) const { return fRSSIZE[n]; }
+ Double_t TIME(Int_t n) const { return fTIME[n]; }
+ TGraph* GraphVSIZE(void);
+ TGraph* GraphRSSIZE(void);
+ TGraph* GraphTIME(void);
+ TH2* Frame(void) const ;
+ void Write(void);
+ AliPHOSMemoryWatcher & operator = (const AliPHOSMemoryWatcher &) { return *this; }
private:
- int fPID;
- char fCmd[1024];
- unsigned int fMAXSIZE;
- unsigned int fSize;
- int* fX;
- int* fVSIZE;
- int* fRSSIZE;
- double* fTIME;
- TStopwatch* fTimer;
- bool fDisabled;
+ Int_t fPID; // PID of the process to watch
+ char fCmd[1024]; // the command sent to the system to retrieve things ("ps .....")
+ UInt_t fMAXSIZE; // maximum size of arrays where the informationis stored
+ UInt_t fSize; // the requested size of information to be retrieved
+ Int_t* fX; // array that contains the step numbers
+ Int_t* fVSIZE; // array that contains the virtual memory at each step
+ Int_t* fRSSIZE; // array that contains the real memory at each step
+ Double_t* fTIME; // array that contains the CPU time at each step
+ TStopwatch* fTimer; // the chronometer
+ Bool_t fDisabled; // to switch on/off the monitoring
+
+ ClassDef(AliPHOSMemoryWatcher,1) // General purpose memory watcher
+
} ;
-#endif
\ No newline at end of file
+#endif