49#define PPD_SRV_NEWER(v) (fProof && fProof->GetRemoteProtocol() > v)
65 fBar(0), fClose(0), fStop(0), fAbort(0), fAsyn(0), fLog(0), fRatePlot(0),
66 fMemPlot(0), fKeepToggle(0), fLogQueryToggle(0), fTextQuery(0), fEntry(0),
67 fTitleLab(0), fFilesEvents(0), fTimeLab(0), fProcessed(0), fEstim(0),
68 fTotal(0), fRate(0), fInit(0), fSelector(0), fSpeedo(0), fSmoothSpeedo(0)
98 if (!proof || !(proof->
IsValid())) {
99 Error(
"TProofProgressDialog",
"proof instance is invalid (%p, %s): protocol error?",
100 proof, (proof && !(proof->
IsValid())) ?
"invalid" :
"undef");
109 fRatePoints =
new TNtuple(
"RateNtuple",
"Rate progress info",
"tm:evr:mbr:act:tos:efs");
115 fDialog->
Connect(
"CloseWindow()",
"TProofProgressDialog",
this,
"DoClose()");
127 buf.
Form(
"Executing on PROOF cluster \"%s\" with %d parallel workers:",
133 buf.
Form(
"Selector: %s", selector);
137 buf.
Form(
"%d files, number of events %lld, starting event %lld",
197 new TGHotString(
"Close dialog when processing is complete"));
200 "TProofProgressDialog",
this,
"DoKeep(Bool_t)");
212 fSpeedo->
Connect(
"OdoClicked()",
"TProofProgressDialog",
this,
"ToggleOdometerInfos()");
213 fSpeedo->
Connect(
"LedClicked()",
"TProofProgressDialog",
this,
"ToggleThreshold()");
242 UInt_t nb1 = 0, width1 = 0, height1 = 0;
246 fAsyn->
SetToolTipText(
"Continue running in the background (asynchronous mode), releasing the ROOT prompt");
248 fAsyn->
SetToolTipText(
"Switch to asynchronous mode disabled: functionality not supported by the server");
251 fAsyn->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoAsyn()");
258 fStop->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoStop()");
265 fAbort->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoAbort()");
273 fClose->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoClose()");
284 fLog->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoLog()");
291 fRatePlot->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoPlotRateGraph()");
296 fMemPlot->
Connect(
"Clicked()",
"TProofProgressDialog",
this,
"DoMemoryPlot()");
325 fProof->
Connect(
"Progress(Long64_t,Long64_t)",
"TProofProgressDialog",
326 this,
"Progress(Long64_t,Long64_t)");
327 fProof->
Connect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
328 "TProofProgressDialog",
this,
329 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)");
330 fProof->
Connect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
331 "TProofProgressDialog",
this,
332 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)");
333 fProof->
Connect(
"StopProcess(Bool_t)",
"TProofProgressDialog",
this,
334 "IndicateStop(Bool_t)");
335 fProof->
Connect(
"ResetProgressDialog(const char*,Int_t,Long64_t,Long64_t)",
336 "TProofProgressDialog",
this,
337 "ResetProgressDialog(const char*,Int_t,Long64_t,Long64_t)");
338 fProof->
Connect(
"CloseProgressDialog()",
"TProofProgressDialog",
this,
"DoClose()");
339 fProof->
Connect(
"DisableGoAsyn()",
"TProofProgressDialog",
this,
"DisableAsyn()");
367 (mw -
width), (mh - height) >> 1, ax, ay, wdum);
428 buf.
Form(
"Executing on PROOF cluster \"%s\" with %d parallel workers:",
442 buf.
Form(
"Selector: %s", selec);
450 buf.
Form(
"%d files, number of events %lld, starting event %lld",
475 fProof->
Connect(
"Progress(Long64_t,Long64_t)",
"TProofProgressDialog",
476 this,
"Progress(Long64_t,Long64_t)");
477 fProof->
Connect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
478 "TProofProgressDialog",
this,
479 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)");
480 fProof->
Connect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
481 "TProofProgressDialog",
this,
482 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)");
483 fProof->
Connect(
"StopProcess(Bool_t)",
"TProofProgressDialog",
this,
484 "IndicateStop(Bool_t)");
485 fProof->
Connect(
"DisableGoAsyn()",
"TProofProgressDialog",
this,
"DisableAsyn()");
513 static const char *cproc[] = {
"running",
"done",
514 "STOPPED",
"ABORTED",
"***EVENTS SKIPPED***"};
517 buf.
Form(
"Executing on PROOF cluster \"%s\" with %d parallel workers:",
536 buf.
Form(
"%d files, number of events %lld, starting event %lld",
552 if (processed >= 0 && processed >=
total) {
560 stm.
Form(
"%d h %d min %d sec", hh, mm, ss);
562 stm.
Form(
"%d min %d sec", mm, ss);
564 stm.
Form(
"%d sec", ss);
573 "Progress(Long64_t,Long64_t)");
575 "IndicateStop(Bool_t)");
592 Bool_t incomplete = (processed < 0 &&
607 stm.
Form(
"%d h %d min %d sec", hh, mm, ss);
609 stm.
Form(
"%d min %d sec", mm, ss);
611 stm.
Form(
"%d sec", ss);
614 buf.
Form(
"%lld / %lld events", evproc,
total);
653 static const char *cproc[] = {
"running",
"done",
654 "STOPPED",
"ABORTED",
"***EVENTS SKIPPED***"};
657 buf.
Form(
"Executing on PROOF cluster \"%s\" with %d parallel workers:",
663 Info(
"Progress",
"t: %lld, p: %lld, itm: %f, ptm: %f",
total, processed, initTime, procTime);
665 if (initTime >= 0.) {
668 buf.
Form(
"%.1f secs", initTime);
697 buf.
Form(
"%d files, number of events %lld, starting event %lld",
707 if (evproc > 0 && procTime > 0.)
724 if (over || (processed >= 0 && processed >=
total)) {
728 Bool_t incomplete = (processed < 0 &&
746 stm.
Form(
"%d h %d min %d sec", hh, mm, ss);
748 stm.
Form(
"%d min %d sec", mm, ss);
750 stm.
Form(
"%d sec", ss);
755 buf.
Form(
"%lld events (%.2f %s)\n",
779 "Progress(Long64_t,Long64_t)");
780 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
782 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)");
783 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
785 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)");
810 Bool_t incomplete = (processed < 0 &&
825 stm.
Form(
"%d h %d min %d sec", hh, mm, ss);
827 stm.
Form(
"%d min %d sec", mm, ss);
829 stm.
Form(
"%d sec", ss);
834 buf.
Form(
"%lld / %lld events - %.2f %s", evproc,
total, xb, sf.
Data());
842 buf.
Form(
"%.1f evts/sec \navg: %.1f evts/sec (%.1f MB/sec)",
850 BinHigh = 1.5 * evtrti;
913 "Progress(Long64_t,Long64_t)");
914 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
916 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)");
917 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
919 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)");
922 fProof->
Disconnect(
"ResetProgressDialog(const char*,Int_t,Long64_t,Long64_t)",
924 "ResetProgressDialog(const char*,Int_t,Long64_t,Long64_t)");
961 if (aborted ==
kTRUE)
968 "Progress(Long64_t,Long64_t)");
969 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)",
971 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t)");
972 fProof->
Disconnect(
"Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)",
974 "Progress(Long64_t,Long64_t,Long64_t,Float_t,Float_t,Float_t,Float_t,Int_t,Int_t,Float_t)");
1067 timeout = (timeout > 10) ? timeout : 10;
1111 Info(
"DoPlotRateGraph",
"list is empty!");
1117 Double_t eymx = -1., bymx = -1., wymx = -1., tymx=-1., symx = -1.;
1132 for ( ; ii < np; ++ii) {
1134 if (!(nar[1] > 0.))
continue;
1137 eymx = (nar[1] > eymx) ? nar[1] : eymx;
1140 bymx = (nar[2] > bymx) ? nar[2] : bymx;
1144 wymx = (nar[3] > wymx) ? nar[3] : wymx;
1149 tymx = (nar[4] > tymx) ? nar[4] : tymx;
1151 symx = (nar[5] > symx) ? nar[5] : symx;
1183 Int_t jsz = 200*npads;
1185 c1->SetFillColor(0);
1187 c1->SetBorderMode(0);
1188 c1->SetFrameBorderMode(0);
1191 c1->Divide(1, npads);
1225 Double_t x0 = xax0 + 0.05 * (xax1 - xax0);
1227 Double_t y0 = yax0 + 0.10 * (yax1 - yax0);
1228 Double_t y1 = yax0 + 0.20 * (yax1 - yax0);
1244 TH1F *graph2 =
new TH1F(
"graph2",
"Average read chunck size (MBs/request)",100,
1335 fSpeedo->
Connect(
"OdoClicked()",
"TProofProgressDialog",
this,
"ToggleOdometerInfos()");
1336 fSpeedo->
Connect(
"LedClicked()",
"TProofProgressDialog",
this,
"ToggleThreshold()");
Handle_t Window_t
Window handle.
static const double x1[5]
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static unsigned int total
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
void SetFrameBorderMode(Int_t mode=1)
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MapWindow()
map window
void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGString *newText)
Set new text in label.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
void SetPosition(Float_t pos)
Set progress position between [min,max].
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
virtual void Percent(Bool_t on)
virtual void ShowPos(Bool_t on)
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
void SetOdoValue(Int_t val)
Set actual value of odo meter.
Float_t GetScaleMin() const
void SetDisplayText(const char *text1, const char *text2="")
Set small display text (two lines).
Bool_t IsThresholdActive()
void Glow(EGlowColor col=kGreen)
Make speedo glowing.
void SetMinMaxScale(Float_t min, Float_t max)
Set min and max scale values.
void SetThresholds(Float_t th1=0.0, Float_t th2=0.0, Float_t th3=0.0)
void SetThresholdColors(EGlowColor col1, EGlowColor col2, EGlowColor col3)
void SetScaleValue(Float_t val)
Set actual scale (needle position) value.
void SetMeanValue(Float_t mean)
Float_t GetScaleMax() const
void ChangeText(const char *title)
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum of the graph.
virtual void SetTitle(const char *title="")
Change (i.e.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
TAxis * GetXaxis() const
Get x axis of the graph.
virtual void SetHistogram(TH1F *h)
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum of the graph.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetMinimum(Double_t minimum=-1111)
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
static void OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger)
Optimize axis limits.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
A simple TTree restricted to a list of float variables only.
Float_t * GetArgs() const
virtual Int_t Fill()
Fill a Ntuple with current values in fArgs.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
@ kInvalidObject
if object ctor succeeded but object should not be used
The most important graphics class in the ROOT system.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
void SetBorderMode(Short_t bordermode) override
TVirtualPad * GetPad(Int_t subpadnumber) const override
Get a pointer to subpadnumber of this pad.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual const char * GetUrl()
TProofProgressDialog(TProof *proof, const char *selector, Int_t files, Long64_t first, Long64_t entries)
Create PROOF processing progress dialog.
Float_t AdjustBytes(Float_t mbs, TString &sf)
Transform MBs to GBs ot TBs and get the correct suffix.
TProofProgressLog * fLogWindow
virtual ~TProofProgressDialog()
Cleanup dialog.
void DoEnableSpeedo()
Enable/Disable speedometer.
void DisableAsyn()
Disable the asyn switch when an external request for going asynchronous is issued.
friend class TProofProgressMemoryPlot
void DoKeep(Bool_t on)
Handle keep toggle button.
static TString fgTextQueryDefault
void DoLog()
Ask proof session for logs.
void Progress(Long64_t total, Long64_t processed)
Update progress bar and status labels.
void DoStop()
Handle Stop button.
void LogMessage(const char *msg, Bool_t all)
Load/append a log msg in the log frame, if open.
TGTransientFrame * fDialog
void DoMemoryPlot()
Do a memory plot.
TGCheckButton * fKeepToggle
static Bool_t fgLogQueryDefault
void DoPlotRateGraph()
Handle Plot Rate Graph.
void DoAsyn()
Handle Asyn button.
TGTextButton * fUpdtSpeedo
TProofProgressMemoryPlot * fMemWindow
void CloseWindow()
Called when dialog is closed.
TGCheckButton * fSmoothSpeedo
void DoSetLogQuery(Bool_t on)
Handle log-current-query-only toggle button.
static Bool_t fgKeepDefault
void ResetProgressDialog(const char *sel, Int_t sz, Long64_t fst, Long64_t ent)
Reset dialog box preparing for new query.
friend class TProofProgressLog
void DoAbort()
Handle Cancel button.
void DoClose()
Close dialog.
void IndicateStop(Bool_t aborted)
Indicate that Cancel or Stop was clicked.
void ToggleOdometerInfos()
Toggle information displayed in Analog Meter.
void DoLog(Bool_t grep=kFALSE)
Display logs.
void LoadBuffer(const char *buffer)
Load a text buffer in the window.
void AddBuffer(const char *buffer)
Add text to the window.
void Clear(Option_t *=0)
Clear log window.
void DoPlot()
Draw the plot from the logs.
void Clear(Option_t *=0)
Clear the canvases.
This class controls a Parallel ROOT Facility, PROOF, cluster.
Int_t GetRemoteProtocol() const
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
void GoAsynchronous()
Send GOASYNC message to the master.
void ResetProgressDialogStatus()
void StopProcess(Bool_t abort, Int_t timeout=-1)
Send STOPPROCESS message to master and workers.
const char * GetUser() const
const char * GetMaster() const
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
Basic time type with millisecond precision.
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
virtual Long64_t GetEntries() const
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Short_t Max(Short_t a, Short_t b)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)