]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCBenchmark.h
Bogdan: new version of MUON visualization.
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCBenchmark.h
1 // @(#) $Id$
2 // Original: AliHLTBenchmark.h,v 1.6 2004/06/26 11:39:40 loizides 
3
4 #ifndef ALIHLTTPCBENCHMARK_H
5 #define ALIHLTTPCBENCHMARK_H
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 #include "AliHLTLogging.h"
22
23 class AliHLTTPCBenchmark : public AliHLTLogging {
24
25 public:
26   /** standard constructor */
27   AliHLTTPCBenchmark();
28   /** not a valid copy constructor, defined according to effective C++ style */
29   AliHLTTPCBenchmark(const AliHLTTPCBenchmark&);
30   /** not a valid assignment op, but defined according to effective C++ style */
31   AliHLTTPCBenchmark& operator=(const AliHLTTPCBenchmark&);
32   /** destructor */
33   virtual ~AliHLTTPCBenchmark();
34    Int_t      GetBench(const Char_t *name);
35    void       Start(const Char_t *name);
36    void       Stop(const char *name);
37    void       Analyze(const Char_t* name);
38    
39    static Double_t GetCpuTime();
40
41 private:
42
43    Int_t      fNbench;          //Number of active benchmarks
44    Int_t      fNmax;            //Maximum number of benchmarks initialized
45 #ifndef no_root
46    TString    *fNames;          //! Names of benchmarks
47    TStopwatch *fTimer;          //! Timers
48 #else
49    Char_t **fNames;             //! Names of benchmarks
50    AliHLTTPCStopwatch *fTimer;  //! Timers
51 #endif
52    Float_t    *fSum;  //! sum of time
53    Float_t    *fMin;  //! min of time
54    Float_t    *fMax;  //! max of time
55    Int_t      *fCount;//! counter
56
57    ClassDef(AliHLTTPCBenchmark,0)  //HLTTPC benchmark
58 };
59
60 #endif // ALIHLTTPCBENCHMARK_H