#ifndef ROOT_TProofPerfAnalysis
#define ROOT_TProofPerfAnalysis
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TSortedList
#include "TSortedList.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class TFile;
class TH1F;
class TH2F;
class TList;
class TTree;
class TProofPerfAnalysis : public TNamed {
public:
class TFileInfo;
class TPackInfo;
class TWrkEntry;
class TWrkInfo;
class TWrkInfoFile;
private:
TFile *fFile;
TString fDirName;
TString fTreeName;
TTree *fTree;
TSortedList fWrksInfo;
TSortedList fFilesInfo;
Float_t fInitTime;
Float_t fMergeTime;
Float_t fMaxTime;
TH1F *fEvents;
TH1F *fPackets;
Double_t fEvtRateMax;
Double_t fMBRateMax;
Double_t fLatencyMax;
TH1F *fEvtRate;
TH1F *fEvtRateRun;
TH1F *fMBRate;
TH1F *fMBRateRun;
Double_t fEvtRateAvgMax;
Double_t fMBRateAvgMax;
Double_t fEvtRateAvg;
Double_t fMBRateAvg;
Int_t fDebug;
static Bool_t fgDebug;
Int_t CompareOrd(const char *ord1, const char *ord2);
void FillFileDist(TH1F *hf, TH1F *hb, TH2F *hx, Bool_t wdet = kFALSE);
void FillFileDistOneSrv(TH1F *hx, Bool_t wdet = kFALSE);
void FillWrkInfo(Bool_t force = kFALSE);
void FillFileInfo(Bool_t force = kFALSE);
TString GetCanvasTitle(const char *t);
void GetWrkFileList(TList *wl, TList *sl);
void LoadTree(TDirectory *dir);
public:
TProofPerfAnalysis(const char *perffile, const char *title = "",
const char *treename = "PROOF_PerfStats");
TProofPerfAnalysis(TTree *tree, const char *title = "");
virtual ~TProofPerfAnalysis();
Bool_t IsValid() const { return (fFile && fTree) ? kTRUE : kFALSE; }
Bool_t WrkInfoOK() const { return (fWrksInfo.GetSize() > 0) ? kTRUE : kFALSE; }
void EventDist();
void FileDist(Bool_t writedet = kFALSE);
void LatencyPlot(const char *wrks = 0);
void RatePlot(const char *wrks = 0);
void WorkerActivity();
void PrintWrkInfo(Int_t showlast = 10);
void PrintWrkInfo(const char *wrk);
void PrintFileInfo(Int_t showlast = 10, const char *opt = "", const char *out = 0);
void PrintFileInfo(const char *fn, const char *opt = "P", const char *out = 0);
void FileProcPlot(const char *fn, const char *out = 0);
void FileRatePlot(const char *fns = 0);
Double_t GetEvtRateAvgMax() const { return fEvtRateAvgMax; }
Double_t GetMBRateAvgMax() const { return fMBRateAvgMax; }
Double_t GetEvtRateAvg() const { return fEvtRateAvg; }
Double_t GetMBRateAvg() const { return fMBRateAvg; }
void GetAverages(Double_t &evtmax, Double_t &mbmax, Double_t &evt, Double_t &mb) const
{ evtmax = fEvtRateAvgMax; mbmax = fMBRateAvgMax; evt = fEvtRateAvg; mb = fMBRateAvg; return; }
void Summary(Option_t *opt = "", const char *out = "");
void SetDebug(Int_t d = 0);
static void SetgDebug(Bool_t on = kTRUE);
ClassDef(TProofPerfAnalysis, 0)
};
#endif