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