Logo ROOT   6.07/09
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 #ifndef ROOT_TString
28 #include "TString.h"
29 #endif
30 
31 #ifndef ROOT_TProofBenchRun
32 #include "TProofBenchRun.h"
33 #endif
34 
35 class TProof;
36 class TCanvas;
37 class TH2;
38 class TProfile;
39 class TLegend;
40 class TTree;
41 class TFileCollection;
42 
43 class TProofBenchMode;
44 class TProofBenchDataSet;
45 class TProofNodes;
46 class TPBReadType;
47 
49 
50 private:
51  TProof* fProof; //pointer to proof
52 
53  TPBReadType *fReadType; //read type
54  TProofBenchDataSet *fDS; //dataset operations handler
55 
56  Long64_t fNEvents; //number of events per file
57  Int_t fNTries; //number of tries
58  Int_t fStart; //start number of workers
59  Int_t fStop; //stop number of workers
60  Int_t fStep; //test to be performed every fStep workers
61  Int_t fDebug; //debug switch
62  Int_t fFilesPerWrk; //# of files to be processed per worker
63  Bool_t fReleaseCache; // Release cache for data reads between runs
64 
65  TDirectory *fDirProofBench; //directory for proof outputs
66 
67  TProofNodes *fNodes; //list of nodes information
68 
69  TList *fListPerfPlots; //list of performance plots
83 
84  TLegend *fProfLegend_evt; // Legend for profiles evts
85  TLegend *fNormLegend_evt; // Legend for norms evts
86  TLegend *fProfLegend_mb; // Legend for profiles mbs
87  TLegend *fNormLegend_mb; // Legend for norms mbs
88 
89  TCanvas *fCPerfProfiles; //canvas for performance profile histograms
90 
91  TString fName; //name of this run
92 
93  void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx);
94 
95 protected:
96 
97  void FillPerfStatProfiles(TTree* t, Int_t nactive);
98 
101 
102 public:
103 
105  TDirectory* dirproofbench=0, TProof* proof=0, TProofNodes* nodes=0,
106  Long64_t nevents=-1, Int_t ntries=2, Int_t start=1, Int_t stop=-1,
107  Int_t step=1, Int_t debug=0);
108 
109  virtual ~TProofBenchRunDataRead();
110 
112  void Run(const char *dset, Int_t start, Int_t stop, Int_t step, Int_t ntries,
113  Int_t debug, Int_t);
114 
115  TFileCollection *GetDataSet(const char *dset, Int_t nact, Bool_t nx);
116 
117  void DrawPerfProfiles();
118 
119  void Print(Option_t* option="") const;
120 
121  void SetReadType(TPBReadType *readtype) { fReadType = readtype; }
122  void SetNEvents(Long64_t nevents) { fNEvents = nevents; }
123  void SetNTries(Int_t ntries) { fNTries = ntries; }
124  void SetStart(Int_t start) { fStart = start; }
125  void SetStop(Int_t stop) { fStop = stop; }
126  void SetStep(Int_t step) { fStep = step; }
127  void SetDebug(Int_t debug) { fDebug = debug; }
128  void SetDirProofBench(TDirectory* dir) { fDirProofBench = dir; }
129  void SetFilesPerWrk(Int_t fpw) { fFilesPerWrk = fpw; }
130  void SetReleaseCache(Bool_t on = kTRUE) { fReleaseCache = on; }
131 
132  TPBReadType *GetReadType() const { return fReadType; }
133  Long64_t GetNEvents() const { return fNEvents; }
134  Int_t GetNTries() const { return fNTries; }
135  Int_t GetStart() const { return fStart; }
136  Int_t GetStop() const { return fStop; }
137  Int_t GetStep() const { return fStep; }
138  Int_t GetDebug() const { return fDebug; }
141  const char* GetName() const { return fName; }
142 
143  TString GetNameStem() const;
144 
145  ClassDef(TProofBenchRunDataRead,0) //IO-intensive PROOF benchmark
146 };
147 
148 #endif
const int nx
Definition: kalman.C:16
Int_t SetParameters()
Set parameters.
Abstract base class for PROOF benchmark runs.
long long Long64_t
Definition: RtypesCore.h:69
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:27
TString GetNameStem() const
Get name for this run.
const char Option_t
Definition: RtypesCore.h:62
void SetNEvents(Long64_t nevents)
void FillPerfStatProfiles(TTree *t, Int_t nactive)
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Handle operations on datasets used by ProofBench.
Profile Historam.
Definition: TProfile.h:34
void Print(Option_t *option="") const
Print the content of this object.
void Run(Long64_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
#define ClassDef(name, id)
Definition: Rtypes.h:254
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:47
void SetDirProofBench(TDirectory *dir)
Service class for 2-Dim histogram classes.
Definition: TH2.h:36
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
The Canvas class.
Definition: TCanvas.h:41
void DrawPerfProfiles()
Get canvas.
TDirectory * GetDirProofBench() const
TPBReadType * GetReadType() const
const char * GetName() const
Returns name of object.
Describe directory structure in memory.
Definition: TDirectory.h:44
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:346
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...
bool debug
A TTree object has a header with a name and a title.
Definition: TTree.h:98
const Bool_t kTRUE
Definition: Rtypes.h:91
TCanvas * GetCPerfProfiles() const
I/O-intensive PROOF benchmark test reads in event files distributed on the cluster.
PROOF worker node information.
Definition: TProofNodes.h:30
virtual ~TProofBenchRunDataRead()
Destructor.