Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
28class TFile;
29class TBranch;
30class TChain;
31
32class TVirtualPerfStats : public TObject {
33
34private:
35 friend class TChain;
36
37 virtual void SetFile(TFile *) = 0;
38
39public:
40 virtual ~TVirtualPerfStats() {}
41
44 kPacket, //info of single packet processing
45 kStart, //begin of run
46 kStop, //end of run
47 kFile, //file started/finished in packetizer
48 kFileOpen, //opening data file statistics
49 kFileRead, //reading data file event
50 kRate, //processing {evt, MB} rates
51 kNumEventType //number of entries, must be last
52 };
53
54 static TVirtualPerfStats *&CurrentPerfStats(); // Return the current perfStats for this thread.
55
56 virtual void SimpleEvent(EEventType type) = 0;
57
58 virtual void PacketEvent(const char *slave, const char *slavename, const char *filename,
59 Long64_t eventsprocessed, Double_t latency,
60 Double_t proctime, Double_t cputime,
61 Long64_t bytesRead) = 0;
62
63 virtual void FileEvent(const char *slave, const char *slavename, const char *nodename,
64 const char *filename, Bool_t isStart) = 0;
65
66 virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start) = 0;
67
68 virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0;
69
70 virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen) = 0;
71
72 virtual void RateEvent(Double_t proctime, Double_t deltatime,
73 Long64_t eventsprocessed, Long64_t bytesRead) = 0;
74
75 virtual void SetBytesRead(Long64_t num) = 0;
76 virtual Long64_t GetBytesRead() const = 0;
77 virtual void SetNumEvents(Long64_t num) = 0;
78 virtual Long64_t GetNumEvents() const = 0;
79
80 virtual void PrintBasketInfo(Option_t *option = "") const = 0;
81 virtual void SetLoaded(TBranch *b, size_t basketNumber) = 0;
82 virtual void SetLoaded(size_t bi, size_t basketNumber) = 0;
83 virtual void SetLoadedMiss(TBranch *b, size_t basketNumber) = 0;
84 virtual void SetLoadedMiss(size_t bi, size_t basketNumber) = 0;
85 virtual void SetMissed(TBranch *b, size_t basketNumber) = 0;
86 virtual void SetMissed(size_t bi, size_t basketNumber) = 0;
87 virtual void SetUsed(TBranch *b, size_t basketNumber) = 0;
88 virtual void SetUsed(size_t bi, size_t basketNumber) = 0;
89 virtual void UpdateBranchIndices(TObjArray *branches) = 0;
90
91 static const char *EventType(EEventType type);
92
93 ClassDefOverride(TVirtualPerfStats,0) // ABC for collecting PROOF statistics
94};
95
96
97#ifndef __CINT__
98#define gPerfStats (TVirtualPerfStats::CurrentPerfStats())
99
100#elif defined(__MAKECINT__)
101// To properly handle the use of gPerfStats in header files (in static declarations)
103#endif
104
105
106#endif
#define R__EXTERN
Definition DllImport.h:27
#define b(i)
Definition RSha256.hxx:100
long long Long64_t
Definition RtypesCore.h:80
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
#define gPerfStats
A TTree is a list of TBranches.
Definition TBranch.h:93
A chain is a collection of files containing TTree objects.
Definition TChain.h:33
A ROOT file is composed of a header, followed by consecutive data records (TKey instances) with a wel...
Definition TFile.h:53
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:41
Provides the interface for the PROOF internal performance measurement and event tracing.
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
virtual void SetBytesRead(Long64_t num)=0
virtual void SetLoadedMiss(size_t bi, size_t basketNumber)=0
virtual void RateEvent(Double_t proctime, Double_t deltatime, Long64_t eventsprocessed, Long64_t bytesRead)=0
virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen)=0
virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start)=0
virtual Long64_t GetBytesRead() const =0
virtual void SimpleEvent(EEventType type)=0
virtual void SetUsed(TBranch *b, size_t basketNumber)=0
virtual void SetLoaded(TBranch *b, size_t basketNumber)=0
virtual void SetMissed(TBranch *b, size_t basketNumber)=0
virtual void FileEvent(const char *slave, const char *slavename, const char *nodename, const char *filename, Bool_t isStart)=0
virtual void SetLoaded(size_t bi, size_t basketNumber)=0
static TVirtualPerfStats *& CurrentPerfStats()
Return the current ROOT perf stats if any.
virtual void PrintBasketInfo(Option_t *option="") const =0
virtual void FileReadEvent(TFile *file, Int_t len, Double_t start)=0
virtual void SetNumEvents(Long64_t num)=0
virtual void SetFile(TFile *)=0
virtual void SetLoadedMiss(TBranch *b, size_t basketNumber)=0
virtual void SetUsed(size_t bi, size_t basketNumber)=0
virtual void SetMissed(size_t bi, size_t basketNumber)=0
virtual void UpdateBranchIndices(TObjArray *branches)=0
virtual Long64_t GetNumEvents() const =0
static const char * EventType(EEventType type)
Return the name of the event type.
Definition file.py:1
Definition tree.py:1