]>
Commit | Line | Data |
---|---|---|
a6c02c85 | 1 | // @(#) $Id$ |
4aa41877 | 2 | // Original: AliHLTBenchmark.h,v 1.6 2004/06/26 11:39:40 loizides |
a6c02c85 | 3 | |
2a083ac4 | 4 | #ifndef ALIHLTTPCBENCHMARK_H |
5 | #define ALIHLTTPCBENCHMARK_H | |
a6c02c85 | 6 | |
7 | //_____________________________________________________________ | |
8 | // | |
9 | // AliHLTTPCBenchmark | |
10 | // | |
11 | // Benchmark class for level3 code | |
12 | // | |
13 | // | |
14 | ||
15 | #ifndef no_root | |
16 | class TStopwatch; | |
17 | class TString; | |
18 | #else | |
19 | class AliHLTTPCStopwatch; | |
20 | #endif | |
21 | ||
8f8bf0af | 22 | class AliHLTTPCBenchmark { |
a6c02c85 | 23 | |
24 | public: | |
600e6a1b | 25 | /** standard constructor */ |
26 | AliHLTTPCBenchmark(); | |
600e6a1b | 27 | /** destructor */ |
28 | virtual ~AliHLTTPCBenchmark(); | |
29 | Int_t GetBench(const Char_t *name); | |
30 | void Start(const Char_t *name); | |
a6c02c85 | 31 | void Stop(const char *name); |
600e6a1b | 32 | void Analyze(const Char_t* name); |
a6c02c85 | 33 | |
34 | static Double_t GetCpuTime(); | |
35 | ||
36 | private: | |
8f8bf0af | 37 | /** copy constructor prohibited */ |
38 | AliHLTTPCBenchmark(const AliHLTTPCBenchmark&); | |
39 | /** assignment operator prohibited */ | |
40 | AliHLTTPCBenchmark& operator=(const AliHLTTPCBenchmark&); | |
a6c02c85 | 41 | |
42 | Int_t fNbench; //Number of active benchmarks | |
43 | Int_t fNmax; //Maximum number of benchmarks initialized | |
44 | #ifndef no_root | |
2a083ac4 | 45 | TString *fNames; //! Names of benchmarks |
46 | TStopwatch *fTimer; //! Timers | |
a6c02c85 | 47 | #else |
2a083ac4 | 48 | Char_t **fNames; //! Names of benchmarks |
49 | AliHLTTPCStopwatch *fTimer; //! Timers | |
a6c02c85 | 50 | #endif |
2a083ac4 | 51 | Float_t *fSum; //! sum of time |
52 | Float_t *fMin; //! min of time | |
53 | Float_t *fMax; //! max of time | |
54 | Int_t *fCount;//! counter | |
a6c02c85 | 55 | |
56 | ClassDef(AliHLTTPCBenchmark,0) //HLTTPC benchmark | |
57 | }; | |
58 | ||
2a083ac4 | 59 | #endif // ALIHLTTPCBENCHMARK_H |