ROOT logo
// @(#)root/proof:$Id: TProofProgressStatus.h 25827 2008-10-15 14:02:59Z ganis $
// Author: Jan Iwaszkiewicz    08/08/08

/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofProgressStatus
#define ROOT_TProofProgressStatus

#ifndef ROOT_TObject
#include "TObject.h"
#endif

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofProgressStatus                                                 //
//                                                                      //
// Small class including processing statistics                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class TProofProgressStatus : public TObject {
private:
   Long64_t fEntries;
   Long64_t fBytesRead;
   Double_t fProcTime; // the wallclock time
   Double_t fCPUTime;
public:
   TProofProgressStatus(Long64_t fEntries = 0, Long64_t fBytesRead = 0,
                        Double_t fProcTime = 0, Double_t fCPUTime = 0);
   void     Reset() { fEntries = 0,
                      fBytesRead = 0, fProcTime = 0, fCPUTime = 0; }

   Long64_t GetEntries() const { return fEntries; }
   Long64_t GetBytesRead() const { return fBytesRead; }
   Double_t GetProcTime() const { return fProcTime; }
   Double_t GetCPUTime() const { return fCPUTime; }
   Double_t GetRate() const { return fProcTime?fEntries/fProcTime:0; }
   void     SetEntries(Long64_t entries) { fEntries = entries; }
   void     IncEntries(Long64_t entries = 1) { fEntries += entries; }
   void     IncBytesRead(Long64_t bytesRead) { fBytesRead += bytesRead; }
   void     SetBytesRead(Long64_t bytesRead) { fBytesRead = bytesRead; }
   void     SetProcTime(Double_t procTime) { fProcTime = procTime; }
   void     IncProcTime(Double_t procTime) { fProcTime += procTime; }
   void     SetCPUTime(Double_t procTime) { fCPUTime = procTime; }
   void     IncCPUTime(Double_t procTime) { fCPUTime += procTime; }
   void     Print(Option_t* option = "") const;

   TProofProgressStatus operator-(TProofProgressStatus &st);
   TProofProgressStatus &operator+=(const TProofProgressStatus &st);
   TProofProgressStatus &operator-=(const TProofProgressStatus &st);

   ClassDef(TProofProgressStatus,1) // Proof progress status class
};

#endif
 TProofProgressStatus.h:1
 TProofProgressStatus.h:2
 TProofProgressStatus.h:3
 TProofProgressStatus.h:4
 TProofProgressStatus.h:5
 TProofProgressStatus.h:6
 TProofProgressStatus.h:7
 TProofProgressStatus.h:8
 TProofProgressStatus.h:9
 TProofProgressStatus.h:10
 TProofProgressStatus.h:11
 TProofProgressStatus.h:12
 TProofProgressStatus.h:13
 TProofProgressStatus.h:14
 TProofProgressStatus.h:15
 TProofProgressStatus.h:16
 TProofProgressStatus.h:17
 TProofProgressStatus.h:18
 TProofProgressStatus.h:19
 TProofProgressStatus.h:20
 TProofProgressStatus.h:21
 TProofProgressStatus.h:22
 TProofProgressStatus.h:23
 TProofProgressStatus.h:24
 TProofProgressStatus.h:25
 TProofProgressStatus.h:26
 TProofProgressStatus.h:27
 TProofProgressStatus.h:28
 TProofProgressStatus.h:29
 TProofProgressStatus.h:30
 TProofProgressStatus.h:31
 TProofProgressStatus.h:32
 TProofProgressStatus.h:33
 TProofProgressStatus.h:34
 TProofProgressStatus.h:35
 TProofProgressStatus.h:36
 TProofProgressStatus.h:37
 TProofProgressStatus.h:38
 TProofProgressStatus.h:39
 TProofProgressStatus.h:40
 TProofProgressStatus.h:41
 TProofProgressStatus.h:42
 TProofProgressStatus.h:43
 TProofProgressStatus.h:44
 TProofProgressStatus.h:45
 TProofProgressStatus.h:46
 TProofProgressStatus.h:47
 TProofProgressStatus.h:48
 TProofProgressStatus.h:49
 TProofProgressStatus.h:50
 TProofProgressStatus.h:51
 TProofProgressStatus.h:52
 TProofProgressStatus.h:53
 TProofProgressStatus.h:54
 TProofProgressStatus.h:55
 TProofProgressStatus.h:56
 TProofProgressStatus.h:57
 TProofProgressStatus.h:58
 TProofProgressStatus.h:59
 TProofProgressStatus.h:60
 TProofProgressStatus.h:61