ROOT 6.12/07 Reference Guide |
TTree I/O performance measurement.
see example of use below.
The function FileReadEvent is called from TFile::ReadBuffer. For each call the following information is stored in fGraphIO
Example of use:
then, in a root interactive session, one can do:
The Draw or Print functions print the following information:
The ReadTotal value indicates the effective number of zipped bytes returned to the application. The physical number of bytes read from the device (as measured for example with strace) is ReadTotal +ReadTotal*Readextra/100. Same for ReadSize.
A consequence of NOTE1, the Disk I/O speed corresponds to the effective number of bytes returned to the application per second. The Physical disk speed is DiskIO + DiskIO*ReadExtra/100.
Definition at line 36 of file TTreePerfStats.h.
Public Member Functions | |
TTreePerfStats () | |
default constructor (used when reading an object only) More... | |
TTreePerfStats (const char *name, TTree *T) | |
Create a TTree I/O perf stats object. More... | |
virtual | ~TTreePerfStats () |
Destructor. More... | |
virtual void | Browse (TBrowser *b) |
Browse. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Return distance to one of the objects in the TTreePerfStats. More... | |
virtual void | Draw (Option_t *option="") |
Draw the TTree I/O perf graph. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Return distance to one of the objects in the TTreePerfStats. More... | |
virtual void | FileEvent (const char *, const char *, const char *, const char *, Bool_t) |
virtual void | FileOpenEvent (TFile *, const char *, Double_t) |
virtual void | FileReadEvent (TFile *file, Int_t len, Double_t start) |
Record TTree file read event. More... | |
virtual void | Finish () |
When the run is finished this function must be called to save the current parameters in the file and Tree in this object the function is automatically called by Draw and Print. More... | |
virtual Long64_t | GetBytesRead () const |
virtual Long64_t | GetBytesReadExtra () const |
virtual Double_t | GetCpuTime () const |
virtual Double_t | GetDiskTime () const |
TGraphErrors * | GetGraphIO () |
TGraphErrors * | GetGraphTime () |
const char * | GetHostInfo () const |
const char * | GetName () const |
Returns name of object. More... | |
virtual Int_t | GetNleaves () const |
virtual Long64_t | GetNumEvents () const |
TPaveText * | GetPave () |
virtual Int_t | GetReadaheadSize () const |
virtual Int_t | GetReadCalls () const |
virtual Double_t | GetRealTime () const |
TStopwatch * | GetStopwatch () const |
virtual Int_t | GetTreeCacheSize () const |
virtual Double_t | GetUnzipTime () const |
virtual void | PacketEvent (const char *, const char *, const char *, Long64_t, Double_t, Double_t, Double_t, Long64_t) |
virtual void | Paint (Option_t *chopt="") |
Draw the TTree I/O perf graph. More... | |
virtual void | Print (Option_t *option="") const |
Print the TTree I/O perf stats. More... | |
virtual void | RateEvent (Double_t, Double_t, Long64_t, Long64_t) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object to filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save primitive as a C++ statement(s) on output stream out. More... | |
virtual void | SetBytesRead (Long64_t nbytes) |
virtual void | SetBytesReadExtra (Long64_t nbytes) |
virtual void | SetCompress (Double_t cx) |
virtual void | SetCpuTime (Double_t cptime) |
virtual void | SetDiskTime (Double_t t) |
virtual void | SetGraphIO (TGraphErrors *gr) |
virtual void | SetGraphTime (TGraphErrors *gr) |
virtual void | SetHostInfo (const char *info) |
virtual void | SetName (const char *name) |
virtual void | SetNleaves (Int_t nleaves) |
virtual void | SetNumEvents (Long64_t) |
virtual void | SetReadaheadSize (Int_t nbytes) |
virtual void | SetReadCalls (Int_t ncalls) |
virtual void | SetRealNorm (Double_t rnorm) |
virtual void | SetRealTime (Double_t rtime) |
virtual void | SetTreeCacheSize (Int_t nbytes) |
virtual void | SetUnzipTime (Double_t uztime) |
virtual void | SimpleEvent (EEventType) |
virtual void | UnzipEvent (TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen) |
Record TTree unzip event. More... | |
Public Member Functions inherited from TVirtualPerfStats | |
virtual | ~TVirtualPerfStats () |
Public Member Functions inherited from TObject | |
TObject () | |
TObject constructor. More... | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
ULong_t | CheckedHash () |
Checked and record whether for this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Clear (Option_t *="") |
virtual TObject * | Clone (const char *newname="") const |
Make a clone of an object using the Streamer facility. More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare abstract method. More... | |
virtual void | Copy (TObject &object) const |
Copy this to obj. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad) . More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual Option_t * | GetOption () const |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
Bool_t | HasInconsistentHash () const |
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More... | |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
void | InvertBit (UInt_t f) |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
virtual Bool_t | IsSortable () const |
R__ALWAYS_INLINE Bool_t | IsZombie () const |
virtual void | ls (Option_t *option="") const |
The ls function lists the contents of a class on stdout. More... | |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More... | |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
void | ResetBit (UInt_t f) |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | UseCurrentStyle () |
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
Protected Attributes | |
Long64_t | fBytesRead |
Long64_t | fBytesReadExtra |
Double_t | fCompress |
Double_t | fCpuTime |
Double_t | fDiskTime |
TFile * | fFile |
TGraphErrors * | fGraphIO |
pointer to the Tree being monitored More... | |
TGraphErrors * | fGraphTime |
TString | fHostInfo |
TText * | fHostInfoText |
TString | fName |
Int_t | fNleaves |
TPaveText * | fPave |
Int_t | fReadaheadSize |
Int_t | fReadCalls |
Double_t | fRealNorm |
Double_t | fRealTime |
TGaxis * | fRealTimeAxis |
TTree * | fTree |
pointer to the file containing the Tree More... | |
Int_t | fTreeCacheSize |
Double_t | fUnzipTime |
TStopwatch * | fWatch |
Additional Inherited Members | |
Public Types inherited from TVirtualPerfStats | |
enum | EEventType { kUnDefined, kPacket, kStart, kStop, kFile, kFileOpen, kFileRead, kRate, kNumEventType } |
Public Types inherited from TObject | |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kInconsistent = 0x08000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
enum | EDeprecatedStatusBits { kObjInCanvas = BIT(3) } |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
Static Public Member Functions inherited from TVirtualPerfStats | |
static TVirtualPerfStats *& | CurrentPerfStats () |
Return the current ROOT perf stats if any. More... | |
static const char * | EventType (EEventType type) |
Return the name of the event type. More... | |
Static Public Member Functions inherited from TObject | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). More... | |
void | MakeZombie () |
#include <TTreePerfStats.h>
TTreePerfStats::TTreePerfStats | ( | ) |
default constructor (used when reading an object only)
Definition at line 104 of file TTreePerfStats.cxx.
TTreePerfStats::TTreePerfStats | ( | const char * | name, |
TTree * | T | ||
) |
Create a TTree I/O perf stats object.
Definition at line 133 of file TTreePerfStats.cxx.
|
virtual |
Destructor.
Definition at line 181 of file TTreePerfStats.cxx.
Return distance to one of the objects in the TTreePerfStats.
Reimplemented from TObject.
Definition at line 210 of file TTreePerfStats.cxx.
Draw the TTree I/O perf graph.
by default the graph is drawn with option "al" Specify option ="ap" to show only the read blocks and not the line connecting the blocks
Reimplemented from TObject.
Definition at line 243 of file TTreePerfStats.cxx.
Return distance to one of the objects in the TTreePerfStats.
Reimplemented from TObject.
Definition at line 270 of file TTreePerfStats.cxx.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 94 of file TTreePerfStats.h.
Implements TVirtualPerfStats.
Definition at line 95 of file TTreePerfStats.h.
Record TTree file read event.
Implements TVirtualPerfStats.
Definition at line 279 of file TTreePerfStats.cxx.
|
virtual |
When the run is finished this function must be called to save the current parameters in the file and Tree in this object the function is automatically called by Draw and Print.
Definition at line 319 of file TTreePerfStats.cxx.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 71 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 72 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 73 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 74 of file TTreePerfStats.h.
|
inline |
Definition at line 75 of file TTreePerfStats.h.
|
inline |
Definition at line 76 of file TTreePerfStats.h.
|
inline |
Definition at line 77 of file TTreePerfStats.h.
|
inlinevirtual |
Returns name of object.
This default method returns the class name. Classes that give objects a name should override this method.
Reimplemented from TObject.
Definition at line 78 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 79 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 80 of file TTreePerfStats.h.
|
inline |
Definition at line 81 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 82 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 83 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 84 of file TTreePerfStats.h.
|
inline |
Definition at line 85 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 86 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 87 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 92 of file TTreePerfStats.h.
Draw the TTree I/O perf graph.
Reimplemented from TObject.
Definition at line 345 of file TTreePerfStats.cxx.
Print the TTree I/O perf stats.
Reimplemented from TObject.
Definition at line 427 of file TTreePerfStats.cxx.
Implements TVirtualPerfStats.
Definition at line 98 of file TTreePerfStats.h.
Save this object to filename.
Reimplemented from TObject.
Definition at line 465 of file TTreePerfStats.cxx.
Save primitive as a C++ statement(s) on output stream out.
Reimplemented from TObject.
Definition at line 475 of file TTreePerfStats.cxx.
Implements TVirtualPerfStats.
Definition at line 102 of file TTreePerfStats.h.
Definition at line 103 of file TTreePerfStats.h.
Definition at line 104 of file TTreePerfStats.h.
Definition at line 107 of file TTreePerfStats.h.
Definition at line 105 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 108 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 109 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 110 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 111 of file TTreePerfStats.h.
Definition at line 112 of file TTreePerfStats.h.
Implements TVirtualPerfStats.
Definition at line 106 of file TTreePerfStats.h.
Definition at line 113 of file TTreePerfStats.h.
Definition at line 114 of file TTreePerfStats.h.
Definition at line 115 of file TTreePerfStats.h.
Definition at line 116 of file TTreePerfStats.h.
Definition at line 117 of file TTreePerfStats.h.
Definition at line 118 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 91 of file TTreePerfStats.h.
|
virtual |
Record TTree unzip event.
Implements TVirtualPerfStats.
Definition at line 305 of file TTreePerfStats.cxx.
|
protected |
Definition at line 43 of file TTreePerfStats.h.
|
protected |
Definition at line 44 of file TTreePerfStats.h.
|
protected |
Definition at line 50 of file TTreePerfStats.h.
|
protected |
Definition at line 47 of file TTreePerfStats.h.
|
protected |
Definition at line 48 of file TTreePerfStats.h.
|
protected |
Definition at line 53 of file TTreePerfStats.h.
|
protected |
pointer to the Tree being monitored
Definition at line 55 of file TTreePerfStats.h.
|
protected |
Definition at line 56 of file TTreePerfStats.h.
|
protected |
Definition at line 52 of file TTreePerfStats.h.
|
protected |
Definition at line 60 of file TTreePerfStats.h.
|
protected |
Definition at line 51 of file TTreePerfStats.h.
|
protected |
Definition at line 40 of file TTreePerfStats.h.
|
protected |
Definition at line 57 of file TTreePerfStats.h.
|
protected |
Definition at line 42 of file TTreePerfStats.h.
|
protected |
Definition at line 41 of file TTreePerfStats.h.
|
protected |
Definition at line 45 of file TTreePerfStats.h.
|
protected |
Definition at line 46 of file TTreePerfStats.h.
|
protected |
Definition at line 59 of file TTreePerfStats.h.
|
protected |
pointer to the file containing the Tree
Definition at line 54 of file TTreePerfStats.h.
|
protected |
Definition at line 39 of file TTreePerfStats.h.
|
protected |
Definition at line 49 of file TTreePerfStats.h.
|
protected |
Definition at line 58 of file TTreePerfStats.h.