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