Logo ROOT   6.10/09
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 
29 class TCanvas;
30 class TList;
31 class TProof;
32 class TProfile;
33 class TLegend;
34 class TH2;
35 class TTree;
36 
37 class TProofBenchMode;
38 class TProofNodes;
39 class TPBHistType;
40 
42 
43 private:
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 
80 protected:
81 
82  void FillPerfStatPerfPlots(TTree* t, Int_t nactive);
83 
86 
87 public:
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 
115  void SetDirProofBench(TDirectory* dir) { fDirProofBench = dir; }
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; }
127  TList* GetListPerfPlots() const { return fListPerfPlots; }
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
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:23
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:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void SetNTries(Int_t ntries)
Profile Histogram.
Definition: TProfile.h:32
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:297
TProfile * fProfile_perfstat_evtmax
void SetHistType(TPBHistType *histtype)
Set histogram type.
void SetDebug(Int_t debug)
A doubly linked list.
Definition: TList.h:43
TList * GetListPerfPlots() const
TDirectory * fDirProofBench
void SetNHists(Int_t nhists)
Service class for 2-Dim histogram classes.
Definition: TH2.h:30
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:31
TProfile * fNorm_queryresult_event
TProfile * fNorm_perfstat_evtmax
Int_t GetNHists() const
Describe directory structure in memory.
Definition: TDirectory.h:34
Int_t GetStep() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:320
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:78
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:28
void SetDraw(Int_t draw)