Logo ROOT  
Reference Guide
TProofBenchRunDataRead.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_TProofBenchRunDataRead
13 #define ROOT_TProofBenchRunDataRead
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TProofBenchRunDataRead //
18 // //
19 // I/O-intensive PROOF benchmark test reads in event files distributed //
20 // on the cluster. Number of events processed per second and size of //
21 // events processed per second are plotted against number of active //
22 // workers. Performance rate for unit packets and performance rate //
23 // for query are plotted. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #include "TString.h"
28 
29 #include "TProofBenchRun.h"
30 
31 class TProof;
32 class TCanvas;
33 class TH2;
34 class TProfile;
35 class TLegend;
36 class TTree;
37 class TFileCollection;
38 
39 class TProofBenchMode;
40 class TProofBenchDataSet;
41 class TProofNodes;
42 class TPBReadType;
43 
45 
46 private:
47  TProof* fProof; //pointer to proof
48 
49  TPBReadType *fReadType; //read type
50  TProofBenchDataSet *fDS; //dataset operations handler
51 
52  Long64_t fNEvents; //number of events per file
53  Int_t fNTries; //number of tries
54  Int_t fStart; //start number of workers
55  Int_t fStop; //stop number of workers
56  Int_t fStep; //test to be performed every fStep workers
57  Int_t fDebug; //debug switch
58  Int_t fFilesPerWrk; //# of files to be processed per worker
59  Bool_t fReleaseCache; // Release cache for data reads between runs
60 
61  TDirectory *fDirProofBench; //directory for proof outputs
62 
63  TProofNodes *fNodes; //list of nodes information
64 
65  TList *fListPerfPlots; //list of performance plots
79 
80  TLegend *fProfLegend_evt; // Legend for profiles evts
81  TLegend *fNormLegend_evt; // Legend for norms evts
82  TLegend *fProfLegend_mb; // Legend for profiles mbs
83  TLegend *fNormLegend_mb; // Legend for norms mbs
84 
85  TCanvas *fCPerfProfiles; //canvas for performance profile histograms
86 
87  TString fName; //name of this run
88 
89  void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx);
90 
91 protected:
92 
93  void FillPerfStatProfiles(TTree* t, Int_t nactive);
94 
97 
98 public:
99 
101  TDirectory* dirproofbench=0, TProof* proof=0, TProofNodes* nodes=0,
102  Long64_t nevents=-1, Int_t ntries=2, Int_t start=1, Int_t stop=-1,
103  Int_t step=1, Int_t debug=0);
104 
105  virtual ~TProofBenchRunDataRead();
106 
108  void Run(const char *dset, Int_t start, Int_t stop, Int_t step, Int_t ntries,
109  Int_t debug, Int_t);
110 
111  TFileCollection *GetDataSet(const char *dset, Int_t nact, Bool_t nx);
112 
113  void DrawPerfProfiles();
114 
115  void Print(Option_t* option="") const;
116 
117  void SetReadType(TPBReadType *readtype) { fReadType = readtype; }
118  void SetNEvents(Long64_t nevents) { fNEvents = nevents; }
119  void SetNTries(Int_t ntries) { fNTries = ntries; }
120  void SetStart(Int_t start) { fStart = start; }
121  void SetStop(Int_t stop) { fStop = stop; }
122  void SetStep(Int_t step) { fStep = step; }
123  void SetDebug(Int_t debug) { fDebug = debug; }
125  void SetFilesPerWrk(Int_t fpw) { fFilesPerWrk = fpw; }
127 
128  TPBReadType *GetReadType() const { return fReadType; }
129  Long64_t GetNEvents() const { return fNEvents; }
130  Int_t GetNTries() const { return fNTries; }
131  Int_t GetStart() const { return fStart; }
132  Int_t GetStop() const { return fStop; }
133  Int_t GetStep() const { return fStep; }
134  Int_t GetDebug() const { return fDebug; }
137  const char* GetName() const { return fName; }
138 
139  TString GetNameStem() const;
140 
141  ClassDef(TProofBenchRunDataRead,0) //IO-intensive PROOF benchmark
142 };
143 
144 #endif
TProofBenchRunDataRead::GetDebug
Int_t GetDebug() const
Definition: TProofBenchRunDataRead.h:134
TProofBenchRunDataRead::fNormLegend_evt
TLegend * fNormLegend_evt
Definition: TProofBenchRunDataRead.h:81
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TProofBenchRunDataRead::SetDebug
void SetDebug(Int_t debug)
Definition: TProofBenchRunDataRead.h:123
TProofNodes
Definition: TProofNodes.h:28
TProofBenchRunDataRead::fProfile_perfstat_event
TProfile * fProfile_perfstat_event
Definition: TProofBenchRunDataRead.h:66
TProofBenchRunDataRead::fProfile_queryresult_IO
TProfile * fProfile_queryresult_IO
Definition: TProofBenchRunDataRead.h:76
TProofBenchRunDataRead::fProfile_perfstat_IO
TProfile * fProfile_perfstat_IO
Definition: TProofBenchRunDataRead.h:72
TProofBenchRunDataRead::SetParameters
Int_t SetParameters()
Set parameters.
Definition: TProofBenchRunDataRead.cxx:750
TProofBenchRunDataRead::SetNTries
void SetNTries(Int_t ntries)
Definition: TProofBenchRunDataRead.h:119
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TTree
Definition: TTree.h:79
Int_t
int Int_t
Definition: RtypesCore.h:45
TProofBenchRunDataRead::GetCPerfProfiles
TCanvas * GetCPerfProfiles() const
Definition: TProofBenchRunDataRead.h:136
TProofBenchRunDataRead::DeleteParameters
Int_t DeleteParameters()
Delete parameters set for this run.
Definition: TProofBenchRunDataRead.cxx:767
TProofBenchRunDataRead::fStop
Int_t fStop
Definition: TProofBenchRunDataRead.h:55
TProofBenchRunDataRead::fListPerfPlots
TList * fListPerfPlots
Definition: TProofBenchRunDataRead.h:65
TProofBenchRunDataRead::GetNTries
Int_t GetNTries() const
Definition: TProofBenchRunDataRead.h:130
TString
Definition: TString.h:136
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TProofBenchRunDataRead::fReleaseCache
Bool_t fReleaseCache
Definition: TProofBenchRunDataRead.h:59
TString.h
TProofBenchRunDataRead::fDirProofBench
TDirectory * fDirProofBench
Definition: TProofBenchRunDataRead.h:61
bool
TProofBenchRunDataRead::fDebug
Int_t fDebug
Definition: TProofBenchRunDataRead.h:57
TProofBenchRunDataRead::SetDirProofBench
void SetDirProofBench(TDirectory *dir)
Definition: TProofBenchRunDataRead.h:124
TProofBenchRunDataRead::fProfile_perfstat_evtmax
TProfile * fProfile_perfstat_evtmax
Definition: TProofBenchRunDataRead.h:68
TProofBenchRunDataRead::fProfile_perfstat_IOmax
TProfile * fProfile_perfstat_IOmax
Definition: TProofBenchRunDataRead.h:74
TProofBenchRunDataRead::SetStart
void SetStart(Int_t start)
Definition: TProofBenchRunDataRead.h:120
TProofBenchRunDataRead::Run
void Run(Long64_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
Definition: TProofBenchRunDataRead.h:107
TProofBenchRunDataRead::GetReadType
TPBReadType * GetReadType() const
Definition: TProofBenchRunDataRead.h:128
TProofBenchRunDataRead::GetName
const char * GetName() const
Returns name of object.
Definition: TProofBenchRunDataRead.h:137
TProofBenchRunDataRead::fNorm_perfstat_evtmax
TProfile * fNorm_perfstat_evtmax
Definition: TProofBenchRunDataRead.h:69
TProofBenchRunDataRead::GetDataSet
TFileCollection * GetDataSet(const char *dset, Int_t nact, Bool_t nx)
Get a subsample of dsname suited to run with 'nact' and option 'nx'.
Definition: TProofBenchRunDataRead.cxx:525
TProofBenchRunDataRead::fNEvents
Long64_t fNEvents
Definition: TProofBenchRunDataRead.h:52
TProofBenchRunDataRead::fNormLegend_mb
TLegend * fNormLegend_mb
Definition: TProofBenchRunDataRead.h:83
TProofBenchRunDataRead::fDS
TProofBenchDataSet * fDS
Definition: TProofBenchRunDataRead.h:50
TProofBenchRunDataRead::fFilesPerWrk
Int_t fFilesPerWrk
Definition: TProofBenchRunDataRead.h:58
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TProofBenchRunDataRead::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: TProofBenchRunDataRead.cxx:784
TProofBenchRunDataRead::fNTries
Int_t fNTries
Definition: TProofBenchRunDataRead.h:53
TProofBenchDataSet
Definition: TProofBenchDataSet.h:27
TProofBenchRunDataRead::fProfile_queryresult_event
TProfile * fProfile_queryresult_event
Definition: TProofBenchRunDataRead.h:70
TProofBenchRun.h
TProofBenchRunDataRead::fProof
TProof * fProof
Definition: TProofBenchRunDataRead.h:47
TH2
Definition: TH2.h:30
TProofBenchRunDataRead::SetFilesPerWrk
void SetFilesPerWrk(Int_t fpw)
Definition: TProofBenchRunDataRead.h:125
TProofBenchRun
Definition: TProofBenchRun.h:28
TProofBenchRunDataRead::TProofBenchRunDataRead
TProofBenchRunDataRead(TProofBenchDataSet *pbds, TPBReadType *readtype=0, TDirectory *dirproofbench=0, TProof *proof=0, TProofNodes *nodes=0, Long64_t nevents=-1, Int_t ntries=2, Int_t start=1, Int_t stop=-1, Int_t step=1, Int_t debug=0)
Definition: TProofBenchRunDataRead.cxx:58
TProofBenchRunDataRead::fHist_perfstat_event
TH2 * fHist_perfstat_event
Definition: TProofBenchRunDataRead.h:67
TProofBenchRunDataRead::fProfLegend_evt
TLegend * fProfLegend_evt
Definition: TProofBenchRunDataRead.h:80
TProofBenchRunDataRead::DrawPerfProfiles
void DrawPerfProfiles()
Get canvas.
Definition: TProofBenchRunDataRead.cxx:693
TProfile
Definition: TProfile.h:32
TProofBenchRunDataRead::fCPerfProfiles
TCanvas * fCPerfProfiles
Definition: TProofBenchRunDataRead.h:85
TProofBenchRunDataRead::fProfLegend_mb
TLegend * fProfLegend_mb
Definition: TProofBenchRunDataRead.h:82
TProofBenchRunDataRead
Definition: TProofBenchRunDataRead.h:44
TProofBenchRunDataRead::fStart
Int_t fStart
Definition: TProofBenchRunDataRead.h:54
TCanvas
Definition: TCanvas.h:23
TProofBenchRunDataRead::fNorm_perfstat_IOmax
TProfile * fNorm_perfstat_IOmax
Definition: TProofBenchRunDataRead.h:75
TProofBenchRunDataRead::Print
void Print(Option_t *option="") const
Print the content of this object.
Definition: TProofBenchRunDataRead.cxx:669
TProofBenchRunDataRead::SetReadType
void SetReadType(TPBReadType *readtype)
Definition: TProofBenchRunDataRead.h:117
TProofBenchRunDataRead::SetStop
void SetStop(Int_t stop)
Definition: TProofBenchRunDataRead.h:121
TProofBenchRunDataRead::fReadType
TPBReadType * fReadType
Definition: TProofBenchRunDataRead.h:49
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TProofBenchRunDataRead::fNorm_queryresult_event
TProfile * fNorm_queryresult_event
Definition: TProofBenchRunDataRead.h:71
TProofBenchRunDataRead::FillPerfStatProfiles
void FillPerfStatProfiles(TTree *t, Int_t nactive)
Definition: TProofBenchRunDataRead.cxx:627
TProofBenchRunDataRead::GetStop
Int_t GetStop() const
Definition: TProofBenchRunDataRead.h:132
TProofBenchRunDataRead::fHist_perfstat_IO
TH2 * fHist_perfstat_IO
Definition: TProofBenchRunDataRead.h:73
TDirectory
Definition: TDirectory.h:40
TProofBenchRunDataRead::SetReleaseCache
void SetReleaseCache(Bool_t on=kTRUE)
Definition: TProofBenchRunDataRead.h:126
TProofBenchRunDataRead::fProfile_cpu_eff
TProfile * fProfile_cpu_eff
Definition: TProofBenchRunDataRead.h:78
TProofBenchRunDataRead::GetStep
Int_t GetStep() const
Definition: TProofBenchRunDataRead.h:133
TProof
Definition: TProof.h:316
TLegend
Definition: TLegend.h:23
TProofBenchRunDataRead::SetNEvents
void SetNEvents(Long64_t nevents)
Definition: TProofBenchRunDataRead.h:118
TProofBenchRunDataRead::fStep
Int_t fStep
Definition: TProofBenchRunDataRead.h:56
TPBReadType
Definition: TProofBenchTypes.h:33
TProofBenchRunDataRead::SetStep
void SetStep(Int_t step)
Definition: TProofBenchRunDataRead.h:122
TProofBenchRunDataRead::fNorm_queryresult_IO
TProfile * fNorm_queryresult_IO
Definition: TProofBenchRunDataRead.h:77
TProofBenchRunDataRead::fNodes
TProofNodes * fNodes
Definition: TProofBenchRunDataRead.h:63
TProofBenchRunDataRead::GetDirProofBench
TDirectory * GetDirProofBench() const
Definition: TProofBenchRunDataRead.h:135
TProofBenchRunDataRead::~TProofBenchRunDataRead
virtual ~TProofBenchRunDataRead()
Destructor.
Definition: TProofBenchRunDataRead.cxx:98
TProofBenchRunDataRead::GetNEvents
Long64_t GetNEvents() const
Definition: TProofBenchRunDataRead.h:129
TList
Definition: TList.h:44
TProofBenchRunDataRead::fName
TString fName
Definition: TProofBenchRunDataRead.h:87
TProofBenchRunDataRead::GetNameStem
TString GetNameStem() const
Get name for this run.
Definition: TProofBenchRunDataRead.cxx:726
int
TFileCollection
Definition: TFileCollection.h:39
TProofBenchRunDataRead::GetStart
Int_t GetStart() const
Definition: TProofBenchRunDataRead.h:131