00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TProofProgressDialog
00013 #define ROOT_TProofProgressDialog
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TTime
00025 #include "TTime.h"
00026 #endif
00027 #ifndef ROOT_TString
00028 #include "TString.h"
00029 #endif
00030
00031 class TGTransientFrame;
00032 class TGProgressBar;
00033 class TGTextButton;
00034 class TGCheckButton;
00035 class TGLabel;
00036 class TGTextBuffer;
00037 class TGTextEntry;
00038 class TProof;
00039 class TProofProgressLog;
00040 class TProofProgressMemoryPlot;
00041 class TNtuple;
00042 class TGraph;
00043 class TGSpeedo;
00044
00045 class TProofProgressDialog {
00046
00047 friend class TProofProgressLog;
00048 friend class TProofProgressMemoryPlot;
00049
00050 private:
00051 enum EQueryStatus { kRunning = 0, kDone, kStopped, kAborted, kIncomplete };
00052
00053 TGTransientFrame *fDialog;
00054 TGProgressBar *fBar;
00055 TGTextButton *fClose;
00056 TGTextButton *fStop;
00057 TGTextButton *fAbort;
00058 TGTextButton *fAsyn;
00059 TGTextButton *fLog;
00060 TGTextButton *fRatePlot;
00061 TGTextButton *fMemPlot;
00062 TGTextButton *fUpdtSpeedo;
00063 TGCheckButton *fKeepToggle;
00064 TGCheckButton *fLogQueryToggle;
00065 TGTextBuffer *fTextQuery;
00066 TGTextEntry *fEntry;
00067 TGLabel *fTitleLab;
00068 TGLabel *fFilesEvents;
00069 TGLabel *fTimeLab;
00070 TGLabel *fProcessed;
00071 TGLabel *fEstim;
00072 TGLabel *fTotal;
00073 TGLabel *fRate;
00074 TGLabel *fInit;
00075 TGLabel *fSelector;
00076 Bool_t fSpeedoEnabled;
00077 TGSpeedo *fSpeedo;
00078 TGCheckButton *fSmoothSpeedo;
00079 TProofProgressLog *fLogWindow;
00080 TProofProgressMemoryPlot *fMemWindow;
00081 TProof *fProof;
00082 TTime fStartTime;
00083 TTime fEndTime;
00084 Long64_t fPrevProcessed;
00085 Long64_t fPrevTotal;
00086 Long64_t fFirst;
00087 Long64_t fEntries;
00088 Int_t fFiles;
00089 EQueryStatus fStatus;
00090 Bool_t fKeep;
00091 Bool_t fLogQuery;
00092 TNtuple *fRatePoints;
00093 TGraph *fRateGraph;
00094 TGraph *fMBRtGraph;
00095 TGraph *fActWGraph;
00096 TGraph *fTotSGraph;
00097 TGraph *fEffSGraph;
00098 Float_t fInitTime;
00099 Float_t fProcTime;
00100 Double_t fAvgRate;
00101 Double_t fAvgMBRate;
00102 Int_t fSVNRev;
00103 Int_t fRightInfo;
00104
00105 TString fSessionUrl;
00106
00107 Float_t AdjustBytes(Float_t mbs, TString &sf);
00108
00109 static Bool_t fgKeepDefault;
00110 static Bool_t fgLogQueryDefault;
00111 static TString fgTextQueryDefault;
00112
00113 public:
00114 TProofProgressDialog(TProof *proof, const char *selector,
00115 Int_t files, Long64_t first, Long64_t entries);
00116 virtual ~TProofProgressDialog();
00117
00118 void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64_t ent);
00119 void Progress(Long64_t total, Long64_t processed);
00120 void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
00121 Float_t initTime, Float_t procTime,
00122 Float_t evtrti, Float_t mbrti) {
00123 Progress(total, processed, bytesread, initTime, procTime,
00124 evtrti, mbrti, -1, -1, -1.); }
00125 void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
00126 Float_t initTime, Float_t procTime,
00127 Float_t evtrti, Float_t mbrti, Int_t actw, Int_t tses, Float_t eses);
00128 void DisableAsyn();
00129 void IndicateStop(Bool_t aborted);
00130 void LogMessage(const char *msg, Bool_t all);
00131
00132 void CloseWindow();
00133 void DoClose();
00134 void DoLog();
00135 void DoKeep(Bool_t on);
00136 void DoSetLogQuery(Bool_t on);
00137 void DoStop();
00138 void DoAbort();
00139 void DoAsyn();
00140 void DoPlotRateGraph();
00141 void DoMemoryPlot();
00142 void DoEnableSpeedo();
00143 void ToggleOdometerInfos();
00144 void ToggleThreshold();
00145
00146 ClassDef(TProofProgressDialog,0)
00147 };
00148
00149 #endif