Logo ROOT   6.18/05
Reference Guide
TProofBenchRunCPU.cxx
Go to the documentation of this file.
1// @(#)root/proof:$Id$
2// Author: Sangsu Ryu 22/06/2010
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, 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/** \class TProofBenchRunCPU
13\ingroup proofbench
14
15CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
16No I/O activity is involved.
17
18*/
19
20#include "RConfigure.h"
21
22#include "TProofBenchRunCPU.h"
23#include "TProofNodes.h"
24#include "TProofPerfAnalysis.h"
25#include "TFileCollection.h"
26#include "TFileInfo.h"
27#include "TProof.h"
28#include "TString.h"
29#include "Riostream.h"
30#include "TMap.h"
31#include "TEnv.h"
32#include "TTree.h"
33#include "TLeaf.h"
34#include "TCanvas.h"
35#include "TROOT.h"
36#include "TH2.h"
37#include "TF1.h"
38#include "TProfile.h"
39#include "TLegend.h"
40#include "TKey.h"
41#include "TRegexp.h"
42#include "TPerfStats.h"
43#include "TQueryResult.h"
44#include "TMath.h"
45#include "TStyle.h"
46#include "TProofNodes.h"
47#include "TGraphErrors.h"
48#include "TLegend.h"
49
51
52////////////////////////////////////////////////////////////////////////////////
53/// Default constructor
54
56 TDirectory* dirproofbench, TProof* proof,
57 TProofNodes* nodes, Long64_t nevents, Int_t ntries,
58 Int_t start, Int_t stop, Int_t step, Int_t draw,
59 Int_t debug)
61 fHistType(histtype), fNHists(nhists),
62 fNEvents(nevents), fNTries(ntries), fStart(start), fStop(stop),
63 fStep(step), fDraw(draw), fDebug(debug), fDirProofBench(dirproofbench),
64 fNodes(nodes), fListPerfPlots(0),
65 fCanvas(0), fProfile_perfstat_event(0), fHist_perfstat_event(0),
66 fProfile_perfstat_evtmax(0), fNorm_perfstat_evtmax(0),
67 fProfile_queryresult_event(0), fNorm_queryresult_event(0), fProfile_cpu_eff(0),
68 fProfLegend(0), fNormLegend(0), fName(0)
69{
71 Error("TProofBenchRunCPU", "problems validating PROOF session or enabling selector PAR");
72 return;
73 }
74
75 fName = "CPU";
76
77 if (!fNodes) fNodes = new TProofNodes(fProof);
78
79 if (stop == -1) fStop = fNodes->GetNWorkersCluster();
80
82
83 gEnv->SetValue("Proof.StatsTrace",1);
85}
86
87////////////////////////////////////////////////////////////////////////////////
88/// Destructor
89
91{
92 fProof=0;
99}
100
101////////////////////////////////////////////////////////////////////////////////
102/// Build histograms, profiles and graphs needed for this run
103
105{
106 TObject *o = 0;
107 Int_t quotient = (stop - start) / step;
108 Int_t ndiv = quotient + 1;
109 Double_t ns_min = start - step/2.;
110 Double_t ns_max = quotient*step + start + step/2.;
111
112 fProfLegend = new TLegend(0.1, 0.8, 0.3, 0.9);
113 fNormLegend = new TLegend(0.7, 0.8, 0.9, 0.9);
114
115 TString axtitle("Active Workers"), namelab(GetName()), sellab(GetSelName());
116 if (nx) {
117 axtitle = "Active Workers/Node";
118 namelab.Form("x_%s", GetName());
119 }
121 sellab.Form("%s_%s", GetSelName(), GetNameStem().Data());
122
123 TString name, title;
124
125 // Book perfstat profile (max evts)
126 name.Form("Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
127 title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
128 fProfile_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
134 if ((o = fListPerfPlots->FindObject(name))) {
136 delete o;
137 }
140
141 // Book perfstat profile
142 name.Form("Prof_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
143 title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
144 fProfile_perfstat_event = new TProfile(name, title, ndiv, ns_min, ns_max);
146 fProfile_perfstat_event->GetYaxis()->SetTitle("Events/sec");
149 if ((o = fListPerfPlots->FindObject(name))) {
151 delete o;
152 }
155
156 // Book perfstat histogram
157 name.Form("Hist_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
158 title.Form("Histogram %s PerfStat Event - %s", namelab.Data(), sellab.Data());
159 fHist_perfstat_event = new TH2D(name, title, ndiv, ns_min, ns_max, 100, 0, 0);
161 fHist_perfstat_event->GetYaxis()->SetTitle("Events/sec");
164 if ((o = fListPerfPlots->FindObject(name))) {
166 delete o;
167 }
169
170 // Book normalized perfstat profile (max evts)
171 name.Form("Norm_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
172 title.Form("Profile %s Normalized PerfStat Event - %s", namelab.Data(), sellab.Data());
173 fNorm_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
175 fNorm_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
179 if ((o = fListPerfPlots->FindObject(name))) {
181 delete o;
182 }
185
186 // Book queryresult profile
187 name.Form("Prof_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
188 title.Form("Profile %s QueryResult Event - %s", namelab.Data(), sellab.Data());
189 fProfile_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
194 if ((o = fListPerfPlots->FindObject(name))) {
196 delete o;
197 }
199
200 // Book normalized queryresult profile
201 name.Form("Norm_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
202 title.Form("Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.Data());
203 fNorm_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
205 fNorm_queryresult_event->GetYaxis()->SetTitle("Events/sec");
208 if ((o = fListPerfPlots->FindObject(name))) {
210 delete o;
211 }
214
215 // Book CPU efficiency profile
216 name.Form("Prof_%s_CPU_eff_%s", namelab.Data(), sellab.Data());
217 title.Form("Profile %s CPU efficiency - %s", namelab.Data(), sellab.Data());
218 fProfile_cpu_eff = new TProfile(name, title, ndiv, ns_min, ns_max);
220 fProfile_cpu_eff->GetYaxis()->SetTitle("Efficiency");
223 if ((o = fListPerfPlots->FindObject(name))) {
225 delete o;
226 }
228}
229
230////////////////////////////////////////////////////////////////////////////////
231/// Run benchmark
232/// Input parameters
233/// nevents: Number of events to run per file. When it is -1, use data member fNEvents.
234/// start: Start scan with 'start' workers. When it is -1, use data member fStart.
235/// When 0, the same number of workers are activated on all nodes.
236/// stop: Stop scan at 'stop' workers. When it is -1 , use data member fStop.
237/// step: Scan every 'step' workers. When it is -1, use data member fStep.
238/// ntries: Number of repetitions. When it is -1, use data member fNTries.
239/// debug: debug switch. When it is -1, use data member fDebug.
240/// draw: draw switch. When it is -1, use data member fDraw.
241/// Returns
242/// Nothing
243
244void TProofBenchRunCPU::Run(Long64_t nevents, Int_t start, Int_t stop,
245 Int_t step, Int_t ntries, Int_t debug, Int_t draw)
246{
247 if (!fProof){
248 Error("Run", "Proof not set");
249 return;
250 }
251
252 nevents = (nevents == -1) ? fNEvents : nevents;
253 start = (start == -1) ? fStart : start;
254 stop = (stop == -1) ? fStop : stop;
255 step = (step == -1) ? fStep : step;
256 ntries = (ntries == -1) ? fNTries : ntries;
257 debug = (debug == -1) ? fDebug : debug;
258 draw = (draw == -1) ? fDraw : draw;
259
260 Bool_t nx = kFALSE;
261 if (step == -2){
262 nx = kTRUE;
263 start = fStart;
264 step = 1;
265 }
266
267 if (nx){
268 Int_t minnworkersanode = fNodes->GetMinWrksPerNode();
269 if (stop > minnworkersanode) stop = minnworkersanode;
270 }
271
272 // Load the selector, if needed
274 // Is it the default selector?
276 // Load the parfile
278 Info("Run", "Uploading '%s' ...", par.Data());
279 if (fProof->UploadPackage(par) != 0) {
280 Error("Run", "problems uploading '%s' - cannot continue", par.Data());
281 return;
282 }
283 Info("Run", "Enabling '%s' ...", kPROOF_BenchCPUSelPar);
285 Error("Run", "problems enabling '%s' - cannot continue", kPROOF_BenchCPUSelPar);
286 return;
287 }
288 } else {
289 if (fParList.IsNull()) {
290 Error("Run", "you should load the class '%s' before running the benchmark", fSelName.Data());
291 return;
292 } else {
293 TString par;
294 Int_t from = 0;
295 while (fParList.Tokenize(par, from, ",")) {
296 Info("Run", "Uploading '%s' ...", par.Data());
297 if (fProof->UploadPackage(par) != 0) {
298 Error("Run", "problems uploading '%s' - cannot continue", par.Data());
299 return;
300 }
301 Info("Run", "Enabling '%s' ...", par.Data());
302 if (fProof->EnablePackage(par) != 0) {
303 Error("Run", "problems enabling '%s' - cannot continue", par.Data());
304 return;
305 }
306 }
307 }
308 }
309 // Check
311 Error("Run", "failed to load '%s'", fSelName.Data());
312 return;
313 }
314 }
315
316 // Build histograms, profiles and graphs needed for this run
317 BuildHistos(start, stop, step, nx);
318
319 // Get pad
320 if (!fCanvas) fCanvas = new TCanvas("Canvas");
321 // Cleanup up the canvas
322 fCanvas->Clear();
323
324 // Divide the canvas as many as the number of profiles in the list
325 fCanvas->Divide(2,1);
326
327 TString perfstats_name = "PROOF_PerfStats";
328
330
331 if (nx){
332 Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s)/node,"
333 " every %d worker(s)/node.", start, stop, step);
334 } else {
335 Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s),"
336 " every %d worker(s).", start, stop, step);
337 }
338
339 Int_t npad = 1; //pad number
340
341 Int_t nnodes = fNodes->GetNNodes(); // Number of machines
342 Int_t ncores = fNodes->GetNCores(); // Number of cores
343
344 Double_t ymi = -1., ymx = -1., emx = -1.;
345 for (Int_t nactive = start; nactive <= stop; nactive += step) {
346
347 // For CPU effectiveness (ok for lite; should do it properly for standard clusters)
348 Int_t ncoren = (nactive < ncores) ? nactive : ncores;
349
350 // Actvate the wanted workers
351 Int_t nw = -1;
352 if (nx) {
353 TString workers;
354 workers.Form("%dx", nactive);
355 nw = fNodes->ActivateWorkers(workers);
356 } else {
357 nw = fNodes->ActivateWorkers(nactive);
358 }
359 if (nw < 0){
360 Error("Run", "could not activate the requested number of"
361 " workers/node on the cluster; skipping the test point"
362 " (%d workers/node)", nactive);
363 continue;
364 }
365
366 for (Int_t j = 0; j < ntries; j++) {
367
368 if (nx){
369 Info("Run", "Running CPU-bound tests with %d active worker(s)/node;"
370 " trial %d/%d", nactive, j + 1, ntries);
371 } else {
372 Info("Run", "Running CPU-bound tests with %d active worker(s);"
373 " trial %d/%d", nactive, j + 1, ntries);
374 }
375
376 Int_t nevents_all=0;
377 if (nx){
378 nevents_all=nevents*nactive*nnodes;
379 } else {
380 nevents_all=nevents*nactive;
381 }
382
383 // Process
384 fProof->Process(fSelName, nevents_all, fSelOption);
385
387
388 // Save perfstats
389 TTree *t = 0;
390 if (l) t = dynamic_cast<TTree*>(l->FindObject(perfstats_name.Data()));
391 if (t) {
392
393 //FillPerfStatPerfPlots(t, profile_perfstat_event, nactive);
394 FillPerfStatPerfPlots(t, nactive);
395
396 TProofPerfAnalysis pfa(t);
397 Double_t pf_eventrate = pfa.GetEvtRateAvgMax();
398// if (pf_eventrate > emx) emx = pf_eventrate;
399 fProfile_perfstat_evtmax->Fill(nactive, pf_eventrate);
400 fCanvas->cd(npad);
404 fProfLegend->Draw();
405 gPad->Update();
406 // The normalised histos
407 // Use the first bin to set the Y range for the histo
408 Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
409 fNorm_perfstat_evtmax->Fill(nactive, nert);
412 Double_t dy = 5 * e1;
413 if (dy / y1 < 0.2) dy = y1 * 0.2;
414 if (dy > y1) dy = y1*.999999;
415 if (ymi < 0.) ymi = y1 - dy;
416 if (fNorm_perfstat_evtmax->GetBinContent(nactive) < ymi)
417 ymi = fNorm_perfstat_evtmax->GetBinContent(nactive) / 2.;
418 if (ymx < 0.) ymx = y1 + dy;
419 if (fNorm_perfstat_evtmax->GetBinContent(nactive) > ymx)
420 ymx = fNorm_perfstat_evtmax->GetBinContent(nactive) * 1.5;
423 fCanvas->cd(npad + 1);
425 fNormLegend->Draw();
426 gPad->Update();
427
428 // Build up new name
429 TString newname = TString::Format("%s_%s_%dwrks%dthtry", t->GetName(), GetName(), nactive, j);
430 t->SetName(newname);
431
432 if (debug && fDirProofBench->IsWritable()){
433 TDirectory *curdir = gDirectory;
434 TString dirn = nx ? "RunCPUx" : "RunCPU";
435 if (!fDirProofBench->GetDirectory(dirn))
436 fDirProofBench->mkdir(dirn, "RunCPU results");
437 if (fDirProofBench->cd(dirn)) {
439 t->Write();
440 l->Remove(t);
441 } else {
442 Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
443 }
444 curdir->cd();
445 }
446
447 } else {
448 if (l)
449 Warning("Run", "%s: tree not found", perfstats_name.Data());
450 else
451 Error("Run", "PROOF output list is empty!");
452 }
453
454 // Performance measures from TQueryResult
455
456 const char *drawopt = t ? "LSAME" : "L";
457 TQueryResult *queryresult = fProof->GetQueryResult();
458 if (queryresult) {
459 queryresult->Print("F");
460 TDatime qr_start = queryresult->GetStartTime();
461 TDatime qr_end = queryresult->GetEndTime();
462 Float_t qr_proc = queryresult->GetProcTime();
463
464 Long64_t qr_entries = queryresult->GetEntries();
465
466 // Calculate event rate
467 Double_t qr_eventrate = qr_entries / Double_t(qr_proc);
468 if (qr_eventrate > emx) emx = qr_eventrate;
469
470 // Calculate and fill CPU efficiency
471 Float_t qr_cpu_eff = -1.;
472 if (qr_proc > 0.) {
473 qr_cpu_eff = queryresult->GetUsedCPU() / ncoren / qr_proc ;
474 fProfile_cpu_eff->Fill(nactive, qr_cpu_eff);
475 Printf("cpu_eff: %f", qr_cpu_eff);
476 }
477
478 // Fill and draw
479 fProfile_queryresult_event->Fill(nactive, qr_eventrate);
480 fCanvas->cd(npad);
482 fProfLegend->Draw();
483 gPad->Update();
484 // The normalised histo
485 Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
486 fNorm_queryresult_event->Fill(nactive, nert);
487 // Use the first bin to set the Y range for the histo
490 Double_t dy = 5 * e1;
491 if (dy / y1 < 0.2) dy = y1 * 0.2;
492 if (dy > y1) dy = y1*.999999;
493 if (ymi < 0.) ymi = y1 - dy;
494 if (fNorm_queryresult_event->GetBinContent(nactive) < ymi)
495 ymi = fNorm_queryresult_event->GetBinContent(nactive) / 2.;
496 if (ymx < 0.) ymx = y1 + dy;
497 if (fNorm_queryresult_event->GetBinContent(nactive) > ymx)
498 ymx = fNorm_queryresult_event->GetBinContent(nactive) * 1.5;
500// fNorm_queryresult_event->SetMinimum(ymi);
502 fCanvas->cd(npad+1);
504 fNormLegend->Draw();
505 } else {
506 Warning("Run", "TQueryResult not found!");
507 }
508 gPad->Update();
509
510 } // for iterations
511 } // for number of workers
512
513 // Make the result persistent
514 fCanvas->cd(npad);
518 fProfLegend->Draw();
519 fCanvas->cd(npad + 1);
522 fNormLegend->Draw();
523 gPad->Update();
524
525 //save performance profiles to file
527 TDirectory *curdir = gDirectory;
528 TString dirn = nx ? "RunCPUx" : "RunCPU";
529 if (!fDirProofBench->GetDirectory(dirn))
530 fDirProofBench->mkdir(dirn, "RunCPU results");
531 if (fDirProofBench->cd(dirn)) {
535 } else {
536 Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
537 }
538 curdir->cd();
539 }
540}
541
542////////////////////////////////////////////////////////////////////////////////
543
545{
546 // Fill performance profiles using tree 't'(PROOF_PerfStats).
547 // Input parameters
548 // t: Proof output tree (PROOF_PerfStat) containing performance statistics.
549 // profile: Profile to be filled up with information from tree 't'.
550 // nactive: Number of active workers processed the query.
551 // Return
552 // Nothing
553
554 // find perfstat profile
556 Error("FillPerfStatPerfPlots", "no perfstat profile found");
557 return;
558 }
559
560 // find perfstat histogram
562 Error("FillPerfStatPerfPlots", "no perfstat histogram found");
563 return;
564 }
565
566 // extract timing information
567 TPerfEvent pe;
568 TPerfEvent* pep = &pe;
569 t->SetBranchAddress("PerfEvents",&pep);
570 Long64_t entries = t->GetEntries();
571
572 Double_t event_rate_packet = 0;
573
574 for (Long64_t k=0; k<entries; k++) {
575
576 t->GetEntry(k);
577
578 // Skip information from workers
579 if (pe.fEvtNode.Contains(".")) continue;
580
582 if (pe.fProcTime != 0.0) {
583 event_rate_packet = pe.fEventsProcessed / pe.fProcTime;
584 fHist_perfstat_event->Fill(Double_t(nactive), event_rate_packet);
585 }
586 }
587 }
588
589 return;
590}
591
592////////////////////////////////////////////////////////////////////////////////
593/// Show settings
594
596{
597 Printf("+++ TProofBenchRunCPU +++++++++++++++++++++++++++++++++++++++++");
598 Printf("Name = %s", fName.Data());
599 if (fProof) fProof->Print(option);
600 Printf("fHistType = k%s", GetNameStem().Data());
601 Printf("fNHists = %d", fNHists);
602 Printf("fNEvents = %lld", fNEvents);
603 Printf("fNTries = %d", fNTries);
604 Printf("fStart = %d", fStart);
605 Printf("fStop = %d", fStop);
606 Printf("fStep = %d", fStep);
607 Printf("fDraw = %d", fDraw);
608 Printf("fDebug = %d", fDebug);
609 if (fDirProofBench)
610 Printf("fDirProofBench = %s", fDirProofBench->GetPath());
611 if (fNodes) fNodes->Print(option);
612 if (fListPerfPlots) fListPerfPlots->Print(option);
613 if (fCanvas)
614 Printf("Performance Canvas: Name = %s Title = %s",
616 Printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
617}
618
619////////////////////////////////////////////////////////////////////////////////
620/// Draw Performance plots
621
623{
624 // Get canvas
625 if (!fCanvas) fCanvas = new TCanvas("Canvas");
626
627 fCanvas->Clear();
628
629 // Divide the canvas as many as the number of profiles in the list
630 Int_t nprofiles = fListPerfPlots->GetSize();
631 if (nprofiles <= 2){
632 fCanvas->Divide(1,nprofiles);
633 } else {
634 Int_t nside = (Int_t)TMath::Sqrt((Float_t)nprofiles);
635 nside = (nside*nside<nprofiles)?nside+1:nside;
636 fCanvas->Divide(nside,nside);
637 }
638
639 Int_t npad=1;
641 TProfile* profile=0;
642 while ((profile=(TProfile*)(nxt()))){
643 fCanvas->cd(npad++);
644 profile->Draw();
645 gPad->Update();
646 }
647 return;
648}
649
650////////////////////////////////////////////////////////////////////////////////
651/// Set histogram type
652
654{
655 fHistType = histtype;
656 fName.Form("%sCPU", GetNameStem().Data());
657}
658
659////////////////////////////////////////////////////////////////////////////////
660/// Get name for this run
661
663{
664 TString namestem("+++undef+++");
665 if (fHistType) {
666 switch (fHistType->GetType()) {
668 namestem = "Hist1D";
669 break;
671 namestem = "Hist2D";
672 break;
674 namestem = "Hist3D";
675 break;
677 namestem = "HistAll";
678 break;
679 default:
680 break;
681 }
682 }
683 return namestem;
684}
685
686////////////////////////////////////////////////////////////////////////////////
687/// Set parameters
688
690{
691 if (!fProof) {
692 Error("SetParameters", "proof not set; Doing nothing");
693 return 1;
694 }
695
698 fProof->SetParameter("PROOF_BenchmarkNHists", fNHists);
699 fProof->SetParameter("PROOF_BenchmarkDraw", Int_t(fDraw));
700 return 0;
701}
702
703////////////////////////////////////////////////////////////////////////////////
704/// Delete parameters set for this run
705
707{
708 if (!fProof){
709 Error("DeleteParameters", "proof not set; Doing nothing");
710 return 1;
711 }
712 if (fProof->GetInputList()) {
713 TObject *type = fProof->GetInputList()->FindObject("PROOF_Benchmark_HistType");
715 }
716 fProof->DeleteParameters("PROOF_BenchmarkNHists");
717 fProof->DeleteParameters("PROOF_BenchmarkDraw");
718 return 0;
719}
720
#define SafeDelete(p)
Definition: RConfig.hxx:543
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
long long Long64_t
Definition: RtypesCore.h:69
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:365
#define gDirectory
Definition: TDirectory.h:218
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
const char *const kPROOF_BenchCPUSelPar
const char *const kPROOF_BenchSelCPUDef
const char *const kPROOF_BenchParDir
void Printf(const char *fmt,...)
R__EXTERN TStyle * gStyle
Definition: TStyle.h:406
#define gPad
Definition: TVirtualPad.h:286
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
The Canvas class.
Definition: TCanvas.h:31
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:712
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:693
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2895
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition: TDatime.h:37
Describe directory structure in memory.
Definition: TDirectory.h:34
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath.
Definition: TDirectory.cxx:400
virtual const char * GetPath() const
Returns the full path of the directory.
Definition: TDirectory.cxx:987
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Definition: TDirectory.cxx:497
virtual Bool_t IsWritable() const
Definition: TDirectory.h:168
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
Definition: TEnv.cxx:736
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Definition: TH1.cxx:8351
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Definition: TH1.h:316
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:394
TAxis * GetYaxis()
Definition: TH1.h:317
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:395
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:3028
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2981
2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:289
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH2.cxx:292
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 Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition: TLegend.cxx:423
A doubly linked list.
Definition: TList.h:44
virtual void Add(TObject *obj)
Definition: TList.h:87
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:819
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:575
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:399
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:866
@ kOverwrite
overwrite existing object with same name
Definition: TObject.h:88
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
@ kInvalidObject
if object ctor succeeded but object should not be used
Definition: TObject.h:68
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:854
EHistType GetType() const
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition: TPad.cxx:1166
const char * GetTitle() const
Returns title of object.
Definition: TPad.h:256
const char * GetName() const
Returns name of object.
Definition: TPad.h:255
TString fEvtNode
Definition: TPerfStats.h:42
TVirtualPerfStats::EEventType fType
Definition: TPerfStats.h:44
Double_t fProcTime
Definition: TPerfStats.h:54
Long64_t fEventsProcessed
Definition: TPerfStats.h:50
Profile Histogram.
Definition: TProfile.h:32
virtual Double_t GetBinError(Int_t bin) const
Return bin error of a Profile histogram.
Definition: TProfile.cxx:871
virtual Double_t GetBinContent(Int_t bin) const
Return bin content of a Profile histogram.
Definition: TProfile.cxx:807
Int_t Fill(const Double_t *v)
Definition: TProfile.h:54
CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
TString GetNameStem() const
Get name for this run.
void FillPerfStatPerfPlots(TTree *t, Int_t nactive)
TDirectory * fDirProofBench
Int_t DeleteParameters()
Delete parameters set for this run.
virtual ~TProofBenchRunCPU()
Destructor.
Int_t SetParameters()
Set parameters.
TProfile * fProfile_queryresult_event
void Print(Option_t *option="") const
Show settings.
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run.
TProfile * fNorm_queryresult_event
TProfile * fProfile_perfstat_evtmax
void Run(Long64_t nevents, Int_t start, Int_t stop, Int_t step, Int_t ntries, Int_t debug, Int_t draw)
Run benchmark Input parameters nevents: Number of events to run per file.
TProfile * fNorm_perfstat_evtmax
TProfile * fProfile_cpu_eff
void DrawPerfPlots()
Draw Performance plots.
TPBHistType * fHistType
TProfile * fProfile_perfstat_event
const char * GetName() const
Returns name of object.
TProofNodes * fNodes
void SetHistType(TPBHistType *histtype)
Set histogram type.
TProofBenchRunCPU(TPBHistType *histtype=0, Int_t nhists=16, TDirectory *dirproofbench=0, TProof *proof=0, TProofNodes *nodes=0, Long64_t nevents=1000000, Int_t ntries=2, Int_t start=1, Int_t stop=-1, Int_t step=1, Int_t draw=0, Int_t debug=0)
Default constructor.
Abstract base class for PROOF benchmark runs.
virtual const char * GetSelName()
TString fSelOption
PROOF worker node information
Definition: TProofNodes.h:28
Int_t ActivateWorkers(Int_t nwrks)
Description: Activate 'nwrks' workers; calls TProof::SetParallel and rebuild the internal lists Input...
Int_t GetNNodes() const
Definition: TProofNodes.h:49
Int_t GetMinWrksPerNode() const
Definition: TProofNodes.h:51
void Print(Option_t *option="") const
Description: Print node information.
Int_t GetNWorkersCluster() const
Definition: TProofNodes.h:48
Int_t GetNCores() const
Definition: TProofNodes.h:50
Set of tools to analyse the performance tree.
Double_t GetEvtRateAvgMax() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Definition: TProof.cxx:8417
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
Definition: TProof.cxx:4779
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'.
Definition: TProof.cxx:2130
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
Definition: TProof.cxx:9909
void SetParameter(const char *par, const char *value)
Set input list parameter.
Definition: TProof.cxx:9798
TList * GetOutputList()
Get list with all object created during processing (see Process()).
Definition: TProof.cxx:9784
virtual Long64_t Process(TDSet *dset, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process a data set (TDSet) using the specified selector (.C) file or Tselector object Entry- or event...
Definition: TProof.cxx:5279
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
Definition: TProof.cxx:9710
TList * GetInputList()
Get input list.
Definition: TProof.cxx:9729
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
Definition: TProof.cxx:8151
A container class for query results.
Definition: TQueryResult.h:36
Long64_t GetEntries() const
Definition: TQueryResult.h:122
TDatime GetEndTime() const
Definition: TQueryResult.h:118
void Print(Option_t *opt="") const
Print query content. Use opt = "F" for a full listing.
TDatime GetStartTime() const
Definition: TQueryResult.h:117
Float_t GetProcTime() const
Definition: TQueryResult.h:135
Float_t GetUsedCPU() const
Definition: TQueryResult.h:125
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
Definition: TROOT.cxx:3028
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition: TString.cxx:2197
Bool_t IsNull() const
Definition: TString.h:402
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
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Definition: TStyle.cxx:1444
A TTree represents a columnar dataset.
Definition: TTree.h:71
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8049
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition: TTree.cxx:8622
virtual Long64_t GetEntries() const
Definition: TTree.h:402
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition: TTree.cxx:5422
virtual void SetName(const char *name)
Change the name of this tree.
Definition: TTree.cxx:8851
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TTree.cxx:9370
Double_t Sqrt(Double_t x)
Definition: TMath.h:679
auto * l
Definition: textangle.C:4