Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TProofProgressMemoryPlot.cxx
Go to the documentation of this file.
1// @(#)root/sessionviewer:$Id$
2// Author: Anna Kreshuk 18/07/2008
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
13/** \class TProofProgressMemoryPlot
14 \ingroup sessionviewer
15
16This class implements a dialog, used to display the memory footprint
17on the proof workers and master. For the workers, memory is plotted
18as a function of number of events processed. For the master, it is
19plotted as a function of number of objects merged
20
21*/
22
23
26#include "TRootEmbeddedCanvas.h"
27#include "TCanvas.h"
28#include "TGListBox.h"
29#include "TGButton.h"
30#include "TGLabel.h"
31#include "TGMenu.h"
32#include "TProofLog.h"
33#include "TUrl.h"
34#include "TProof.h"
35#include "TError.h"
36#include "TGFrame.h"
37#include "TMacro.h"
38#include "TObjString.h"
39#include "TMultiGraph.h"
40#include "TGraph.h"
41#include "TLegend.h"
42#include "TAxis.h"
43#include "snprintf.h"
44
45#define kMemValuePos 8
46#define kMemValuePosMaster 8
47#define kEventNumberPos 13
48
50
51////////////////////////////////////////////////////////////////////////////////
52/// Main constructor
53
55 Int_t w, Int_t h)
56 : TGTransientFrame(gClient->GetRoot(),
57 gClient->GetRoot(), w, h)
58{
59 fDialog = d;
60 fProofLog = 0;
61 fWPlot = 0;
62 fMPlot = 0;
63 fAPlot = 0;
65
66 // use hierarchical cleaning
68 TGHorizontalFrame *htotal = new TGHorizontalFrame(this, w, h);
69 //The frame for choosing workers
70 TGVerticalFrame *vworkers = new TGVerticalFrame(htotal);
71 TGLabel *label1 = new TGLabel(vworkers,"Choose workers:");
72
73 //The list of workers
74 fWorkers = BuildLogList(vworkers);
75 fWorkers->Resize(102,52);
77
78 //The SelectAll/ClearAll button
79 TGPopupMenu *pm = new TGPopupMenu(gClient->GetRoot());
80 pm->AddEntry("Select All", 0);
81 pm->AddEntry("Clear All", 1);
82
83 fAllWorkers = new TGSplitButton(vworkers, new TGHotString("Select ... "), pm);
84 fAllWorkers->Connect("ItemClicked(Int_t)", "TProofProgressMemoryPlot", this,
85 "Select(Int_t)");
87 //select all for the first display
88 Select(1);
91
92 fPlot = new TGTextButton(vworkers, "Plot");
93 fPlot->Connect("Clicked()", "TProofProgressMemoryPlot", this, "DoPlot()");
94 vworkers->AddFrame(label1, new TGLayoutHints(kLHintsLeft | kLHintsTop, 7, 2, 5, 2));
95 vworkers->AddFrame(fAllWorkers, new TGLayoutHints(kLHintsExpandX | kLHintsTop, 5, 2, 2, 2));
97 vworkers->AddFrame(fPlot, new TGLayoutHints(kLHintsExpandX | kLHintsBottom, 2, 2, 2, 2));
98 htotal->AddFrame(vworkers, new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandY, 2, 2, 2, 2));
99
100 fWorkersPlot = new TRootEmbeddedCanvas("WorkersCanvas", htotal, 300, 300);
102 fMasterPlot = new TRootEmbeddedCanvas("MasterCanvas", htotal, 300, 300);
104
105 AddFrame(htotal, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2));
106 TString title;
107 title.Form("PROOF Memory Consumption: %s", (fDialog->fProof ?
108 fDialog->fProof->GetMaster() : "<dummy>"));
109 SetWindowName(title);
110 SetIconName(title);
111
113 Resize();
115 MapWindow();
116}
117
118////////////////////////////////////////////////////////////////////////////////
119/// Destructor
120
122{
123 if (fProofLog){
124 delete fProofLog;
125 fProofLog = 0;
126 }
127 if (fMPlot){
128 delete fMPlot;
129 fMPlot = 0;
130 }
131 if (fWPlot){
132 delete fWPlot;
133 fWPlot = 0;
134 }
135
136 fProofLog = 0;
137 fDialog->fMemWindow = 0;
138
139}
140
141////////////////////////////////////////////////////////////////////////////////
142/// Build the list of workers. For this, extract the logs and take the names
143/// of TProofLogElements
144
146{
147 TGListBox *c = new TGListBox(parent);
148 c->AddEntry("average", 0);
149
151 fProofLog = 0;
152
154 if (mgr) fProofLog = mgr->GetSessionLogs(0, 0, "Svc.*Memory");
157 } else {
159 }
160
161 if (fProofLog) {
162 TList *elem = fProofLog->GetListOfLogs();
163 TIter next(elem);
164 TProofLogElem *pe = 0;
165
166 TString buf;
167 Int_t is = 1;
168 while ((pe=(TProofLogElem*)next())){
169 TUrl url(pe->GetTitle());
170 buf = TString::Format("%s %s", pe->GetName(), url.GetHost());
171 c->AddEntry(buf.Data(), is);
172 is++;
173 }
174 }
175 return c;
176}
177
178////////////////////////////////////////////////////////////////////////////////
179/// Clear the canvases
180
182{
183 if (fWorkersPlot)
185 if (fMasterPlot)
187}
188
189////////////////////////////////////////////////////////////////////////////////
190/// Draw the plot from the logs
191
193{
194 Clear();
195
196 if (!fProofLog || !fFullLogs ||
198
200 if (fDialog) {
202 if (mgr) fProofLog = mgr->GetSessionLogs(0, 0, "Svc.*Memory");
205 } else {
207 }
208 } else {
209 Error("DoPlot", "TProofProgessDialog instance undefined - protocol error?");
210 return;
211 }
212 }
213
214 // Make sure we have something to parse
215 if (!fProofLog) {
216 Error("DoPlot", "could not get a valid instance of TProofLog");
217 return;
218 }
219
220 char name[512]; //should be long enough
221
222 TList *elem = fProofLog->GetListOfLogs();
223 if (!elem) {Error("DoPlot", "No log elements\n"); return;}
224 TIter next(elem);
225 TProofLogElem *ple=0;
226
227 Int_t iwelem = 0;
228 Int_t imelem = 0;
229 TGraph *gr=0;
230
231 TList *selected = new TList;
232 fWorkers->GetSelectedEntries(selected);
233 TIter nextworker(selected);
234 TGTextLBEntry *selworker;
235 TLegend *legw = 0;
236 TLegend *legm = 0;
237
238 //delete the current multigraphs
239 if (fWPlot){
240 delete fWPlot;
241 fWPlot = 0;
242 }
243 if (fMPlot) {
244 delete fMPlot;
245 fMPlot = 0;
246 }
247
248 //loop over the selected workers in the list
249 Int_t max = -1;
250 Int_t min = -1;
251 while ((selworker=(TGTextLBEntry*)nextworker())){
252
253 snprintf(name, sizeof(name)-1, "%s", selworker->GetText()->GetString());
254 char *token;
255 token = strtok(name, " ");
256 if (token && !strcmp(token, "average")) { //change that to id comparison later
257 gr = DoAveragePlot(max, min);
258 if (gr && gr->GetN()>0){
259 if (!fWPlot) {
260 fWPlot = new TMultiGraph();
261 }
262 if (!legw) {
263 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
264 legw->SetHeader("Workers");
265 }
266 gr->SetMarkerColor(1);
267 gr->SetMarkerStyle(2);
268 gr->SetMarkerSize(1);
269 gr->SetLineWidth(2);
270 gr->SetLineColor(1);
271 fWPlot->Add(gr, "l");
272 legw->AddEntry(gr, token, "l");
273 }
274 TProofLogElem *pltemp = (TProofLogElem*)elem->At(min+1);
275 gr = DoWorkerPlot(pltemp);
276 if (gr && gr->GetN()>0){
277 if (!fWPlot) {
278 fWPlot = new TMultiGraph();
279 }
280 if (!legw) {
281 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
282 legw->SetHeader("Workers");
283 }
284 gr->SetLineWidth(2);
285 gr->SetLineColor(2);
286 gr->SetLineStyle(3);
287 fWPlot->Add(gr, "l");
288 legw->AddEntry(gr, TString::Format("%s - min", pltemp->GetName()) , "l");
289 }
290 pltemp = (TProofLogElem*)elem->At(max+1);
291 gr = DoWorkerPlot(pltemp);
292 if (gr && gr->GetN()>0){
293 if (!fWPlot) {
294 fWPlot = new TMultiGraph();
295 }
296 if (!legw) {
297 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
298 legw->SetHeader("Workers");
299 }
300 gr->SetLineWidth(2);
301 gr->SetLineColor(2);
302 gr->SetLineStyle(2);
303 fWPlot->Add(gr, "l");
304 legw->AddEntry(gr, TString::Format("%s - max", pltemp->GetName()), "l");
305 }
306
307 continue;
308 }
309
310
311 ple = (TProofLogElem*)elem->FindObject(token);
312 const char *role = ple->GetRole();
313 if (role[0]=='w'){
314 //role should be equal to "worker", only check the 1st char
315
316 gr = DoWorkerPlot(ple);
317 if (gr && gr->GetN()>0) {
318 if (!fWPlot) {
319 fWPlot = new TMultiGraph();
320 }
321 if (!legw) {
322 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
323 legw->SetHeader("Workers");
324 }
325 gr->SetLineWidth(2);
326 gr->SetLineColor(iwelem+3);
327 fWPlot->Add(gr, "l");
328 legw->AddEntry(gr, token, "l");
329 iwelem++;
330 }
331 } else {
332 //a master or submaster log
333 //display without meaningful labels for now
334 gr = DoMasterPlot(ple);
335 if (gr && gr->GetN()>0){
336 if (!fMPlot){
337 fMPlot = new TMultiGraph();
338 }
339 if (!legm) {
340 legm = new TLegend(0.1, 0.7, 0.4, 0.9);
341 legm->SetHeader("Master");
342 }
343 gr->SetLineWidth(2);
344 gr->SetLineColor(imelem+1);
345 fMPlot->Add(gr, "l");
346 legm->AddEntry(gr, token, "l");
347 imelem++;
348 }
349 }
350
351 }
352
353 if (fWPlot){
355 fWPlot->Draw("a");
356 if (fWPlot->GetXaxis())
357 fWPlot->GetXaxis()->SetTitle("Events Processed");
358 if (fWPlot->GetYaxis())
359 fWPlot->GetYaxis()->SetTitle("MBytes");
360 if (legw) legw->Draw();
361
362 }
363 if (fMPlot) {
365 fMPlot->Draw("a");
366 if (fMPlot->GetXaxis())
367 fMPlot->GetXaxis()->SetTitle("Objects Merged");
368 if (fMPlot->GetYaxis())
369 fMPlot->GetYaxis()->SetTitle("MBytes");
370 if (legm) legm->Draw();
371 }
374
375 delete selected;
376}
377
378////////////////////////////////////////////////////////////////////////////////
379/// Create the average plots
380
382{
383 TList *elem = fProofLog->GetListOfLogs();
384 if (!elem) {
385 Error("DoAveragePlot", "Empty log");
386 return 0;
387 }
388 TIter next(elem);
389
390 TProofLogElem *ple=0;
391 Double_t max_av = 0;
392 Double_t min_av = 10E9;
393
394 Long64_t maxevent = 0;
395 Long64_t step = -1;
396 TObjString *curline = 0;
397 TObjString *prevline = 0;
398 Long64_t curevent_value;
399 Long64_t prevevent_value;
400 Long64_t *last = new Long64_t[elem->GetEntries()];
401 Long64_t vmem = -1, rmem = -1, nevt = -1;
402 TString token;
403 Int_t ielem=0;
404 for (Int_t i=0; i<elem->GetEntries(); i++) {
405 last[i] = 0;
406 }
407 while ((ple = (TProofLogElem *)next())){
408 //find the maximal entry processed in the last query
409 const char *role = ple->GetRole();
410 if (role[0] != 'w') continue; //skip the master log
411 TList *lines = ple->GetMacro()->GetListOfLines();
412 if (!lines || lines->GetSize() <= 0) continue;
413 curline = (TObjString *) lines->Last();
414 if (!curline) continue;
415 curevent_value = 0;
416 if (ParseLine(curline->String(), vmem, rmem, curevent_value) != 0) {
417 Warning("DoAveragePlot", "error parsing line: '%s'", curline->String().Data());
418 continue;
419 }
420 if (maxevent < curevent_value) maxevent = curevent_value;
421 last[ielem] = curevent_value;
422 if (step < 0) {
423 // Find the step
424 prevline = (TObjString *)lines->Before(curline);
425 if (prevline) {
426 prevevent_value = 0;
427 if (ParseLine(prevline->String(), vmem, rmem, prevevent_value) != 0) {
428 Warning("DoAveragePlot", "error parsing line: '%s'", curline->String().Data());
429 } else {
430 step = curevent_value - prevevent_value;
431 }
432 }
433 }
434 ielem++;
435 }
436 Int_t maxlines = Int_t(maxevent/(1.*step));
437 //transform the array of last event numbers to an array of numbers of lines
438 for (Int_t i=0; i<ielem; i++){
439 last[i] /= step;
440 }
441
442 Double_t *av_mem = new Double_t[maxlines];
443 Int_t *nw = new Int_t[maxlines];
444 for (Int_t i=0; i<maxlines; i++){
445 av_mem[i]=0;
446 nw[i]=0;
447 }
448 next.Reset();
449 ielem=0;
450 Int_t iline=0;
451 Double_t cur_av;
452 while ((ple = (TProofLogElem*)next())){
453 const char *role = ple->GetRole();
454 if (role[0]!='w') continue;
455 TList *lines = ple->GetMacro()->GetListOfLines();
456 if (!lines || lines->GetSize() <= 0) continue;
457 TIter prev(lines, kIterBackward);
458 iline=0;
459 cur_av = 0;
460 while ((curline = (TObjString*)prev()) && iline<last[ielem]){
461 // a backward loop, so that only the last query is counted
462 vmem = 0;
463 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
464 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
465 continue;
466 }
467 av_mem[last[ielem] -1 - iline] += vmem; //last[ielem] is the number of lines for
468 nw[last[ielem] -1 - iline]++; //this query and this element
469 if (last[ielem] > 0) cur_av += (Double_t)vmem / last[ielem];
470 iline++;
471 }
472 if (cur_av > max_av){
473 max_av = cur_av;
474 max_el = ielem;
475 }
476 if (cur_av < min_av){
477 min_av = cur_av;
478 min_el = ielem;
479 }
480 ielem++;
481 }
482
483 TGraph *gr = new TGraph(maxlines);
484 //make an average
485 for (Int_t i=0; i<maxlines; i++){
486 gr->SetPoint(i, (i+1)*step, av_mem[i]/(nw[i]*1024.));
487 }
488 delete [] av_mem;
489 av_mem = 0;
490 delete [] nw;
491 nw = 0;
492 delete [] last;
493 last = 0;
494 return gr;
495
496}
497
498////////////////////////////////////////////////////////////////////////////////
499/// Extract from line 'l' the virtual memory 'v', the resident memory 'r' and the
500/// number of events 'e'.
501/// The line is assumed to be in the form
502/// "... Memory 130868 virtual 31540 ... event 5550"
503/// The fields are only filled if >= 0 .
504/// Return 0 on success, -1 if any of the values could not be filled (the output
505/// fields are not touched in such a case).
506
509{
510 // Something to parse is mandatory
511 if (l.IsNull()) return -1;
512
513 // At least one field needs to be filled
514 if (v < 0 && r < 0 && e < 0) return 0;
515
516 // Position at the start of the relevant info
517 Int_t from = kNPOS;
518 if ((from = l.Index("Memory")) == kNPOS) return -1;
519
520 // Prepare extraction
521 from += 7;
522 TString tok;
523
524 // The virtual memory
525 if (v >= 0) {
526 if (!l.Tokenize(tok, from, " ")) return -1;
527 v = tok.Atoll();
528 }
529
530 // The resident memory
531 if (r >= 0) {
532 if ((from = l.Index("virtual", from)) == kNPOS) return -1;
533 from += 8;
534 if (!l.Tokenize(tok, from, " ")) return -1;
535 r = tok.Atoll();
536 }
537
538 // The number of events
539 if (e >= 0) {
540 if ((from = l.Index("event", from)) == kNPOS) return -1;
541 from += 6;
542 if (!l.Tokenize(tok, from, " ")) return -1;
543 e = tok.Atoll();
544 }
545
546 // Done
547 return 0;
548}
549
550////////////////////////////////////////////////////////////////////////////////
551/// Make a memory consumption graph for a worker
552
554{
555 TObjString *curline;
556 TList *lines = ple->GetMacro()->GetListOfLines();
557 if (!lines) {
558 //the log is empty so far
559 return 0;
560 }
561
562 Long64_t vmem = -1, rmem = -1, nevt = -1;
563
564 //find the last event value
565 curline = (TObjString*)lines->Last();
566 Long64_t lastevent_value = 0;
567 if (ParseLine(curline->String(), vmem, rmem, lastevent_value) != 0) {
568 Error("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
569 return 0;
570 }
571
572 //find the step
573 TObjString *prevline = (TObjString*)lines->Before(curline);
574 Long64_t prevevent_value = 0;
575 if (prevline && ParseLine(prevline->String(), vmem, rmem, prevevent_value) != 0) {
576 Error("DoWorkerPlot", "error parsing line: '%s'", prevline->String().Data());
577 return 0;
578 }
579 Long64_t step = lastevent_value - prevevent_value;
580 if (step <= 0) {
581 Error("DoWorkerPlot", "null or negative step (%lld) - cannot continue", step);
582 return 0;
583 }
584
585 Int_t nlines = lastevent_value/step;
586 TGraph *gr = new TGraph(nlines);
587
588 TIter prevl(lines, kIterBackward);
589 Int_t iline = 0;
590 TString token;
591 while ((curline = (TObjString*)prevl()) && iline<nlines){
592 //iterate backwards so that only lines for the last query are taken
593 vmem = 0;
594 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
595 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
596 continue;
597 }
598 gr->SetPoint(nlines-1-iline, lastevent_value-iline*step, vmem/1024.);
599 iline++;
600 }
601
602 return gr;
603}
604
605////////////////////////////////////////////////////////////////////////////////
606/// a master or submaster log
607/// display without meaningful labels for now
608
610{
611 TList *lines = ple->GetMacro()->GetListOfLines();
612 TIter prevline(lines, kIterBackward);
613 Int_t iline=0;
614 TObjString *curline;
615 //count the number of lines that belong to the last query
616 while ((curline = (TObjString*)prevline())) {
617 if (curline->String().Contains("Start")) break;
618 iline++;
619 }
620
621 Long64_t vmem = -1, rmem = -1, nevt = -1;
622
623 Int_t nlines = iline;
624 TString token;
625 TGraph *gr = new TGraph(nlines);
626 prevline.Reset();
627 iline = 0;
628 while ((curline = (TObjString*)prevline()) && iline<nlines) {
629 //iterate backwards so that only lines for the last query are taken
630 vmem = 0;
631 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
632 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
633 continue;
634 }
635 gr->SetPoint(nlines-iline, nlines-iline, vmem/1024.);
636 iline++;
637 }
638 return gr;
639}
640
641////////////////////////////////////////////////////////////////////////////////
642///actions of select all/clear all button
643
645{
647 Bool_t sel = id ? 0 : 1;
648
649 for (Int_t ie=0; ie<nen; ie++) {
650 fWorkers->Select(ie, sel);
651 }
652}
ROOT::R::TRInterface & r
Definition Object.C:4
#define SafeDelete(p)
Definition RConfig.hxx:537
#define d(i)
Definition RSha256.hxx:102
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
#define e(i)
Definition RSha256.hxx:103
const Ssiz_t kNPOS
Definition RtypesCore.h:124
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
const Bool_t kIterBackward
Definition TCollection.h:43
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:187
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:231
#define gClient
Definition TGClient.h:157
@ kDeepCleanup
Definition TGFrame.h:42
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
char name[80]
Definition TGX11.cxx:110
#define snprintf
Definition civetweb.c:1540
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:42
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition TAttMarker.h:38
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Definition TAttMarker.h:40
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Definition TAttMarker.h:41
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:725
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:706
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2502
virtual Int_t GetEntries() const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1164
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:605
virtual void MapWindow()
map window
Definition TGFrame.h:204
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:386
TGHotString is a string with a "hot" character underlined.
Definition TGString.h:42
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
Definition TGListBox.h:284
virtual Int_t GetNumberOfEntries() const
Definition TGListBox.h:263
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
Definition TGListBox.h:259
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition TGFrame.cxx:1801
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1788
This class creates a popup menu object.
Definition TGMenu.h:110
virtual void AddEntry(TGHotString *s, Int_t id, void *ud=nullptr, const TGPicture *p=nullptr, TGMenuEntry *before=nullptr)
Add a menu entry.
Definition TGMenu.cxx:990
Implements a button with added menu functionality.
Definition TGButton.h:379
virtual void SetSplit(Bool_t split)
Set the split status of a button.
const char * GetString() const
Definition TGString.h:30
Yield an action as soon as it is clicked.
Definition TGButton.h:142
Text string listbox entries.
Definition TGListBox.h:48
const TGString * GetText() const
Definition TGListBox.h:79
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:499
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition TGFrame.cxx:1955
A composite frame that layout their children in vertical way.
Definition TGFrame.h:375
A TGraph is an object made of two arrays X and Y with npoints each.
Definition TGraph.h:41
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
Definition TGraph.cxx:2298
Int_t GetN() const
Definition TGraph.h:125
void Reset()
This class displays a legend box (TPaveText) containing several legend entries.
Definition TLegend.h:23
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Definition TLegend.cxx:330
virtual void SetHeader(const char *header="", Option_t *option="")
Sets the header, which is the "title" that appears at the top of the legend.
Definition TLegend.cxx:1093
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition TLegend.cxx:423
A doubly linked list.
Definition TList.h:38
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition TList.cxx:578
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Definition TList.cxx:357
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition TList.cxx:693
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
Definition TList.cxx:371
TList * GetListOfLines() const
Definition TMacro.h:51
A TMultiGraph is a collection of TGraph (or derived) objects.
Definition TMultiGraph.h:36
virtual void Add(TGraph *graph, Option_t *chopt="")
Add a new graph to the list of graphs.
virtual void Draw(Option_t *chopt="")
Draw this multigraph with its current attributes.
TAxis * GetYaxis()
Get y axis of the graph.
TAxis * GetXaxis()
Get x axis of the graph.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:164
virtual const char * GetTitle() const
Returns title of object.
Definition TNamed.h:48
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Collectable string class.
Definition TObjString.h:28
TString & String()
Definition TObjString.h:48
TMacro * GetMacro() const
Definition TProofLog.h:100
const char * GetRole()
Definition TProofLog.h:101
TList * GetListOfLogs() const
Definition TProofLog.h:58
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session,...
Definition TProofMgr.h:43
virtual TProofLog * GetSessionLogs(Int_t=0, const char *=0, const char *="-v \"| SvcMsg\"", Bool_t=kFALSE)
Definition TProofMgr.h:91
This class provides a query progress bar.
TProofProgressMemoryPlot * fMemWindow
This class implements a dialog, used to display the memory footprint on the proof workers and master.
TRootEmbeddedCanvas * fWorkersPlot
TGListBox * BuildLogList(TGFrame *parent)
Build the list of workers.
TGraph * DoMasterPlot(TProofLogElem *ple)
a master or submaster log display without meaningful labels for now
TGraph * DoWorkerPlot(TProofLogElem *ple)
Make a memory consumption graph for a worker.
TRootEmbeddedCanvas * fMasterPlot
TProofProgressMemoryPlot(TProofProgressDialog *d, Int_t w=700, Int_t h=300)
Main constructor.
Int_t ParseLine(TString l, Long64_t &v, Long64_t &r, Long64_t &e)
Extract from line 'l' the virtual memory 'v', the resident memory 'r' and the number of events 'e'.
void DoPlot()
Draw the plot from the logs.
void Select(Int_t id)
actions of select all/clear all button
virtual ~TProofProgressMemoryPlot()
Destructor.
TGraph * DoAveragePlot(Int_t &max_el, Int_t &min_el)
Create the average plots.
void Clear(Option_t *=0)
Clear the canvases.
static TProofMgr * Mgr(const char *url)
Get instance of the effective manager for 'url' Return 0 on failure.
Definition TProof.cxx:11724
const char * GetMaster() const
Definition TProof.h:903
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.
Definition TQObject.cxx:869
This class creates a TGCanvas in which a TCanvas is created.
TCanvas * GetCanvas() const
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2336
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2314
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:624
Long64_t Atoll() const
Return long long value of string.
Definition TString.cxx:1972
This class represents a WWW compatible URL.
Definition TUrl.h:33
const char * GetHost() const
Definition TUrl.h:67
TGraphErrors * gr
Definition legend1.C:25
auto * l
Definition textangle.C:4