#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 TF1;
class TFile;
class TGraphErrors;
class TProfile;
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;
Int_t fNumWrkMax;
Bool_t fReleaseCache;
TString fCPUSel;
TString fCPUPar;
TString fDataSel;
TString fDataPar;
TString fDataGenSel;
TString fDataGenPar;
TString fSelOption;
TProofBenchRunCPU *fRunCPU;
TProofBenchRunDataRead *fRunDS;
TProofBenchDataSet *fDS;
Bool_t fDebug;
TNamed *fDescription;
static TGraphErrors *GetGraph(TDirectory *d, const char *pfn,
Int_t &nb, Double_t &xmi, Double_t &xmx,
Double_t &ymi, Double_t &ymx, Int_t &kmx, TProfile *&pf);
static TF1 *fgFp1;
static TF1 *fgFp1n;
static TF1 *fgFp2;
static TF1 *fgFp2n;
static TF1 *fgFp3;
static TF1 *fgFp3n;
static TF1 *fgFio;
static TF1 *fgFioV;
static TList *fgGraphs;
static void AssertFittingFun(Double_t mi, Double_t mx);
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 SetReleaseCache(Bool_t on = kTRUE) { fReleaseCache = on; }
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 SetSelOption(const char *opt) { fSelOption = opt; }
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:", Bool_t verbose = kFALSE,
Int_t dofit = 0, Int_t n0 = -1, Int_t n1 = -1);
static void DrawDataSet(const char *outfile, const char *opt = "std:", const char *type = "mbs", Bool_t verbose = kFALSE,
Int_t dofit = 0, Int_t n0 = -1, Int_t n1 = -1);
static void GetPerfSpecs(const char *path = ".", Int_t degfit = 1);
static void DrawEfficiency(const char *outfile, const char *opt = "", Bool_t verbose = kFALSE);
static TList *GetGraphs() { return fgGraphs; }
ClassDef(TProofBench, 0)
};
#endif