library: libCore #include "TBenchmark.h"

# TBenchmark

class description - source file - inheritance tree (.pdf)

## class TBenchmark : public TNamed

| Inheritance Chart:

`TObject`

<-

`TNamed`

<-

`TBenchmark`

        public:

                          TBenchmark()
                          TBenchmark(const TBenchmark&)
                  virtual ~TBenchmark()
           static TClass* Class()
                    Int_t GetBench(const char* name) const
                  Float_t GetCpuTime(const char* name)
                  Float_t GetRealTime(const char* name)
          virtual TClass* IsA() const
              TBenchmark& operator=(const TBenchmark&)
             virtual void Print(Option_t* name = "") const
             virtual void Reset()
             virtual void Show(const char* name)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Start(const char* name)
             virtual void Stop(const char* name)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
             virtual void Summary(Float_t& rt, Float_t& cp)

### Data Members

        protected:

                Int_t fNbench    Number of active benchmarks
                Int_t fNmax      Maximum number of benchmarks initialized
             TString* fNames     [fNbench] Names of benchmarks
             Float_t* fRealTime  [fNbench] Real Time
             Float_t* fCpuTime   [fNbench] Cpu Time
          TStopwatch* fTimer     Timers

## Class Description

     This class is a ROOT utility to help benchmarking applications

      Examples of use of this class are given in the tutorials macros.

TBenchmark(): TNamed()

    *-*-*-*-*-*-*-*-*-*-*Benchmark default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  =============================

~TBenchmark()

    *-*-*-*-*-*-*-*-*-*-*Benchmark default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ============================

Int_t GetBench(const char *name) const

    *-*-*-*-*-*-*-*-*-*-*Returns index of Benchmark name*-*-*-*-*-*-*-*
    *-*                  ===============================

Float_t GetCpuTime(const char *name)

    *-*-*-*-*-*-*-*-*-*-*Returns Cpu time used by Benchmark name*-*-*-*-*-*-*-*
    *-*                  =======================================

Float_t GetRealTime(const char *name)

    *-*-*-*-*-*-*-*-*-*-*Returns Realtime used by Benchmark name*-*-*-*-*-*-*-*
    *-*                  =======================================

void Print(const char *name) const

    *-*-*-*-*-*-*-*-*-*-*Prints parameters of Benchmark name*-*-*-*-*-*-*-*-*-*
    *-*                  ===================================

void Reset()

    *-*-*-*-*-*-*-*-*-*-*-*-*-*Reset all Benchmarks*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                        ====================

void Show(const char *name)

    *-*-*-*-*-*-*-*-*Stops Benchmark name and Prints results*-*-*-*-*-*-*-*-*-*
    *-*              =======================================

void Start(const char *name)

    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*Starts Benchmark name*-*-*-*-*-*-*-*-*-*
    *-*                          =====================
    *-*
    *-*   An independent timer (see class TStopwatch) is started.
    *-*   the name of the benchmark is entered into the list of benchmarks.
    *-*   Benchmark can be stopped via TBenchmark::Stop
    *-*   Results can be printed via TBenchmark::Print
    *-*   TBenchmark::Show can be used to stop benchmark and print results.
    *-*   If name is an already existing benchmark, existing parameters are reset.
    *-*   A summary of all benchmarks can be seen via TBenchmark::Summary.
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Stop(const char *name)

    *-*-*-*-*-*-*-*-*-*-*Terminates Benchmark name*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  =========================

void Summary(Float_t &rt, Float_t &cp)

    *-*-*-*-*-*-*-*-*-*-*-*-*-*Prints a summary of all benchmarks*-*-*-*-*-*-*-*
    *-*                        ==================================

### Inline Functions

                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
             TBenchmark TBenchmark(const TBenchmark&)
            TBenchmark& operator=(const TBenchmark&)

Last update: Tue Jun 7 23:04:17 2005
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *