]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCBenchmark.h
26136cea1c7536acdb9684231824c98f4a8fdfd2
[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
22 class AliHLTTPCBenchmark  {
23
24 public:
25   /** standard constructor */
26   AliHLTTPCBenchmark();
27   /** destructor */
28   virtual ~AliHLTTPCBenchmark();
29    Int_t      GetBench(const Char_t *name);
30    void       Start(const Char_t *name);
31    void       Stop(const char *name);
32    void       Analyze(const Char_t* name);
33    
34    static Double_t GetCpuTime();
35
36 private:
37   /** copy constructor prohibited */
38   AliHLTTPCBenchmark(const AliHLTTPCBenchmark&);
39   /** assignment operator prohibited */
40   AliHLTTPCBenchmark& operator=(const AliHLTTPCBenchmark&);
41
42    Int_t      fNbench;          //Number of active benchmarks
43    Int_t      fNmax;            //Maximum number of benchmarks initialized
44 #ifndef no_root
45    TString    *fNames;          //! Names of benchmarks
46    TStopwatch *fTimer;          //! Timers
47 #else
48    Char_t **fNames;             //! Names of benchmarks
49    AliHLTTPCStopwatch *fTimer;  //! Timers
50 #endif
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
55
56    ClassDef(AliHLTTPCBenchmark,0)  //HLTTPC benchmark
57 };
58
59 #endif // ALIHLTTPCBENCHMARK_H