Logo ROOT   6.08/07
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 #ifndef ROOT_TObject
26 #include "TObject.h"
27 #endif
28 
29 
30 class TFile;
31 
32 
33 class TVirtualPerfStats : public TObject {
34 
35 public:
36  virtual ~TVirtualPerfStats() {}
37 
38  enum EEventType {
40  kPacket, //info of single packet processing
41  kStart, //begin of run
42  kStop, //end of run
43  kFile, //file started/finished in packetizer
44  kFileOpen, //opening data file statistics
45  kFileRead, //reading data file event
46  kRate, //processing {evt, MB} rates
47  kNumEventType //number of entries, must be last
48  };
49 
50  static TVirtualPerfStats *&CurrentPerfStats(); // Return the current perfStats for this thread.
51 
52  virtual void SimpleEvent(EEventType type) = 0;
53 
54  virtual void PacketEvent(const char *slave, const char *slavename, const char *filename,
55  Long64_t eventsprocessed, Double_t latency,
56  Double_t proctime, Double_t cputime,
57  Long64_t bytesRead) = 0;
58 
59  virtual void FileEvent(const char *slave, const char *slavename, const char *nodename,
60  const char *filename, Bool_t isStart) = 0;
61 
62  virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start) = 0;
63 
64  virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0;
65 
66  virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen) = 0;
67 
68  virtual void RateEvent(Double_t proctime, Double_t deltatime,
69  Long64_t eventsprocessed, Long64_t bytesRead) = 0;
70 
71  virtual void SetBytesRead(Long64_t num) = 0;
72  virtual Long64_t GetBytesRead() const = 0;
73  virtual void SetNumEvents(Long64_t num) = 0;
74  virtual Long64_t GetNumEvents() const = 0;
75 
76  static const char *EventType(EEventType type);
77 
78  ClassDef(TVirtualPerfStats,0) // ABC for collecting PROOF statistics
79 };
80 
81 
82 #ifndef __CINT__
83 #define gPerfStats (TVirtualPerfStats::CurrentPerfStats())
84 
85 #elif defined(__MAKECINT__)
86 // To properly handle the use of gPerfStats in header files (in static declarations)
88 #endif
89 
90 
91 #endif
virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen)=0
long long Long64_t
Definition: RtypesCore.h:69
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.
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:50
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 Long64_t GetBytesRead() const =0
virtual void SimpleEvent(EEventType type)=0
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual ~TVirtualPerfStats()
virtual void SetBytesRead(Long64_t num)=0
virtual Long64_t GetNumEvents() const =0
virtual void FileReadEvent(TFile *file, Int_t len, Double_t start)=0
#define gPerfStats
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
Definition: file.py:1
Definition: tree.py:1
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