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