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 
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 
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
TProofBenchRunCPU::fStep
Int_t fStep
Definition: TProofBenchRunCPU.h:53
TProofBenchRunCPU::GetName
const char * GetName() const
Returns name of object.
Definition: TProofBenchRunCPU.h:129
TProofBenchRunCPU::fStop
Int_t fStop
Definition: TProofBenchRunCPU.h:52
TProofBenchRunCPU::fHist_perfstat_event
TH2 * fHist_perfstat_event
Definition: TProofBenchRunCPU.h:66
TProofBenchRunCPU::SetDraw
void SetDraw(Int_t draw)
Definition: TProofBenchRunCPU.h:112
TProofBenchRunCPU::fListPerfPlots
TList * fListPerfPlots
Definition: TProofBenchRunCPU.h:62
TProofBenchRunCPU::SetDirProofBench
void SetDirProofBench(TDirectory *dir)
Definition: TProofBenchRunCPU.h:115
TProofBenchRunCPU::fNEvents
Long64_t fNEvents
Definition: TProofBenchRunCPU.h:48
TProofBenchRunCPU::GetDirProofBench
TDirectory * GetDirProofBench() const
Definition: TProofBenchRunCPU.h:126
TProofBenchRunCPU::fProfLegend
TLegend * fProfLegend
Definition: TProofBenchRunCPU.h:73
TProofNodes
Definition: TProofNodes.h:28
TProofBenchRunCPU::FillPerfStatPerfPlots
void FillPerfStatPerfPlots(TTree *t, Int_t nactive)
Definition: TProofBenchRunCPU.cxx:542
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TProofBenchRunCPU::fProfile_perfstat_evtmax
TProfile * fProfile_perfstat_evtmax
Definition: TProofBenchRunCPU.h:67
TTree
Definition: TTree.h:79
TProofBenchRunCPU::Run
void Run(const char *, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
Definition: TProofBenchRunCPU.h:99
TProofBenchRunCPU::fProfile_perfstat_event
TProfile * fProfile_perfstat_event
Definition: TProofBenchRunCPU.h:65
TProofBenchRunCPU::Run
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.
Definition: TProofBenchRunCPU.cxx:242
TProofBenchRunCPU::SetNEvents
void SetNEvents(Long64_t nevents)
Definition: TProofBenchRunCPU.h:107
TProofBenchRunCPU::SetNTries
void SetNTries(Int_t ntries)
Definition: TProofBenchRunCPU.h:108
TString
Definition: TString.h:136
TProofBenchRunCPU::SetParameters
Int_t SetParameters()
Set parameters.
Definition: TProofBenchRunCPU.cxx:687
TString.h
bool
TProofBenchRunCPU
Definition: TProofBenchRunCPU.h:41
TProofBenchRunCPU::fNTries
Int_t fNTries
Definition: TProofBenchRunCPU.h:49
TProofBenchRunCPU::DrawPerfPlots
void DrawPerfPlots()
Draw Performance plots.
Definition: TProofBenchRunCPU.cxx:620
TProofBenchRunCPU::GetListPerfPlots
TList * GetListPerfPlots() const
Definition: TProofBenchRunCPU.h:127
TProofBenchRunCPU::GetNTries
Int_t GetNTries() const
Definition: TProofBenchRunCPU.h:120
TProofBenchRunCPU::SetNHists
void SetNHists(Int_t nhists)
Definition: TProofBenchRunCPU.h:106
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TProofBenchRunCPU::fProfile_queryresult_event
TProfile * fProfile_queryresult_event
Definition: TProofBenchRunCPU.h:69
TProofBenchRun.h
TPBHistType
Definition: TProofBenchTypes.h:57
TProofBenchRunCPU::~TProofBenchRunCPU
virtual ~TProofBenchRunCPU()
Destructor.
Definition: TProofBenchRunCPU.cxx:88
TProofBenchRunCPU::Print
void Print(Option_t *option="") const
Show settings.
Definition: TProofBenchRunCPU.cxx:593
TProofBenchRunCPU::SetDebug
void SetDebug(Int_t debug)
Definition: TProofBenchRunCPU.h:113
TProofBenchRunCPU::GetHistType
TPBHistType * GetHistType() const
Definition: TProofBenchRunCPU.h:117
TProofBenchRunCPU::SetHistType
void SetHistType(TPBHistType *histtype)
Set histogram type.
Definition: TProofBenchRunCPU.cxx:651
TProofBenchRunCPU::fDraw
Int_t fDraw
Definition: TProofBenchRunCPU.h:55
TH2
Definition: TH2.h:30
TProofBenchRunCPU::fNodes
TProofNodes * fNodes
Definition: TProofBenchRunCPU.h:60
TProofBenchRunCPU::fCanvas
TCanvas * fCanvas
Definition: TProofBenchRunCPU.h:63
TProofBenchRunCPU::GetNEvents
Long64_t GetNEvents() const
Definition: TProofBenchRunCPU.h:119
TProofBenchRunCPU::fNHists
Int_t fNHists
Definition: TProofBenchRunCPU.h:46
TProofBenchRun
Definition: TProofBenchRun.h:28
TProofBenchRunCPU::GetCanvas
TCanvas * GetCanvas() const
Definition: TProofBenchRunCPU.h:128
TProofBenchRunCPU::fDirProofBench
TDirectory * fDirProofBench
Definition: TProofBenchRunCPU.h:58
TProofBenchRunCPU::fStart
Int_t fStart
Definition: TProofBenchRunCPU.h:51
TProofBenchRunCPU::fDebug
Int_t fDebug
Definition: TProofBenchRunCPU.h:56
TProofBenchRunCPU::fNorm_perfstat_evtmax
TProfile * fNorm_perfstat_evtmax
Definition: TProofBenchRunCPU.h:68
TProfile
Definition: TProfile.h:32
TProofBenchRunCPU::SetStep
void SetStep(Int_t step)
Definition: TProofBenchRunCPU.h:111
TProofBenchRunCPU::fProfile_cpu_eff
TProfile * fProfile_cpu_eff
Definition: TProofBenchRunCPU.h:71
TProofBenchRunCPU::fHistType
TPBHistType * fHistType
Definition: TProofBenchRunCPU.h:45
TProofBenchRunCPU::TProofBenchRunCPU
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.
Definition: TProofBenchRunCPU.cxx:53
TCanvas
Definition: TCanvas.h:23
TProofBenchRunCPU::BuildHistos
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run.
Definition: TProofBenchRunCPU.cxx:102
TProofBenchRunCPU::SetStop
void SetStop(Int_t stop)
Definition: TProofBenchRunCPU.h:110
TProofBenchRunCPU::GetNHists
Int_t GetNHists() const
Definition: TProofBenchRunCPU.h:118
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TProofBenchRunCPU::GetNameStem
TString GetNameStem() const
Get name for this run.
Definition: TProofBenchRunCPU.cxx:660
TProofBenchRunCPU::fName
TString fName
Definition: TProofBenchRunCPU.h:76
TProofBenchRunCPU::DeleteParameters
Int_t DeleteParameters()
Delete parameters set for this run.
Definition: TProofBenchRunCPU.cxx:704
TDirectory
Definition: TDirectory.h:40
TProof
Definition: TProof.h:316
TProofBenchRunCPU::GetDebug
Int_t GetDebug() const
Definition: TProofBenchRunCPU.h:125
TProofBenchRunCPU::fNorm_queryresult_event
TProfile * fNorm_queryresult_event
Definition: TProofBenchRunCPU.h:70
TLegend
Definition: TLegend.h:23
TProofBenchRunCPU::GetStep
Int_t GetStep() const
Definition: TProofBenchRunCPU.h:123
TProofBenchRunCPU::GetDraw
Int_t GetDraw() const
Definition: TProofBenchRunCPU.h:124
TProofBenchRunCPU::SetStart
void SetStart(Int_t start)
Definition: TProofBenchRunCPU.h:109
TProofBenchRunCPU::fNormLegend
TLegend * fNormLegend
Definition: TProofBenchRunCPU.h:74
TProofBenchRunCPU::GetStop
Int_t GetStop() const
Definition: TProofBenchRunCPU.h:122
TList
Definition: TList.h:44
TProofBenchRunCPU::GetStart
Int_t GetStart() const
Definition: TProofBenchRunCPU.h:121
int