Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TProofProgressStatus.h
Go to the documentation of this file.
1// @(#)root/proof:$Id$
2// Author: Jan Iwaszkiewicz 08/08/08
3
4/*************************************************************************
5 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TProofProgressStatus
13#define ROOT_TProofProgressStatus
14
15#include "TObject.h"
16
17//////////////////////////////////////////////////////////////////////////
18// //
19// TProofProgressStatus //
20// //
21// Small class including processing statistics //
22// //
23//////////////////////////////////////////////////////////////////////////
24
26public:
30private:
31 Long64_t fLastEntries; // Last chunck
35 Double_t fLearnTime; // the time spent in learning phase
36 Double_t fLastProcTime; // the wallclock time of the last addition
37 Double_t fProcTime; // the wallclock time
39 Double_t fLastUpdate; // Timestamp of last change
40public:
44 void Reset() { fEntries = 0,
46
47 inline Long64_t GetEntries() const { return fEntries; }
48 inline Long64_t GetBytesRead() const { return fBytesRead; }
49 inline Long64_t GetReadCalls() const { return fReadCalls; }
50 inline Double_t GetLearnTime() const { return fLearnTime; }
51 inline Double_t GetProcTime() const { return fProcTime; }
52 inline Double_t GetCPUTime() const { return fCPUTime; }
53 inline Double_t GetLastUpdate() const { return fLastUpdate; }
54 inline Double_t GetRate() const { return ((fProcTime > 0) ? fEntries/fProcTime : 0); }
56 inline void SetLastEntries(Long64_t entries) { fLastEntries = entries; }
57 inline void SetEntries(Long64_t entries) { fEntries = entries; }
58 inline void IncEntries(Long64_t entries = 1) { fLastEntries = entries; fEntries += entries; }
70 void Print(Option_t* option = "") const override;
71
75
76 ClassDefOverride(TProofProgressStatus,2) // Proof progress status class
77};
78
79#endif
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:69
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:90
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t option
Mother of all ROOT objects.
Definition TObject.h:41
Container class for processing statistics.
void SetLastUpdate(Double_t updtTime=0)
Update time stamp either with the passed value (if > 0) or with the current time.
Double_t GetLearnTime() const
Double_t GetProcTime() const
Long64_t GetReadCalls() const
Double_t GetLastUpdate() const
TProofProgressStatus & operator-=(const TProofProgressStatus &st)
'-=' operator
void SetProcTime(Double_t procTime)
TProofProgressStatus operator-(TProofProgressStatus &st)
'-' operator
void SetEntries(Long64_t entries)
void SetLastProcTime(Double_t procTime)
void IncBytesRead(Long64_t bytesRead)
TProofProgressStatus & operator+=(const TProofProgressStatus &st)
'+=' operator
void SetBytesRead(Long64_t bytesRead)
void IncReadCalls(Long64_t readCalls)
Long64_t GetEntries() const
Double_t GetCurrentRate() const
Get current rate. Rteunr the average rate if the current is not defined.
void SetLastEntries(Long64_t entries)
Double_t GetCPUTime() const
void Print(Option_t *option="") const override
Dump the content.
TProofProgressStatus(Long64_t fEntries=0, Long64_t fBytesRead=0, Long64_t fReadCalls=0, Double_t fProcTime=0, Double_t fCPUTime=0)
Main and default constructor.
void SetCPUTime(Double_t procTime)
void SetLearnTime(Double_t learnTime)
void IncEntries(Long64_t entries=1)
void IncCPUTime(Double_t procTime)
void IncProcTime(Double_t procTime)
void SetReadCalls(Long64_t readCalls)
Long64_t GetBytesRead() const