00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TTreePerfStats
00013 #define ROOT_TTreePerfStats
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TVirtualPerfStats
00025 #include "TVirtualPerfStats.h"
00026 #endif
00027 #ifndef ROOT_TString
00028 #include "TString.h"
00029 #endif
00030
00031
00032 class TBrowser;
00033 class TFile;
00034 class TTree;
00035 class TStopwatch;
00036 class TPaveText;
00037 class TGraphErrors;
00038 class TGaxis;
00039 class TText;
00040 class TTreePerfStats : public TVirtualPerfStats {
00041
00042 protected:
00043 Int_t fTreeCacheSize;
00044 Int_t fNleaves;
00045 Int_t fReadCalls;
00046 Int_t fReadaheadSize;
00047 Long64_t fBytesRead;
00048 Long64_t fBytesReadExtra;
00049 Double_t fRealNorm;
00050 Double_t fRealTime;
00051 Double_t fCpuTime;
00052 Double_t fDiskTime;
00053 Double_t fCompress;
00054 TString fName;
00055 TString fHostInfo;
00056 TFile *fFile;
00057 TTree *fTree;
00058 TGraphErrors *fGraphIO ;
00059 TGraphErrors *fGraphTime ;
00060 TPaveText *fPave;
00061 TStopwatch *fWatch;
00062 TGaxis *fRealTimeAxis;
00063 TText *fHostInfoText;
00064
00065 public:
00066 TTreePerfStats();
00067 TTreePerfStats(const char *name, TTree *T);
00068 virtual ~TTreePerfStats();
00069 virtual void Browse(TBrowser *b);
00070 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00071 virtual void Draw(Option_t *option="");
00072 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00073 virtual void Finish();
00074 virtual Long64_t GetBytesRead() const {return fBytesRead;}
00075 virtual Long64_t GetBytesReadExtra() const {return fBytesReadExtra;}
00076 virtual Double_t GetCpuTime() const {return fCpuTime;}
00077 virtual Double_t GetDiskTime() const {return fDiskTime;}
00078 TGraphErrors *GetGraphIO() {return fGraphIO;}
00079 TGraphErrors *GetGraphTime() {return fGraphTime;}
00080 const char *GetHostInfo() const{return fHostInfo.Data();}
00081 const char *GetName() const{return fName.Data();}
00082 virtual Int_t GetNleaves() const {return fNleaves;}
00083 virtual Long64_t GetNumEvents() const {return 0;}
00084 TPaveText *GetPave() {return fPave;}
00085 virtual Int_t GetReadaheadSize() const {return fReadaheadSize;}
00086 virtual Int_t GetReadCalls() const {return fReadCalls;}
00087 virtual Double_t GetRealTime() const {return fRealTime;}
00088 TStopwatch *GetStopwatch() const {return fWatch;}
00089 virtual Int_t GetTreeCacheSize() const {return fTreeCacheSize;}
00090 virtual void Paint(Option_t *chopt="");
00091 virtual void Print(Option_t *option="") const;
00092
00093 virtual void SimpleEvent(EEventType) {}
00094 virtual void PacketEvent(const char *, const char *, const char *,
00095 Long64_t , Double_t ,Double_t , Double_t ,Long64_t ) {}
00096 virtual void FileEvent(const char *, const char *, const char *, const char *, Bool_t) {}
00097 virtual void FileOpenEvent(TFile *, const char *, Double_t) {}
00098 virtual void FileReadEvent(TFile *file, Int_t len, Double_t start);
00099 virtual void RateEvent(Double_t , Double_t , Long64_t , Long64_t) {}
00100
00101 virtual void SaveAs(const char *filename="",Option_t *option="") const;
00102 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00103 virtual void SetBytesRead(Long64_t nbytes) {fBytesRead = nbytes;}
00104 virtual void SetBytesReadExtra(Long64_t nbytes) {fBytesReadExtra = nbytes;}
00105 virtual void SetCompress(Double_t cx) {fCompress = cx;}
00106 virtual void SetDiskTime(Double_t t) {fDiskTime = t;}
00107 virtual void SetNumEvents(Long64_t) {}
00108 virtual void SetCpuTime(Double_t cptime) {fCpuTime = cptime;}
00109 virtual void SetGraphIO(TGraphErrors *gr) {fGraphIO = gr;}
00110 virtual void SetGraphTime(TGraphErrors *gr) {fGraphTime = gr;}
00111 virtual void SetHostInfo(const char *info) {fHostInfo = info;}
00112 virtual void SetName(const char *name) {fName = name;}
00113 virtual void SetNleaves(Int_t nleaves) {fNleaves = nleaves;}
00114 virtual void SetReadaheadSize(Int_t nbytes) {fReadaheadSize = nbytes;}
00115 virtual void SetReadCalls(Int_t ncalls) {fReadCalls = ncalls;}
00116 virtual void SetRealNorm(Double_t rnorm) {fRealNorm = rnorm;}
00117 virtual void SetRealTime(Double_t rtime) {fRealTime = rtime;}
00118 virtual void SetTreeCacheSize(Int_t nbytes) {fTreeCacheSize = nbytes;}
00119
00120 ClassDef(TTreePerfStats,1)
00121 };
00122
00123 #endif