ROOT
v6-36
Reference Guide
Loading...
Searching...
No Matches
benchmarks.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_legacy
3
/// This macro run several tests and produces an benchmark report.
4
///
5
/// \macro_image
6
/// \macro_output
7
/// \macro_code
8
///
9
/// \author Rene Brun
10
11
TCanvas
*
bench1
= 0;
12
13
void
bexec
(
TString
&dir,
const
char
*
macro
)
14
{
15
if
(
gROOT
->IsBatch())
printf
(
"Processing benchmark: %s%s\n"
,dir.
Data
(),
macro
);
16
TPaveText
*
summary
= (
TPaveText
*)
bench1
->GetPrimitive(
"TPave"
);
17
TText
*
tmacro
=
summary
->GetLineWith(
macro
);
18
if
(
tmacro
)
tmacro
->SetTextColor(4);
19
bench1
->Modified();
bench1
->Update();
20
21
gROOT
->Macro(
Form
(
"%s%s"
,dir.
Data
(),
macro
));
22
23
TPaveText
*
summary2
= (
TPaveText
*)
bench1
->GetPrimitive(
"TPave"
);
24
TText
*
tmacro2
=
summary2
->GetLineWith(
macro
);
25
if
(
tmacro2
)
tmacro2
->SetTextColor(2);
26
bench1
->Modified();
bench1
->Update();
gSystem
->
ProcessEvents
();
27
28
}
29
30
void
benchmarks
() {
31
TString
dir =
gSystem
->
UnixPathName
(
__FILE__
);
32
dir.
ReplaceAll
(
"benchmarks.C"
,
""
);
33
dir.
ReplaceAll
(
"/./"
,
"/"
);
34
dir.
ReplaceAll
(
"legacy"
,
""
);
35
bench1
=
new
TCanvas
(
"bench1"
,
"Benchmarks Summary"
,-1000,50,250,500);
36
TPaveText
*
summary
=
new
TPaveText
(0,0,1,1);
37
summary
->SetTextAlign(12);
38
summary
->SetTextSize(0.06);
39
summary
->Draw();
40
summary
->AddText(
" visualisation/graphics/framework.C"
);
41
summary
->AddText(
" hsimple.C"
);
42
summary
->AddText(
" hist/hist007_TH1_liveupdate.C"
);
43
summary
->AddText(
" visualisation/graphics/formula1.C"
);
44
summary
->AddText(
" hist/hist001_TH1_fillrandom.C"
);
45
summary
->AddText(
" math/fit/fit1.C"
);
46
summary
->AddText(
" hist/hist015_TH1_read_and_draw.C"
);
47
summary
->AddText(
" visualisation/graphs/gr001_simple.C"
);
48
summary
->AddText(
" visualisation/graphs/gr002_errors.C"
);
49
summary
->AddText(
" visualisation/graphics/tornado.C"
);
50
summary
->AddText(
" visualisation/graphics/surfaces.C"
);
51
summary
->AddText(
" visualisation/graphs/gr303_zdemo.C"
);
52
summary
->AddText(
" legacy/g3d/geometry.C"
);
53
summary
->AddText(
" legacy/g3d/na49view.C"
);
54
summary
->AddText(
" io/tree/tree120_ntuple.C"
);
55
summary
->AddText(
" "
);
56
bexec
(dir,
"visualisation/graphics/framework.C"
);
57
bexec
(dir,
"hsimple.C"
);
58
bexec
(dir,
"hist/hist007_TH1_liveupdate.C"
);
59
bexec
(dir,
"visualisation/graphics/formula1.C"
);
60
bexec
(dir,
"hist/hist001_TH1_fillrandom.C"
);
61
bexec
(dir,
"math/fit/fit1.C"
);
62
bexec
(dir,
"hist/hist015_TH1_read_and_draw.C"
);
63
bexec
(dir,
"visualisation/graphs/gr001_simple.C"
);
64
bexec
(dir,
"visualisation/graphs/gr002_errors.C"
);
65
bexec
(dir,
"visualisation/graphics/tornado.C"
);
66
bexec
(dir,
"visualisation/graphics/surfaces.C"
);
67
bexec
(dir,
"visualisation/graphs/gr303_zdemo.C"
);
68
bexec
(dir,
"legacy/g3d/geometry.C"
);
69
bexec
(dir,
"legacy/g3d/na49view.C"
);
70
bexec
(dir,
"io/tree/tree120_ntuple.C"
);
71
bexec
(dir,
"legacy/rootmarks.C"
);
72
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
gROOT
#define gROOT
Definition
TROOT.h:414
Form
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition
TString.cxx:2489
gSystem
R__EXTERN TSystem * gSystem
Definition
TSystem.h:572
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TPaveText
A Pave (see TPave) with text, lines or/and boxes inside.
Definition
TPaveText.h:21
TString
Basic string class.
Definition
TString.h:139
TString::Data
const char * Data() const
Definition
TString.h:376
TString::ReplaceAll
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition
TString.h:704
TSystem::UnixPathName
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition
TSystem.cxx:1075
TSystem::ProcessEvents
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition
TSystem.cxx:416
TText
Base class for several text objects.
Definition
TText.h:22
tutorials
legacy
benchmarks.C
ROOT v6-36 - Reference Guide Generated on Thu Aug 21 2025 04:30:47 (GVA Time) using Doxygen 1.10.0