forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TProofProgressDialog.h
136 lines (119 loc) · 4.53 KB
/
TProofProgressDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// @(#)root/sessionviewer:$Id$
// Author: Fons Rademakers 21/03/03
/*************************************************************************
* Copyright (C) 1995-2003, 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_TProofProgressDialog
#define ROOT_TProofProgressDialog
#include "TTime.h"
#include "TString.h"
class TGTransientFrame;
class TGProgressBar;
class TGTextButton;
class TGCheckButton;
class TGLabel;
class TGTextBuffer;
class TGTextEntry;
class TProof;
class TProofProgressLog;
class TProofProgressMemoryPlot;
class TNtuple;
class TGraph;
class TGSpeedo;
class TProofProgressDialog {
friend class TProofProgressLog;
friend class TProofProgressMemoryPlot;
private:
enum EQueryStatus { kRunning = 0, kDone, kStopped, kAborted, kIncomplete };
TGTransientFrame *fDialog; // transient frame, main dialog window
TGProgressBar *fBar; // progress bar
TGTextButton *fClose;
TGTextButton *fStop;
TGTextButton *fAbort;
TGTextButton *fAsyn;
TGTextButton *fLog;
TGTextButton *fRatePlot;
TGTextButton *fMemPlot;
TGTextButton *fUpdtSpeedo;
TGCheckButton *fKeepToggle;
TGCheckButton *fLogQueryToggle;
TGTextBuffer *fTextQuery;
TGTextEntry *fEntry;
TGLabel *fTitleLab;
TGLabel *fFilesEvents;
TGLabel *fTimeLab;
TGLabel *fProcessed;
TGLabel *fEstim;
TGLabel *fTotal;
TGLabel *fRate;
TGLabel *fInit;
TGLabel *fSelector;
Bool_t fSpeedoEnabled; // whether to enable the speedometer
TGSpeedo *fSpeedo; // speedometer
TGCheckButton *fSmoothSpeedo; // use smooth speedometer update
TProofProgressLog *fLogWindow; // transient frame for logs
TProofProgressMemoryPlot *fMemWindow; // transient frame for memory plots
TProof *fProof;
TTime fStartTime;
TTime fEndTime;
Long64_t fPrevProcessed;
Long64_t fPrevTotal;
Long64_t fFirst;
Long64_t fEntries;
Int_t fFiles;
EQueryStatus fStatus;
Bool_t fKeep;
Bool_t fLogQuery;
TNtuple *fRatePoints;
TGraph *fRateGraph;
TGraph *fMBRtGraph;
TGraph *fActWGraph;
TGraph *fTotSGraph;
TGraph *fEffSGraph;
Float_t fInitTime;
Float_t fProcTime;
Double_t fAvgRate;
Double_t fAvgMBRate;
Int_t fRightInfo;
TString fSessionUrl;
Float_t AdjustBytes(Float_t mbs, TString &sf);
static Bool_t fgKeepDefault;
static Bool_t fgLogQueryDefault;
static TString fgTextQueryDefault;
public:
TProofProgressDialog(TProof *proof, const char *selector,
Int_t files, Long64_t first, Long64_t entries);
virtual ~TProofProgressDialog();
void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64_t ent);
void Progress(Long64_t total, Long64_t processed);
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
Float_t initTime, Float_t procTime,
Float_t evtrti, Float_t mbrti) {
Progress(total, processed, bytesread, initTime, procTime,
evtrti, mbrti, -1, -1, -1.); }
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
Float_t initTime, Float_t procTime,
Float_t evtrti, Float_t mbrti, Int_t actw, Int_t tses, Float_t eses);
void DisableAsyn();
void IndicateStop(Bool_t aborted);
void LogMessage(const char *msg, Bool_t all);
void CloseWindow();
void DoClose();
void DoLog();
void DoKeep(Bool_t on);
void DoSetLogQuery(Bool_t on);
void DoStop();
void DoAbort();
void DoAsyn();
void DoPlotRateGraph();
void DoMemoryPlot();
void DoEnableSpeedo();
void ToggleOdometerInfos();
void ToggleThreshold();
ClassDef(TProofProgressDialog,0) //PROOF progress dialog
};
#endif