Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TBenchmark.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/base:$Id$
0002 // Author: Rene Brun   12/12/94
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 // ---------------------------------- Benchmark.h
0012 
0013 #ifndef ROOT_TBenchmark
0014 #define ROOT_TBenchmark
0015 
0016 
0017 
0018 //////////////////////////////////////////////////////////////////////////
0019 //                                                                      //
0020 // TBenchmark                                                           //
0021 //                                                                      //
0022 // This class is a ROOT utility to help benchmarking applications       //
0023 //                                                                      //
0024 //////////////////////////////////////////////////////////////////////////
0025 
0026 #include "TNamed.h"
0027 #include "TStopwatch.h"
0028 
0029 class TBenchmark : public TNamed {
0030 
0031 protected:
0032 
0033    Int_t      fNbench;          // Number of active benchmarks
0034    Int_t      fNmax;            // Maximum number of benchmarks initialized
0035    TString    *fNames;          //[fNbench] Names of benchmarks
0036    Float_t    *fRealTime;       //[fNbench] Real Time
0037    Float_t    *fCpuTime;        //[fNbench] Cpu Time
0038    TStopwatch *fTimer;          // Timers
0039 
0040    TBenchmark(const TBenchmark&);
0041    TBenchmark& operator=(const TBenchmark&);
0042 
0043 public:
0044    TBenchmark();
0045    virtual            ~TBenchmark();
0046    Int_t              GetBench(const char *name) const;
0047    Float_t            GetCpuTime(const char *name);
0048    Float_t            GetRealTime(const char *name);
0049    void               Print(Option_t *name="") const override;
0050    virtual void       Reset();
0051    virtual void       Show(const char *name);
0052    virtual void       Start(const char *name);
0053    virtual void       Stop(const char *name);
0054    virtual void       Summary(Float_t &rt, Float_t &cp);
0055 
0056    ClassDefOverride(TBenchmark,0)  //ROOT utility to help benchmarking applications
0057 };
0058 
0059 R__EXTERN TBenchmark  *gBenchmark;
0060 
0061 #endif