Parallel/vtkThreadSafeLog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00037 #ifndef __vtkThreadSafeLog_h
00038 #define __vtkThreadSafeLog_h
00039
00040 #include "vtkObject.h"
00041
00042 #define VTK_THREAD_SAFE_LOG_MAX 1000
00043
00044 class VTK_PARALLEL_EXPORT vtkThreadSafeLog : public vtkObject
00045 {
00046 public:
00047 static vtkThreadSafeLog *New();
00048 vtkTypeRevisionMacro(vtkThreadSafeLog, vtkObject);
00049 virtual void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00053 void StartTimer() { this->Timer->StartTimer();}
00054 void StopTimer() { this->Timer->StopTimer();}
00055 double GetElapsedTime() { return this->Timer->GetElapsedTime();}
00057
00059 void AddEntry(char *tag, float value);
00060
00064 void DumpLog(char *filename, int mode = ios::out);
00065
00066 protected:
00067
00068 vtkThreadSafeLog();
00069 ~vtkThreadSafeLog();
00070
00071
00072 char *Tags[VTK_THREAD_SAFE_LOG_MAX];
00073 float Values[VTK_THREAD_SAFE_LOG_MAX];
00074 int NumberOfEntries;
00075
00076 vtkTimerLog *Timer;
00077 private:
00078 vtkThreadSafeLog(const vtkThreadSafeLog&);
00079 void operator=(const vtkThreadSafeLog&);
00080 };
00081
00082
00083
00084 #endif