Logo ROOT   6.14/05
Reference Guide
TVirtualPerfStats.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Kristjan Gulbrandsen 11/05/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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_TVirtualPerfStats
13 #define ROOT_TVirtualPerfStats
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TVirtualPerfStats //
18 // //
19 // Provides the interface for the PROOF internal performance measurment //
20 // and event tracing. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TObject.h"
26 
27 
28 class TFile;
29 class TBranch;
30 class TList;
31 
32 class TVirtualPerfStats : public TObject {
33 
34 public:
35  virtual ~TVirtualPerfStats() {}
36 
37  enum EEventType {
39  kPacket, //info of single packet processing
40  kStart, //begin of run
41  kStop, //end of run
42  kFile, //file started/finished in packetizer
43  kFileOpen, //opening data file statistics
44  kFileRead, //reading data file event
45  kRate, //processing {evt, MB} rates
46  kNumEventType //number of entries, must be last
47  };
48 
49  static TVirtualPerfStats *&CurrentPerfStats(); // Return the current perfStats for this thread.
50 
51  virtual void SimpleEvent(EEventType type) = 0;
52 
53  virtual void PacketEvent(const char *slave, const char *slavename, const char *filename,
54  Long64_t eventsprocessed, Double_t latency,
55  Double_t proctime, Double_t cputime,
56  Long64_t bytesRead) = 0;
57 
58  virtual void FileEvent(const char *slave, const char *slavename, const char *nodename,
59  const char *filename, Bool_t isStart) = 0;
60 
61  virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start) = 0;
62 
63  virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0;
64 
65  virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen) = 0;
66 
67  virtual void RateEvent(Double_t proctime, Double_t deltatime,
68  Long64_t eventsprocessed, Long64_t bytesRead) = 0;
69 
70  virtual void SetBytesRead(Long64_t num) = 0;
71  virtual Long64_t GetBytesRead() const = 0;
72  virtual void SetNumEvents(Long64_t num) = 0;
73  virtual Long64_t GetNumEvents() const = 0;
74 
75  virtual void PrintBasketInfo(Option_t *option = "") const = 0;
76  virtual void SetLoaded(TBranch *b, size_t basketNumber) = 0;
77  virtual void SetLoaded(size_t bi, size_t basketNumber) = 0;
78  virtual void SetLoadedMiss(TBranch *b, size_t basketNumber) = 0;
79  virtual void SetLoadedMiss(size_t bi, size_t basketNumber) = 0;
80  virtual void SetMissed(TBranch *b, size_t basketNumber) = 0;
81  virtual void SetMissed(size_t bi, size_t basketNumber) = 0;
82  virtual void SetUsed(TBranch *b, size_t basketNumber) = 0;
83  virtual void SetUsed(size_t bi, size_t basketNumber) = 0;
84  virtual void UpdateBranchIndices(TObjArray *branches) = 0;
85 
86  static const char *EventType(EEventType type);
87 
88  ClassDef(TVirtualPerfStats,0) // ABC for collecting PROOF statistics
89 };
90 
91 
92 #ifndef __CINT__
93 #define gPerfStats (TVirtualPerfStats::CurrentPerfStats())
94 
95 #elif defined(__MAKECINT__)
96 // To properly handle the use of gPerfStats in header files (in static declarations)
98 #endif
99 
100 
101 #endif
virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen)=0
An array of TObjects.
Definition: TObjArray.h:37
virtual void SetUsed(TBranch *b, size_t basketNumber)=0
long long Long64_t
Definition: RtypesCore.h:69
virtual void SetMissed(TBranch *b, size_t basketNumber)=0
virtual void RateEvent(Double_t proctime, Double_t deltatime, Long64_t eventsprocessed, Long64_t bytesRead)=0
Provides the interface for the PROOF internal performance measurement and event tracing.
const char Option_t
Definition: RtypesCore.h:62
static TVirtualPerfStats *& CurrentPerfStats()
Return the current ROOT perf stats if any.
static const char * EventType(EEventType type)
Return the name of the event type.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:47
virtual void PacketEvent(const char *slave, const char *slavename, const char *filename, Long64_t eventsprocessed, Double_t latency, Double_t proctime, Double_t cputime, Long64_t bytesRead)=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void SetLoaded(TBranch *b, size_t basketNumber)=0
virtual Long64_t GetBytesRead() const =0
virtual void SimpleEvent(EEventType type)=0
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual ~TVirtualPerfStats()
A doubly linked list.
Definition: TList.h:44
virtual void SetBytesRead(Long64_t num)=0
virtual void PrintBasketInfo(Option_t *option="") const =0
virtual Long64_t GetNumEvents() const =0
virtual void FileReadEvent(TFile *file, Int_t len, Double_t start)=0
#define gPerfStats
virtual void UpdateBranchIndices(TObjArray *branches)=0
double Double_t
Definition: RtypesCore.h:55
int type
Definition: TGX11.cxx:120
Mother of all ROOT objects.
Definition: TObject.h:37
#define R__EXTERN
Definition: DllImport.h:27
virtual void SetLoadedMiss(TBranch *b, size_t basketNumber)=0
Definition: file.py:1
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
Definition: tree.py:1
A TTree is a list of TBranches.
Definition: TBranch.h:62
virtual void FileEvent(const char *slave, const char *slavename, const char *nodename, const char *filename, Bool_t isStart)=0
virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start)=0
virtual void SetNumEvents(Long64_t num)=0