]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Benchmark.h
Moved from AliTransbit to AliL3Transbit.
[u/mrichter/AliRoot.git] / HLT / src / AliL3Benchmark.h
1 #ifndef AliL3_Benchmark
2 #define AliL3_Benchmark
3
4 #ifndef no_root
5 #include <Rtypes.h>
6 class TStopwatch;
7 class TString;
8 #else
9 #include "AliL3RootTypes.h"
10 #include "AliL3Stopwatch.h"
11 #endif
12
13 class AliL3Benchmark {
14
15 private:
16
17    Int_t      fNbench;          //Number of active benchmarks
18    Int_t      fNmax;            //Maximum number of benchmarks initialized
19 #ifndef no_root
20    TString    *fNames;          //Names of benchmarks
21    TStopwatch *fTimer;          //Timers
22 #else
23    Char_t **fNames;
24    AliL3Stopwatch *fTimer;
25 #endif
26    Float_t    *fSum;
27    Float_t    *fMin;
28    Float_t    *fMax;
29    Int_t      *fCount;
30    //TStopwatch *fStopwatch;    //Stopwatch
31
32 public:
33    AliL3Benchmark();
34    virtual ~AliL3Benchmark();
35    Int_t      GetBench(const char *name);
36    void       Start(const char *name);
37    void       Stop(const char *name);
38    void       Analyze(const char* name);
39    
40    static Double_t GetCpuTime();
41    
42    ClassDef(AliL3Benchmark,0)  //L3 benchmark
43 };
44
45 #endif