ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
benchmarks.C
Go to the documentation of this file.
1 TCanvas* bench1 = 0;
2 
3 void bexec(TString &dir,const char *macro)
4 {
5  if (gROOT->IsBatch()) printf("Processing benchmark: %s%s\n",dir.Data(),macro);
6  TPaveText *summary = (TPaveText*)bench1->GetPrimitive("TPave");
7  TText *tmacro = summary->GetLineWith(macro);
8  if (tmacro) tmacro->SetTextColor(4);
9  bench1->Modified(); bench1->Update();
10 
11  gROOT->Macro(Form("%s%s",dir.Data(),macro));
12 
13  TPaveText *summary2 = (TPaveText*)bench1->GetPrimitive("TPave");
14  TText *tmacro2 = summary2->GetLineWith(macro);
15  if (tmacro2) tmacro2->SetTextColor(2);
16  bench1->Modified(); bench1->Update();
17 }
18 
19 void benchmarks() {
20  TString dir = gSystem->UnixPathName(__FILE__);
21  dir.ReplaceAll("benchmarks.C","");
22  dir.ReplaceAll("/./","/");
23  bench1 = new TCanvas("bench1","Benchmarks Summary",-1000,50,200,500);
24  TPaveText *summary = new TPaveText(0,0,1,1);
25  summary->SetTextAlign(12);
26  summary->SetTextSize(0.08);
27  summary->Draw();
28  summary->AddText(" graphics/framework.C");
29  summary->AddText(" hsimple.C");
30  summary->AddText(" hist/hsum.C");
31  summary->AddText(" graphics/formula1.C");
32  summary->AddText(" hist/fillrandom.C");
33  summary->AddText(" fit/fit1.C");
34  summary->AddText(" hist/h1draw.C");
35  summary->AddText(" graphs/graph.C");
36  summary->AddText(" graphs/gerrors.C");
37  summary->AddText(" graphics/tornado.C");
38  summary->AddText(" graphs/surfaces.C");
39  summary->AddText(" graphs/zdemo.C");
40  summary->AddText(" geom/geometry.C");
41  summary->AddText(" geom/na49view.C");
42  summary->AddText(" tree/ntuple1.C");
43  summary->AddText(" ");
44  bexec(dir,"graphics/framework.C");
45  bexec(dir,"hsimple.C");
46  bexec(dir,"hist/hsum.C");
47  bexec(dir,"graphics/formula1.C");
48  bexec(dir,"hist/fillrandom.C");
49  bexec(dir,"fit/fit1.C");
50  bexec(dir,"hist/h1draw.C");
51  bexec(dir,"graphs/graph.C");
52  bexec(dir,"graphs/gerrors.C");
53  bexec(dir,"graphics/tornado.C");
54  bexec(dir,"graphs/surfaces.C");
55  bexec(dir,"graphs/zdemo.C");
56  bexec(dir,"geom/geometry.C");
57  bexec(dir,"geom/na49view.C");
58  bexec(dir,"tree/ntuple1.C");
59  bexec(dir,"rootmarks.C");
60 }
virtual TObject * GetPrimitive(const char *name) const
Get primitive.
Definition: TPad.cxx:2753
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
Definition: TPaveText.cxx:211
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:635
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Definition: TPaveText.cxx:160
#define gROOT
Definition: TROOT.h:344
Basic string class.
Definition: TString.h:137
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
Definition: TSystem.cxx:1020
const char * Data() const
Definition: TString.h:349
Base class for several text objects.
Definition: TText.h:42
void bexec(TString &dir, const char *macro)
Definition: benchmarks.C:3
virtual void SetTextAlign(Short_t align=11)
Definition: TAttText.h:55
R__EXTERN TSystem * gSystem
Definition: TSystem.h:545
char * Form(const char *fmt,...)
The Canvas class.
Definition: TCanvas.h:48
A Pave (see TPave) with text, lines or/and boxes inside.
Definition: TPaveText.h:35
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void dir(char *path=0)
Definition: rootalias.C:30
void benchmarks()
Definition: benchmarks.C:19
virtual void SetTextColor(Color_t tcolor=1)
Definition: TAttText.h:57
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2179
void Modified(Bool_t flag=1)
Definition: TPad.h:407
virtual TText * GetLineWith(const char *text) const
Get Pointer to first containing string text in this pavetext.
Definition: TPaveText.cxx:267