dox/Parallel/vtkThreadSafeLog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00021
#ifndef __vtkThreadSafeLog_h
00022
#define __vtkThreadSafeLog_h
00023
00024
#include "vtkObject.h"
00025
00026
00027 #define VTK_THREAD_SAFE_LOG_MAX 1000
00028
00029 class VTK_PARALLEL_EXPORT vtkThreadSafeLog :
public vtkObject
00030 {
00031
public:
00032
static vtkThreadSafeLog *
New();
00033 vtkTypeRevisionMacro(vtkThreadSafeLog,
vtkObject);
00034
virtual void PrintSelf(ostream& os,
vtkIndent indent);
00035
00037
00038
void StartTimer();
00039
void StopTimer();
00040
double GetElapsedTime();
00042
00044
void AddEntry(
char *tag,
float value);
00045
00047
00050
void DumpLog(
char *filename,
int mode);
00051
void DumpLog(
char *filename);
00053
00054
protected:
00055
00056 vtkThreadSafeLog();
00057 ~vtkThreadSafeLog();
00058
00059
00060 char *Tags[
VTK_THREAD_SAFE_LOG_MAX];
00061 float Values[
VTK_THREAD_SAFE_LOG_MAX];
00062 int NumberOfEntries;
00063
00064 vtkTimerLog *Timer;
00065
private:
00066 vtkThreadSafeLog(
const vtkThreadSafeLog&);
00067
void operator=(
const vtkThreadSafeLog&);
00068 };
00069
00070
00071
00072
#endif