TVirtualPerfStats.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TVirtualPerfStats.h 30978 2009-11-05 01:38:48Z rdm $
00002 // Author: Kristjan Gulbrandsen   11/05/04
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TVirtualPerfStats
00013 #define ROOT_TVirtualPerfStats
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TVirtualPerfStats                                                    //
00018 //                                                                      //
00019 // Provides the interface for the PROOF internal performance measurment //
00020 // and event tracing.                                                   //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 
00029 
00030 class TFile;
00031 
00032 
00033 class TVirtualPerfStats : public TObject {
00034 
00035 public:
00036    virtual ~TVirtualPerfStats() {}
00037 
00038    enum EEventType {
00039       kUnDefined,
00040       kPacket,       //info of single packet processing
00041       kStart,        //begin of run
00042       kStop,         //end of run
00043       kFile,         //file started/finished in packetizer
00044       kFileOpen,     //opening data file statistics
00045       kFileRead,     //reading data file event
00046       kRate,         //processing {evt, MB} rates
00047       kNumEventType  //number of entries, must be last
00048    };
00049 
00050    virtual void SimpleEvent(EEventType type) = 0;
00051 
00052    virtual void PacketEvent(const char *slave, const char *slavename, const char *filename,
00053                             Long64_t eventsprocessed, Double_t latency,
00054                             Double_t proctime, Double_t cputime,
00055                             Long64_t bytesRead) = 0;
00056 
00057    virtual void FileEvent(const char *slave, const char *slavename, const char *nodename,
00058                           const char *filename, Bool_t isStart) = 0;
00059 
00060    virtual void FileOpenEvent(TFile *file, const char *filename, Double_t start) = 0;
00061 
00062    virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0;
00063 
00064    virtual void RateEvent(Double_t proctime, Double_t deltatime,
00065                           Long64_t eventsprocessed, Long64_t bytesRead) = 0;
00066 
00067    virtual void SetBytesRead(Long64_t num) = 0;
00068    virtual Long64_t GetBytesRead() const = 0;
00069    virtual void SetNumEvents(Long64_t num) = 0;
00070    virtual Long64_t GetNumEvents() const = 0;
00071 
00072    static const char *EventType(EEventType type);
00073 
00074    ClassDef(TVirtualPerfStats,0)  // ABC for collecting PROOF statistics
00075 };
00076 
00077 
00078 R__EXTERN TVirtualPerfStats *gPerfStats;
00079 
00080 
00081 #endif

Generated on Tue Jul 5 14:10:34 2011 for ROOT_528-00b_version by  doxygen 1.5.1