#ifndef ROOT_TProofBench
#define ROOT_TProofBench
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TProofBenchTypes
#include "TProofBenchTypes.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class TFile;
class TProof;
class TProofBenchRunCPU;
class TProofBenchRunDataRead;
class TProofBenchDataSet;
class TProofBench : public TObject {
private:
Bool_t fUnlinkOutfile;
protected:
TProof* fProof;
TProof* fProofDS;
TFile *fOutFile;
TString fOutFileName;
Int_t fNtries;
TPBHistType *fHistType;
Int_t fNHist;
TPBReadType *fReadType;
TString fDataSet;
Int_t fNFilesWrk;
TString fCPUSel;
TString fCPUPar;
TString fDataSel;
TString fDataPar;
TString fDataGenSel;
TString fDataGenPar;
TProofBenchRunCPU *fRunCPU;
TProofBenchRunDataRead *fRunDS;
TProofBenchDataSet *fDS;
Bool_t fDebug;
public:
TProofBench(const char *url, const char *outfile = "<default>", const char *proofopt = 0);
virtual ~TProofBench();
Int_t RunCPU(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1, Int_t step=-1);
Int_t RunCPUx(Long64_t nevents=-1, Int_t start=-1, Int_t stop=-1);
Int_t RunDataSet(const char *dset = "BenchDataSet",
Int_t start = 1, Int_t stop = -1, Int_t step = 1);
Int_t RunDataSetx(const char *dset = "BenchDataSet", Int_t start = 1, Int_t stop = -1);
Int_t CopyDataSet(const char *dset, const char *dsetdst, const char *destdir);
Int_t MakeDataSet(const char *dset = 0, Long64_t nevt = -1, const char *fnroot = "event",
Bool_t regenerate = kFALSE);
Int_t ReleaseCache(const char *dset);
Int_t RemoveDataSet(const char *dset);
void CloseOutFile();
Int_t OpenOutFile(Bool_t wrt = kFALSE, Bool_t verbose = kTRUE);
Int_t SetOutFile(const char *outfile, Bool_t verbose = kTRUE);
const char *GetOutFileName() const { return fOutFileName; }
void SetNFilesWrk(Int_t nf = 0) { fNFilesWrk = (nf > 0) ? nf : 4; }
void SetNTries(Int_t nt) { if (nt > 0) fNtries = nt; }
void SetHistType(TPBHistType *histtype) { fHistType = histtype; }
void SetNHist(Int_t nh) { fNHist = nh; }
void SetReadType(TPBReadType *readtype) { fReadType = readtype; }
void SetCPUSel(const char *sel) { fCPUSel = sel; }
void SetCPUPar(const char *par) { fCPUPar = par; }
void SetDataSel(const char *sel) { fDataSel = sel; }
void SetDataPar(const char *par) { fDataPar = par; }
void SetDataGenSel(const char *sel) { fDataGenSel = sel; }
void SetDataGenPar(const char *par) { fDataGenPar = par; }
void SetProofDS(TProof *p);
void SetDebug(Bool_t debug = kTRUE) { fDebug = debug; }
Bool_t GetDebug() { return fDebug; }
static void DrawCPU(const char *outfile, const char *opt = "std:");
static void DrawDataSet(const char *outfile, const char *opt = "std:", const char *type = "mbs");
ClassDef(TProofBench, 0)
};
#endif