]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Benchmark.h
Changes for independant library of standalone l3 code. Most of them are by having...
[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 <string.h>
10 #include "AliL3RootTypes.h"
11 #include "AliL3Stopwatch.h"
12 #endif
13
14 class AliL3Benchmark {
15
16 private:
17
18    Int_t      fNbench;          //Number of active benchmarks
19    Int_t      fNmax;            //Maximum number of benchmarks initialized
20 #ifndef no_root
21    TString    *fNames;          //Names of benchmarks
22    TStopwatch *fTimer;          //Timers
23 #else
24    Char_t **fNames;
25    AliL3Stopwatch *fTimer;
26 #endif
27    Float_t    *fSum;
28    Float_t    *fMin;
29    Float_t    *fMax;
30    Int_t      *fCount;
31    //TStopwatch *fStopwatch;    //Stopwatch
32
33 public:
34    AliL3Benchmark();
35    virtual ~AliL3Benchmark();
36    Int_t      GetBench(const char *name);
37    void       Start(const char *name);
38    void       Stop(const char *name);
39    void       Analyze(const char* name);
40    
41    static Double_t GetCpuTime();
42    
43    ClassDef(AliL3Benchmark,0)  //L3 benchmark
44 };
45
46 #endif