Logo ROOT   6.12/07
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; }
124  void SetDirProofBench(TDirectory* dir) { fDirProofBench = dir; }
125  void SetFilesPerWrk(Int_t fpw) { fFilesPerWrk = fpw; }
126  void SetReleaseCache(Bool_t on = kTRUE) { fReleaseCache = on; }
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
Int_t SetParameters()
Set parameters.
void Print(Option_t *option="") const
Print the content of this object.
Abstract base class for PROOF benchmark runs.
long long Long64_t
Definition: RtypesCore.h:69
TPBReadType * GetReadType() const
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:23
const char Option_t
Definition: RtypesCore.h:62
void SetNEvents(Long64_t nevents)
void FillPerfStatProfiles(TTree *t, Int_t nactive)
const char * GetName() const
Returns name of object.
Basic string class.
Definition: TString.h:125
TCanvas * GetCPerfProfiles() const
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Handle operations on datasets used by ProofBench.
Profile Histogram.
Definition: TProfile.h:32
void Run(Long64_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
#define ClassDef(name, id)
Definition: Rtypes.h:320
Int_t DeleteParameters()
Delete parameters set for this run.
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)
void SetReleaseCache(Bool_t on=kTRUE)
A doubly linked list.
Definition: TList.h:44
void SetDirProofBench(TDirectory *dir)
Service class for 2-Dim histogram classes.
Definition: TH2.h:30
TFileCollection * GetDataSet(const char *dset, Int_t nact, Bool_t nx)
Get a subsample of dsname suited to run with 'nact' and option 'nx'.
TProofBenchDataSet * fDS
TString GetNameStem() const
Get name for this run.
The Canvas class.
Definition: TCanvas.h:31
void DrawPerfProfiles()
Get canvas.
Describe directory structure in memory.
Definition: TDirectory.h:34
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
void SetReadType(TPBReadType *readtype)
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
A TTree object has a header with a name and a title.
Definition: TTree.h:70
const Bool_t kTRUE
Definition: RtypesCore.h:87
TDirectory * GetDirProofBench() const
I/O-intensive PROOF benchmark test reads in event files distributed on the cluster.
PROOF worker node information.
Definition: TProofNodes.h:28
virtual ~TProofBenchRunDataRead()
Destructor.