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// //
14// TProofProgressMemoryPlot //
15// //
16// This class implements a dialog, used to display the memory footprint //
17// on the proof workers and master. For the workers, memory is plotted //
18// as a function of number of events processed. For the master, it is //
19// plotted as a function of number of objects merged //
20// //
21//////////////////////////////////////////////////////////////////////////
22
25#include "TRootEmbeddedCanvas.h"
26#include "TCanvas.h"
27#include "TGListBox.h"
28#include "TGButton.h"
29#include "TGLabel.h"
30#include "TGMenu.h"
31#include "TProofLog.h"
32#include "TUrl.h"
33#include "TProof.h"
34#include "TError.h"
35#include "TGFrame.h"
36#include "TMacro.h"
37#include "TObjString.h"
38#include "TMultiGraph.h"
39#include "TGraph.h"
40#include "TLegend.h"
41#include "TAxis.h"
42#include "snprintf.h"
43
44#define kMemValuePos 8
45#define kMemValuePosMaster 8
46#define kEventNumberPos 13
47
49
50////////////////////////////////////////////////////////////////////////////////
51/// Main constructor
52
54 Int_t w, Int_t h)
55 : TGTransientFrame(gClient->GetRoot(),
56 gClient->GetRoot(), w, h)
57{
58 fDialog = d;
59 fProofLog = 0;
60 fWPlot = 0;
61 fMPlot = 0;
62 fAPlot = 0;
64
65 // use hierarchical cleaning
67 TGHorizontalFrame *htotal = new TGHorizontalFrame(this, w, h);
68 //The frame for choosing workers
69 TGVerticalFrame *vworkers = new TGVerticalFrame(htotal);
70 TGLabel *label1 = new TGLabel(vworkers,"Choose workers:");
71
72 //The list of workers
73 fWorkers = BuildLogList(vworkers);
74 fWorkers->Resize(102,52);
76
77 //The SelectAll/ClearAll button
78 TGPopupMenu *pm = new TGPopupMenu(gClient->GetRoot());
79 pm->AddEntry("Select All", 0);
80 pm->AddEntry("Clear All", 1);
81
82 fAllWorkers = new TGSplitButton(vworkers, new TGHotString("Select ... "), pm);
83 fAllWorkers->Connect("ItemClicked(Int_t)", "TProofProgressMemoryPlot", this,
84 "Select(Int_t)");
86 //select all for the first display
87 Select(1);
90
91 fPlot = new TGTextButton(vworkers, "Plot");
92 fPlot->Connect("Clicked()", "TProofProgressMemoryPlot", this, "DoPlot()");
93 vworkers->AddFrame(label1, new TGLayoutHints(kLHintsLeft | kLHintsTop, 7, 2, 5, 2));
94 vworkers->AddFrame(fAllWorkers, new TGLayoutHints(kLHintsExpandX | kLHintsTop, 5, 2, 2, 2));
96 vworkers->AddFrame(fPlot, new TGLayoutHints(kLHintsExpandX | kLHintsBottom, 2, 2, 2, 2));
97 htotal->AddFrame(vworkers, new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandY, 2, 2, 2, 2));
98
99 fWorkersPlot = new TRootEmbeddedCanvas("WorkersCanvas", htotal, 300, 300);
101 fMasterPlot = new TRootEmbeddedCanvas("MasterCanvas", htotal, 300, 300);
103
104 AddFrame(htotal, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2));
105 TString title;
106 title.Form("PROOF Memory Consumption: %s", (fDialog->fProof ?
107 fDialog->fProof->GetMaster() : "<dummy>"));
108 SetWindowName(title);
109 SetIconName(title);
110
112 Resize();
114 MapWindow();
115}
116
117////////////////////////////////////////////////////////////////////////////////
118/// Destructor
119
121{
122 if (fProofLog){
123 delete fProofLog;
124 fProofLog = 0;
125 }
126 if (fMPlot){
127 delete fMPlot;
128 fMPlot = 0;
129 }
130 if (fWPlot){
131 delete fWPlot;
132 fWPlot = 0;
133 }
134
135 fProofLog = 0;
136 fDialog->fMemWindow = 0;
137
138}
139
140////////////////////////////////////////////////////////////////////////////////
141/// Build the list of workers. For this, extract the logs and take the names
142/// of TProofLogElements
143
145{
146 TGListBox *c = new TGListBox(parent);
147 c->AddEntry("average", 0);
148
150 fProofLog = 0;
151
153 if (mgr) fProofLog = mgr->GetSessionLogs(0, 0, "Svc.*Memory");
156 } else {
158 }
159
160 if (fProofLog) {
161 TList *elem = fProofLog->GetListOfLogs();
162 TIter next(elem);
163 TProofLogElem *pe = 0;
164
165 TString buf;
166 Int_t is = 1;
167 while ((pe=(TProofLogElem*)next())){
168 TUrl url(pe->GetTitle());
169 buf = TString::Format("%s %s", pe->GetName(), url.GetHost());
170 c->AddEntry(buf.Data(), is);
171 is++;
172 }
173 }
174 return c;
175}
176
177////////////////////////////////////////////////////////////////////////////////
178/// Clear the canvases
179
181{
182 if (fWorkersPlot)
184 if (fMasterPlot)
186}
187
188////////////////////////////////////////////////////////////////////////////////
189/// Draw the plot from the logs
190
192{
193 Clear();
194
195 if (!fProofLog || !fFullLogs ||
197
199 if (fDialog) {
201 if (mgr) fProofLog = mgr->GetSessionLogs(0, 0, "Svc.*Memory");
204 } else {
206 }
207 } else {
208 Error("DoPlot", "TProofProgessDialog instance undefined - protocol error?");
209 return;
210 }
211 }
212
213 // Make sure we have something to parse
214 if (!fProofLog) {
215 Error("DoPlot", "could not get a valid instance of TProofLog");
216 return;
217 }
218
219 char name[512]; //should be long enough
220
221 TList *elem = fProofLog->GetListOfLogs();
222 if (!elem) {Error("DoPlot", "No log elements\n"); return;}
223 TIter next(elem);
224 TProofLogElem *ple=0;
225
226 Int_t iwelem = 0;
227 Int_t imelem = 0;
228 TGraph *gr=0;
229
230 TList *selected = new TList;
231 fWorkers->GetSelectedEntries(selected);
232 TIter nextworker(selected);
233 TGTextLBEntry *selworker;
234 TLegend *legw = 0;
235 TLegend *legm = 0;
236
237 //delete the current multigraphs
238 if (fWPlot){
239 delete fWPlot;
240 fWPlot = 0;
241 }
242 if (fMPlot) {
243 delete fMPlot;
244 fMPlot = 0;
245 }
246
247 //loop over the selected workers in the list
248 Int_t max = -1;
249 Int_t min = -1;
250 while ((selworker=(TGTextLBEntry*)nextworker())){
251
252 snprintf(name, sizeof(name)-1, "%s", selworker->GetText()->GetString());
253 char *token;
254 token = strtok(name, " ");
255 if (token && !strcmp(token, "average")) { //change that to id comparison later
256 gr = DoAveragePlot(max, min);
257 if (gr && gr->GetN()>0){
258 if (!fWPlot) {
259 fWPlot = new TMultiGraph();
260 }
261 if (!legw) {
262 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
263 legw->SetHeader("Workers");
264 }
265 gr->SetMarkerColor(1);
266 gr->SetMarkerStyle(2);
267 gr->SetMarkerSize(1);
268 gr->SetLineWidth(2);
269 gr->SetLineColor(1);
270 fWPlot->Add(gr, "l");
271 legw->AddEntry(gr, token, "l");
272 }
273 TProofLogElem *pltemp = (TProofLogElem*)elem->At(min+1);
274 gr = DoWorkerPlot(pltemp);
275 if (gr && gr->GetN()>0){
276 if (!fWPlot) {
277 fWPlot = new TMultiGraph();
278 }
279 if (!legw) {
280 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
281 legw->SetHeader("Workers");
282 }
283 gr->SetLineWidth(2);
284 gr->SetLineColor(2);
285 gr->SetLineStyle(3);
286 fWPlot->Add(gr, "l");
287 legw->AddEntry(gr, TString::Format("%s - min", pltemp->GetName()) , "l");
288 }
289 pltemp = (TProofLogElem*)elem->At(max+1);
290 gr = DoWorkerPlot(pltemp);
291 if (gr && gr->GetN()>0){
292 if (!fWPlot) {
293 fWPlot = new TMultiGraph();
294 }
295 if (!legw) {
296 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
297 legw->SetHeader("Workers");
298 }
299 gr->SetLineWidth(2);
300 gr->SetLineColor(2);
301 gr->SetLineStyle(2);
302 fWPlot->Add(gr, "l");
303 legw->AddEntry(gr, TString::Format("%s - max", pltemp->GetName()), "l");
304 }
305
306 continue;
307 }
308
309
310 ple = (TProofLogElem*)elem->FindObject(token);
311 const char *role = ple->GetRole();
312 if (role[0]=='w'){
313 //role should be equal to "worker", only check the 1st char
314
315 gr = DoWorkerPlot(ple);
316 if (gr && gr->GetN()>0) {
317 if (!fWPlot) {
318 fWPlot = new TMultiGraph();
319 }
320 if (!legw) {
321 legw = new TLegend(0.1, 0.7, 0.4, 0.9);
322 legw->SetHeader("Workers");
323 }
324 gr->SetLineWidth(2);
325 gr->SetLineColor(iwelem+3);
326 fWPlot->Add(gr, "l");
327 legw->AddEntry(gr, token, "l");
328 iwelem++;
329 }
330 } else {
331 //a master or submaster log
332 //display without meaningful labels for now
333 gr = DoMasterPlot(ple);
334 if (gr && gr->GetN()>0){
335 if (!fMPlot){
336 fMPlot = new TMultiGraph();
337 }
338 if (!legm) {
339 legm = new TLegend(0.1, 0.7, 0.4, 0.9);
340 legm->SetHeader("Master");
341 }
342 gr->SetLineWidth(2);
343 gr->SetLineColor(imelem+1);
344 fMPlot->Add(gr, "l");
345 legm->AddEntry(gr, token, "l");
346 imelem++;
347 }
348 }
349
350 }
351
352 if (fWPlot){
354 fWPlot->Draw("a");
355 if (fWPlot->GetXaxis())
356 fWPlot->GetXaxis()->SetTitle("Events Processed");
357 if (fWPlot->GetYaxis())
358 fWPlot->GetYaxis()->SetTitle("MBytes");
359 if (legw) legw->Draw();
360
361 }
362 if (fMPlot) {
364 fMPlot->Draw("a");
365 if (fMPlot->GetXaxis())
366 fMPlot->GetXaxis()->SetTitle("Objects Merged");
367 if (fMPlot->GetYaxis())
368 fMPlot->GetYaxis()->SetTitle("MBytes");
369 if (legm) legm->Draw();
370 }
373
374 delete selected;
375}
376
377////////////////////////////////////////////////////////////////////////////////
378/// Create the average plots
379
381{
382 TList *elem = fProofLog->GetListOfLogs();
383 if (!elem) {
384 Error("DoAveragePlot", "Empty log");
385 return 0;
386 }
387 TIter next(elem);
388
389 TProofLogElem *ple=0;
390 Double_t max_av = 0;
391 Double_t min_av = 10E9;
392
393 Long64_t maxevent = 0;
394 Long64_t step = -1;
395 TObjString *curline = 0;
396 TObjString *prevline = 0;
397 Long64_t curevent_value;
398 Long64_t prevevent_value;
399 Long64_t *last = new Long64_t[elem->GetEntries()];
400 Long64_t vmem = -1, rmem = -1, nevt = -1;
401 TString token;
402 Int_t ielem=0;
403 for (Int_t i=0; i<elem->GetEntries(); i++) {
404 last[i] = 0;
405 }
406 while ((ple = (TProofLogElem *)next())){
407 //find the maximal entry processed in the last query
408 const char *role = ple->GetRole();
409 if (role[0] != 'w') continue; //skip the master log
410 TList *lines = ple->GetMacro()->GetListOfLines();
411 if (!lines || lines->GetSize() <= 0) continue;
412 curline = (TObjString *) lines->Last();
413 if (!curline) continue;
414 curevent_value = 0;
415 if (ParseLine(curline->String(), vmem, rmem, curevent_value) != 0) {
416 Warning("DoAveragePlot", "error parsing line: '%s'", curline->String().Data());
417 continue;
418 }
419 if (maxevent < curevent_value) maxevent = curevent_value;
420 last[ielem] = curevent_value;
421 if (step < 0) {
422 // Find the step
423 prevline = (TObjString *)lines->Before(curline);
424 if (prevline) {
425 prevevent_value = 0;
426 if (ParseLine(prevline->String(), vmem, rmem, prevevent_value) != 0) {
427 Warning("DoAveragePlot", "error parsing line: '%s'", curline->String().Data());
428 } else {
429 step = curevent_value - prevevent_value;
430 }
431 }
432 }
433 ielem++;
434 }
435 Int_t maxlines = Int_t(maxevent/(1.*step));
436 //transform the array of last event numbers to an array of numbers of lines
437 for (Int_t i=0; i<ielem; i++){
438 last[i] /= step;
439 }
440
441 Double_t *av_mem = new Double_t[maxlines];
442 Int_t *nw = new Int_t[maxlines];
443 for (Int_t i=0; i<maxlines; i++){
444 av_mem[i]=0;
445 nw[i]=0;
446 }
447 next.Reset();
448 ielem=0;
449 Int_t iline=0;
450 Double_t cur_av;
451 while ((ple = (TProofLogElem*)next())){
452 const char *role = ple->GetRole();
453 if (role[0]!='w') continue;
454 TList *lines = ple->GetMacro()->GetListOfLines();
455 if (!lines || lines->GetSize() <= 0) continue;
456 TIter prev(lines, kIterBackward);
457 iline=0;
458 cur_av = 0;
459 while ((curline = (TObjString*)prev()) && iline<last[ielem]){
460 // a backward loop, so that only the last query is counted
461 vmem = 0;
462 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
463 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
464 continue;
465 }
466 av_mem[last[ielem] -1 - iline] += vmem; //last[ielem] is the number of lines for
467 nw[last[ielem] -1 - iline]++; //this query and this element
468 if (last[ielem] > 0) cur_av += (Double_t)vmem / last[ielem];
469 iline++;
470 }
471 if (cur_av > max_av){
472 max_av = cur_av;
473 max_el = ielem;
474 }
475 if (cur_av < min_av){
476 min_av = cur_av;
477 min_el = ielem;
478 }
479 ielem++;
480 }
481
482 TGraph *gr = new TGraph(maxlines);
483 //make an average
484 for (Int_t i=0; i<maxlines; i++){
485 gr->SetPoint(i, (i+1)*step, av_mem[i]/(nw[i]*1024.));
486 }
487 delete [] av_mem;
488 av_mem = 0;
489 delete [] nw;
490 nw = 0;
491 delete [] last;
492 last = 0;
493 return gr;
494
495}
496
497////////////////////////////////////////////////////////////////////////////////
498/// Extract from line 'l' the virtual memory 'v', the resident memory 'r' and the
499/// number of events 'e'.
500/// The line is assumed to be in the form
501/// "... Memory 130868 virtual 31540 ... event 5550"
502/// The fields are only filled if >= 0 .
503/// Return 0 on success, -1 if any of the values coudl not be filled (the output
504/// fields are not touched in such a case).
505
508{
509 // Something to parse is mandatory
510 if (l.IsNull()) return -1;
511
512 // At least one field needs to be filled
513 if (v < 0 && r < 0 && e < 0) return 0;
514
515 // Position at the start of the relevant info
516 Int_t from = kNPOS;
517 if ((from = l.Index("Memory")) == kNPOS) return -1;
518
519 // Prepare extraction
520 from += 7;
521 TString tok;
522
523 // The virtual memory
524 if (v >= 0) {
525 if (!l.Tokenize(tok, from, " ")) return -1;
526 v = tok.Atoll();
527 }
528
529 // The resident memory
530 if (r >= 0) {
531 if ((from = l.Index("virtual", from)) == kNPOS) return -1;
532 from += 8;
533 if (!l.Tokenize(tok, from, " ")) return -1;
534 r = tok.Atoll();
535 }
536
537 // The number of events
538 if (e >= 0) {
539 if ((from = l.Index("event", from)) == kNPOS) return -1;
540 from += 6;
541 if (!l.Tokenize(tok, from, " ")) return -1;
542 e = tok.Atoll();
543 }
544
545 // Done
546 return 0;
547}
548
549////////////////////////////////////////////////////////////////////////////////
550/// Make a memory consumption graph for a worker
551
553{
554 TObjString *curline;
555 TList *lines = ple->GetMacro()->GetListOfLines();
556 if (!lines) {
557 //the log is empty so far
558 return 0;
559 }
560
561 Long64_t vmem = -1, rmem = -1, nevt = -1;
562
563 //find the last event value
564 curline = (TObjString*)lines->Last();
565 Long64_t lastevent_value = 0;
566 if (ParseLine(curline->String(), vmem, rmem, lastevent_value) != 0) {
567 Error("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
568 return 0;
569 }
570
571 //find the step
572 TObjString *prevline = (TObjString*)lines->Before(curline);
573 Long64_t prevevent_value = 0;
574 if (prevline && ParseLine(prevline->String(), vmem, rmem, prevevent_value) != 0) {
575 Error("DoWorkerPlot", "error parsing line: '%s'", prevline->String().Data());
576 return 0;
577 }
578 Long64_t step = lastevent_value - prevevent_value;
579 if (step <= 0) {
580 Error("DoWorkerPlot", "null or negative step (%lld) - cannot continue", step);
581 return 0;
582 }
583
584 Int_t nlines = lastevent_value/step;
585 TGraph *gr = new TGraph(nlines);
586
587 TIter prevl(lines, kIterBackward);
588 Int_t iline = 0;
589 TString token;
590 while ((curline = (TObjString*)prevl()) && iline<nlines){
591 //iterate backwards so that only lines for the last query are taken
592 vmem = 0;
593 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
594 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
595 continue;
596 }
597 gr->SetPoint(nlines-1-iline, lastevent_value-iline*step, vmem/1024.);
598 iline++;
599 }
600
601 return gr;
602}
603
604////////////////////////////////////////////////////////////////////////////////
605/// a master or submaster log
606/// display without meaningful labels for now
607
609{
610 TList *lines = ple->GetMacro()->GetListOfLines();
611 TIter prevline(lines, kIterBackward);
612 Int_t iline=0;
613 TObjString *curline;
614 //count the number of lines that belong to the last query
615 while ((curline = (TObjString*)prevline())) {
616 if (curline->String().Contains("Start")) break;
617 iline++;
618 }
619
620 Long64_t vmem = -1, rmem = -1, nevt = -1;
621
622 Int_t nlines = iline;
623 TString token;
624 TGraph *gr = new TGraph(nlines);
625 prevline.Reset();
626 iline = 0;
627 while ((curline = (TObjString*)prevline()) && iline<nlines) {
628 //iterate backwards so that only lines for the last query are taken
629 vmem = 0;
630 if (ParseLine(curline->String(), vmem, rmem, nevt) != 0) {
631 Warning("DoWorkerPlot", "error parsing line: '%s'", curline->String().Data());
632 continue;
633 }
634 gr->SetPoint(nlines-iline, nlines-iline, vmem/1024.);
635 iline++;
636 }
637 return gr;
638}
639
640////////////////////////////////////////////////////////////////////////////////
641///actions of select all/clear all button
642
644{
646 Bool_t sel = id ? 0 : 1;
647
648 for (Int_t ie=0; ie<nen; ie++) {
649 fWorkers->Select(ie, sel);
650 }
651}
ROOT::R::TRInterface & r
Definition Object.C:4
#define SafeDelete(p)
Definition RConfig.hxx:547
#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:115
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:92
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:73
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
const Bool_t kIterBackward
Definition TCollection.h:41
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:166
@ kDeepCleanup
Definition TGFrame.h:50
@ kLHintsExpandY
Definition TGLayout.h:38
@ kLHintsLeft
Definition TGLayout.h:31
@ kLHintsCenterY
Definition TGLayout.h:35
@ kLHintsBottom
Definition TGLayout.h:36
@ kLHintsTop
Definition TGLayout.h:34
@ kLHintsExpandX
Definition TGLayout.h:37
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:727
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:708
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2504
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:1102
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1057
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1149
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:590
virtual void MapWindow()
map window
Definition TGFrame.h:228
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:351
virtual Int_t GetNumberOfEntries() const
Definition TGListBox.h:330
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
Definition TGListBox.h:326
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:1762
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1749
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:989
virtual void SetSplit(Bool_t split)
Set the split status of a button.
const char * GetString() const
Definition TGString.h:40
const TGString * GetText() const
Definition TGListBox.h:114
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition TGFrame.cxx:1916
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:2284
Int_t GetN() const
Definition TGraph.h:124
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:1099
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition TLegend.cxx:423
A doubly linked list.
Definition TList.h:44
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
TProofProgressMemoryPlot * fMemWindow
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:11714
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:866
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:2331
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2309
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:1967
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