Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualPerfStats.cxx
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/** \class TVirtualPerfStats
13\ingroup Base
14
15Provides the interface for the PROOF internal performance measurement
16and event tracing.
17*/
18
19
20#include "TVirtualPerfStats.h"
21#include "TThreadSlots.h"
22
23
25
26
27static const char *gEventTypeNames[] = {
28 "UnDefined",
29 "Packet",
30 "Start",
31 "Stop",
32 "File",
33 "FileOpen",
34 "FileRead",
35 "Rate"
36};
37
38////////////////////////////////////////////////////////////////////////////////
39/// Return the current ROOT perf stats if any.
40
42{
43 static TVirtualPerfStats *currentPerfStats = nullptr;
44 if (!gThreadTsd) {
45 return currentPerfStats;
46 } else {
47 return *(TVirtualPerfStats**)(*gThreadTsd)(&currentPerfStats,ROOT::kPerfStatsThreadSlot);
48 }
49}
50
51////////////////////////////////////////////////////////////////////////////////
52/// Return the name of the event type.
53
55{
56 if (type < kUnDefined || type >= kNumEventType) {
57 return "Illegal EEventType";
58 } else {
59 return gEventTypeNames[type];
60 }
61}
#define ClassImp(name)
Definition Rtypes.h:377
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
R__EXTERN void **(* gThreadTsd)(void *, Int_t)
static const char * gEventTypeNames[]
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.
@ kPerfStatsThreadSlot