Logo ROOT  
Reference Guide
TProofBenchRunCPU.h
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#ifndef ROOT_TProofBenchRunCPU
13#define ROOT_TProofBenchRunCPU
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TProofBenchRunCPU //
18// //
19// CPU-intensive PROOF benchmark test generates events and fill 1, 2, //
20//or 3-D histograms. No I/O activity is involved. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TString.h"
25
26#include "TProofBenchRun.h"
27
28
29class TCanvas;
30class TList;
31class TProof;
32class TProfile;
33class TLegend;
34class TH2;
35class TTree;
36
37class TProofBenchMode;
38class TProofNodes;
39class TPBHistType;
40
42
43private:
44
45 TPBHistType *fHistType; //histogram type
46 Int_t fNHists; //number of histograms
47
48 Long64_t fNEvents; //number of events to generate
49 Int_t fNTries; //number of tries
50
51 Int_t fStart; //start number of workers to scan
52 Int_t fStop; //stop number of workers to scan
53 Int_t fStep; //test to be performed every fStep workers
54
55 Int_t fDraw; //draw switch
56 Int_t fDebug; //debug switch
57
58 TDirectory* fDirProofBench; //directory for proof outputs
59
60 TProofNodes* fNodes; //node information
61
62 TList* fListPerfPlots; //list of performance plots
63 TCanvas* fCanvas; //canvas for performance plots
64
72
73 TLegend *fProfLegend; // Legend for profiles
74 TLegend *fNormLegend; // Legend for norms
75
76 TString fName; //name of CPU run
77
78 void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx);
79
80protected:
81
82 void FillPerfStatPerfPlots(TTree* t, Int_t nactive);
83
86
87public:
88
89 TProofBenchRunCPU(TPBHistType *histtype = 0,
90 Int_t nhists=16, TDirectory* dirproofbench=0,
91 TProof* proof=0, TProofNodes* nodes=0,
92 Long64_t nevents=1000000, Int_t ntries=2, Int_t start=1,
93 Int_t stop=-1, Int_t step=1, Int_t draw=0, Int_t debug=0);
94
95 virtual ~TProofBenchRunCPU();
96
97 void Run(Long64_t nevents, Int_t start, Int_t stop, Int_t step, Int_t ntries,
98 Int_t debug, Int_t draw);
99 void Run(const char *, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t) { }
100
101 void DrawPerfPlots();
102
103 void Print(Option_t* option="") const;
104
105 void SetHistType(TPBHistType *histtype);
106 void SetNHists(Int_t nhists) { fNHists = nhists; }
107 void SetNEvents(Long64_t nevents) { fNEvents = nevents; }
108 void SetNTries(Int_t ntries) { fNTries = ntries; }
109 void SetStart(Int_t start) { fStart = start; }
110 void SetStop(Int_t stop) { fStop = stop; }
111 void SetStep(Int_t step) { fStep = step; }
112 void SetDraw(Int_t draw) { fDraw = draw; }
113 void SetDebug(Int_t debug) { fDebug = debug; }
114
116
117 TPBHistType *GetHistType() const { return fHistType; }
118 Int_t GetNHists() const { return fNHists; }
119 Long64_t GetNEvents() const { return fNEvents; }
120 Int_t GetNTries() const { return fNTries; }
121 Int_t GetStart() const { return fStart; }
122 Int_t GetStop() const { return fStop; }
123 Int_t GetStep() const { return fStep; }
124 Int_t GetDraw() const { return fDraw; }
125 Int_t GetDebug() const { return fDebug; }
128 TCanvas* GetCanvas() const { return fCanvas; }
129 const char* GetName() const { return fName; }
130
131 TString GetNameStem() const;
132
133 ClassDef(TProofBenchRunCPU,0) //CPU-intensive PROOF benchmark
134};
135
136#endif
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
long long Long64_t
Definition: RtypesCore.h:69
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
The Canvas class.
Definition: TCanvas.h:31
Describe directory structure in memory.
Definition: TDirectory.h:34
Service class for 2-Dim histogram classes.
Definition: TH2.h:30
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:23
A doubly linked list.
Definition: TList.h:44
Profile Histogram.
Definition: TProfile.h:32
CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
void SetStart(Int_t start)
void SetDebug(Int_t debug)
Int_t GetStop() const
TString GetNameStem() const
Get name for this run.
void Run(const char *, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
void FillPerfStatPerfPlots(TTree *t, Int_t nactive)
Long64_t GetNEvents() const
TCanvas * GetCanvas() const
Int_t GetStep() const
TDirectory * fDirProofBench
Int_t DeleteParameters()
Delete parameters set for this run.
virtual ~TProofBenchRunCPU()
Destructor.
void SetNEvents(Long64_t nevents)
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
TDirectory * GetDirProofBench() const
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.
TList * GetListPerfPlots() const
TProfile * fNorm_perfstat_evtmax
void SetNHists(Int_t nhists)
void SetNTries(Int_t ntries)
TPBHistType * GetHistType() const
void SetDraw(Int_t draw)
Int_t GetDraw() const
TProfile * fProfile_cpu_eff
void DrawPerfPlots()
Draw Performance plots.
void SetDirProofBench(TDirectory *dir)
Int_t GetDebug() const
Int_t GetStart() const
TPBHistType * fHistType
TProfile * fProfile_perfstat_event
const char * GetName() const
Returns name of object.
Int_t GetNTries() const
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.
Int_t GetNHists() const
void SetStep(Int_t step)
void SetStop(Int_t stop)
Abstract base class for PROOF benchmark runs.
PROOF worker node information
Definition: TProofNodes.h:28
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
Basic string class.
Definition: TString.h:131
A TTree represents a columnar dataset.
Definition: TTree.h:72