ATLAS Offline Software
Loading...
Searching...
No Matches
SetAttributes.h File Reference
#include <sstream>
#include <vector>
#include <fstream>
#include "TH1F.h"
#include "TCanvas.h"
#include "TRandom.h"
#include "THStack.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TGraphAsymmErrors.h"
#include "TStyle.h"
#include "TLegend.h"
#include "TPaveText.h"
#include "TLatex.h"
#include "TRandom3.h"
#include "TMultiGraph.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int SetHistFillAttributes (TH1F *hist, int fillstyle=1001, int fillcolor=0)
int SetHistLineAttributes (TH1F *hist, int linestyle=1, int linewidth=2, int linecolor=1)
int SetHistAxisAttributes (TH1F *hist, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05)
int SetHistMarkerAttributes (TH1F *hist, int markerstyle=20, int markercolor=1, int markersize=1)
int SetHistAttributes (TH1F *hist, int linestyle=1, int linewidth=2, int linecolor=1, int fillstyle=1001, int fillcolor=0, int markerstyle=20, int markercolor=1, int markersize=1, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05, bool displaystats=false)
int SetPadFillAttributes (TPad *pad, int fillstyle=0, float fillcolor=0)
int SetPadAttributes (TPad *pad, int fillstyle=0, int fillcolor=0, float leftmargin=0.15, float rightmargin=0.05, float bottommargin=0.15, float topmargin=0.05, int bordermode=0, bool logx=false, bool logy=true, bool settickx=true, bool setticky=true)
int SetGraphLineAttributes (TGraph *gr, int linestyle=1, int linewidth=2, int linecolor=1)
int SetGraphFillAttributes (TGraph *gr, int fillstyle=1001, int fillcolor=0)
int SetGraphMarkerAttributes (TGraph *gr, int markerstyle=20, int markercolor=1, int markersize=1)
int SetGraphAxisAttributes (TGraph *gr, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05)
int SetGraphAttributes (TGraph *gr, int linestyle=1, int linewidth=2, int linecolor=1, int fillstyle=1001, int fillcolor=0, int markerstyle=20, int markercolor=1, int markersize=1, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05)
int SetGraphErrorsLineAttributes (TGraphErrors *gre, int linestyle=1, int linewidth=2, int linecolor=1)
int SetGraphErrorsFillAttributes (TGraph *gre, int fillstyle=1001, int fillcolor=0)
int SetGraphErrorsMarkerAttributes (TGraph *gre, int markerstyle=20, int markercolor=1, int markersize=1)
int SetGraphErrorsAxisAttributes (TGraph *gre, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.5, float ytitlesize=0.05)
int SetGraphErrorsAttributes (TGraphErrors *gre, int linestyle=1, int linewidth=2, int linecolor=1, int fillstyle=1001, int fillcolor=0, int markerstyle=20, int markercolor=1, int markersize=1, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.5, float ytitlesize=0.05)
int SetMGraphAttributes (TMultiGraph *mg, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.5, float ytitlesize=0.05)
int SetGraphAsymmErrorsLineAttributes (TGraphAsymmErrors *grae, int linestyle=1, int linewidth=2, int linecolor=1)
int SetGraphAsymmErrorsFillAttributes (TGraphAsymmErrors *grae, int fillstyle=1001, int fillcolor=0)
int SetGraphAsymmErrorsMarkerAttributes (TGraphAsymmErrors *grae, int markerstyle=20, int markercolor=1, int markersize=1)
int SetGraphAsymmErrorsAxisAttributes (TGraphAsymmErrors *grae, float xlabelsize=0.03, float xtitleoffset=1., float xtitlesize=0.04, float ylabelsize=0.03, float ytitleoffset=1., float ytitlesize=0.04)
int SetGraphAsymmErrorsAttributes (TGraphAsymmErrors *grae, int linestyle=1, int linewidth=2, int linecolor=1, int fillstyle=1001, int fillcolor=0, int markerstyle=20, int markercolor=1, int markersize=1, float xlabelsize=0.03, float xtitleoffset=1., float xtitlesize=0.04, float ylabelsize=0.03, float ytitleoffset=1., float ytitlesize=0.04)
int SetHStackAttributes (THStack *hstack, float xlabelsize=0.04, float xtitleoffset=1., float xtitlesize=0.04, float ylabelsize=0.04, float ytitleoffset=1., float ytitlesize=0.04)

Function Documentation

◆ SetGraphAsymmErrorsAttributes()

int SetGraphAsymmErrorsAttributes ( TGraphAsymmErrors * grae,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1,
int fillstyle = 1001,
int fillcolor = 0,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1,
float xlabelsize = 0.03,
float xtitleoffset = 1.,
float xtitlesize = 0.04,
float ylabelsize = 0.03,
float ytitleoffset = 1.,
float ytitlesize = 0.04 )

Definition at line 322 of file SetAttributes.h.

328{
329 SetGraphAsymmErrorsLineAttributes(grae, linestyle, linewidth, linecolor) ;
330 SetGraphAsymmErrorsFillAttributes(grae, fillstyle, fillcolor) ;
331 SetGraphAsymmErrorsMarkerAttributes(grae, markerstyle, markercolor, markersize) ;
332 SetGraphAsymmErrorsAxisAttributes(grae, xlabelsize, xtitleoffset, xtitlesize, ylabelsize, ytitleoffset, ytitlesize) ;
333 return 0 ;
334}
int SetGraphAsymmErrorsLineAttributes(TGraphAsymmErrors *grae, int linestyle=1, int linewidth=2, int linecolor=1)
int SetGraphAsymmErrorsMarkerAttributes(TGraphAsymmErrors *grae, int markerstyle=20, int markercolor=1, int markersize=1)
int SetGraphAsymmErrorsAxisAttributes(TGraphAsymmErrors *grae, float xlabelsize=0.03, float xtitleoffset=1., float xtitlesize=0.04, float ylabelsize=0.03, float ytitleoffset=1., float ytitlesize=0.04)
int SetGraphAsymmErrorsFillAttributes(TGraphAsymmErrors *grae, int fillstyle=1001, int fillcolor=0)

◆ SetGraphAsymmErrorsAxisAttributes()

int SetGraphAsymmErrorsAxisAttributes ( TGraphAsymmErrors * grae,
float xlabelsize = 0.03,
float xtitleoffset = 1.,
float xtitlesize = 0.04,
float ylabelsize = 0.03,
float ytitleoffset = 1.,
float ytitlesize = 0.04 )

Definition at line 309 of file SetAttributes.h.

312{
313 grae->GetXaxis()->SetTitleSize(xtitlesize) ;
314 grae->GetXaxis()->SetTitleOffset(xtitleoffset) ;
315 grae->GetXaxis()->SetLabelSize(xlabelsize) ;
316 grae->GetYaxis()->SetTitleSize(ytitlesize) ;
317 grae->GetYaxis()->SetTitleOffset(ytitleoffset) ;
318 grae->GetYaxis()->SetLabelSize(ylabelsize) ;
319 return 0 ;
320}

◆ SetGraphAsymmErrorsFillAttributes()

int SetGraphAsymmErrorsFillAttributes ( TGraphAsymmErrors * grae,
int fillstyle = 1001,
int fillcolor = 0 )

Definition at line 294 of file SetAttributes.h.

295{
296 grae->SetFillStyle(fillstyle) ;
297 grae->SetFillColor(fillcolor) ;
298 return 0 ;
299}

◆ SetGraphAsymmErrorsLineAttributes()

int SetGraphAsymmErrorsLineAttributes ( TGraphAsymmErrors * grae,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1 )

Definition at line 286 of file SetAttributes.h.

287{
288 grae->SetLineColor(linecolor) ;
289 grae->SetLineWidth(linewidth) ;
290 grae->SetLineStyle(linestyle) ;
291 return 0 ;
292}

◆ SetGraphAsymmErrorsMarkerAttributes()

int SetGraphAsymmErrorsMarkerAttributes ( TGraphAsymmErrors * grae,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1 )

Definition at line 301 of file SetAttributes.h.

302{
303 grae->SetMarkerStyle(markerstyle) ;
304 grae->SetMarkerColor(markercolor) ;
305 grae->SetMarkerSize(markersize) ;
306 return 0 ;
307}

◆ SetGraphAttributes()

int SetGraphAttributes ( TGraph * gr,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1,
int fillstyle = 1001,
int fillcolor = 0,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.4,
float ytitlesize = 0.05 )

Definition at line 210 of file SetAttributes.h.

215{
216 SetGraphLineAttributes(gr, linestyle, linewidth, linecolor) ;
217 SetGraphFillAttributes(gr, fillstyle, fillcolor) ;
218 SetGraphMarkerAttributes(gr, markerstyle, markercolor, markersize) ;
219 SetGraphAxisAttributes(gr, xlabelsize, xtitleoffset, xtitlesize, ylabelsize, ytitleoffset, ytitlesize) ;
220 return 0 ;
221}
#define gr
int SetGraphAxisAttributes(TGraph *gr, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05)
int SetGraphLineAttributes(TGraph *gr, int linestyle=1, int linewidth=2, int linecolor=1)
int SetGraphFillAttributes(TGraph *gr, int fillstyle=1001, int fillcolor=0)
int SetGraphMarkerAttributes(TGraph *gr, int markerstyle=20, int markercolor=1, int markersize=1)

◆ SetGraphAxisAttributes()

int SetGraphAxisAttributes ( TGraph * gr,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.4,
float ytitlesize = 0.05 )

Definition at line 197 of file SetAttributes.h.

200{
201 gr->GetXaxis()->SetTitleSize(xtitlesize) ;
202 gr->GetXaxis()->SetTitleOffset(xtitleoffset) ;
203 gr->GetXaxis()->SetLabelSize(xlabelsize) ;
204 gr->GetYaxis()->SetTitleSize(ytitlesize) ;
205 gr->GetYaxis()->SetTitleOffset(ytitleoffset) ;
206 gr->GetYaxis()->SetLabelSize(ylabelsize) ;
207 return 0 ;
208}

◆ SetGraphErrorsAttributes()

int SetGraphErrorsAttributes ( TGraphErrors * gre,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1,
int fillstyle = 1001,
int fillcolor = 0,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.5,
float ytitlesize = 0.05 )

Definition at line 259 of file SetAttributes.h.

265{
266 SetGraphErrorsLineAttributes(gre, linestyle, linewidth, linecolor) ;
267 SetGraphErrorsFillAttributes(gre, fillstyle, fillcolor) ;
268 SetGraphErrorsMarkerAttributes(gre, markerstyle, markercolor, markersize) ;
269 SetGraphErrorsAxisAttributes(gre, xlabelsize, xtitleoffset, xtitlesize, ylabelsize, ytitleoffset, ytitlesize) ;
270 return 0 ;
271}
int SetGraphErrorsFillAttributes(TGraph *gre, int fillstyle=1001, int fillcolor=0)
int SetGraphErrorsAxisAttributes(TGraph *gre, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.5, float ytitlesize=0.05)
int SetGraphErrorsMarkerAttributes(TGraph *gre, int markerstyle=20, int markercolor=1, int markersize=1)
int SetGraphErrorsLineAttributes(TGraphErrors *gre, int linestyle=1, int linewidth=2, int linecolor=1)

◆ SetGraphErrorsAxisAttributes()

int SetGraphErrorsAxisAttributes ( TGraph * gre,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.5,
float ytitlesize = 0.05 )

Definition at line 246 of file SetAttributes.h.

249{
250 gre->GetXaxis()->SetTitleSize(xtitlesize) ;
251 gre->GetXaxis()->SetTitleOffset(xtitleoffset) ;
252 gre->GetXaxis()->SetLabelSize(xlabelsize) ;
253 gre->GetYaxis()->SetTitleSize(ytitlesize) ;
254 gre->GetYaxis()->SetTitleOffset(ytitleoffset) ;
255 gre->GetYaxis()->SetLabelSize(ylabelsize) ;
256 return 0 ;
257}

◆ SetGraphErrorsFillAttributes()

int SetGraphErrorsFillAttributes ( TGraph * gre,
int fillstyle = 1001,
int fillcolor = 0 )

Definition at line 231 of file SetAttributes.h.

232{
233 gre->SetFillStyle(fillstyle) ;
234 gre->SetFillColor(fillcolor) ;
235 return 0 ;
236}

◆ SetGraphErrorsLineAttributes()

int SetGraphErrorsLineAttributes ( TGraphErrors * gre,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1 )

Definition at line 223 of file SetAttributes.h.

224{
225 gre->SetLineColor(linecolor) ;
226 gre->SetLineWidth(linewidth) ;
227 gre->SetLineStyle(linestyle) ;
228 return 0 ;
229}

◆ SetGraphErrorsMarkerAttributes()

int SetGraphErrorsMarkerAttributes ( TGraph * gre,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1 )

Definition at line 238 of file SetAttributes.h.

239{
240 gre->SetMarkerStyle(markerstyle) ;
241 gre->SetMarkerColor(markercolor) ;
242 gre->SetMarkerSize(markersize) ;
243 return 0 ;
244}

◆ SetGraphFillAttributes()

int SetGraphFillAttributes ( TGraph * gr,
int fillstyle = 1001,
int fillcolor = 0 )

Definition at line 182 of file SetAttributes.h.

183{
184 gr->SetFillStyle(fillstyle) ;
185 gr->SetFillColor(fillcolor) ;
186 return 0 ;
187}

◆ SetGraphLineAttributes()

int SetGraphLineAttributes ( TGraph * gr,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1 )

Definition at line 174 of file SetAttributes.h.

175{
176 gr->SetLineColor(linecolor) ;
177 gr->SetLineWidth(linewidth) ;
178 gr->SetLineStyle(linestyle) ;
179 return 0 ;
180}

◆ SetGraphMarkerAttributes()

int SetGraphMarkerAttributes ( TGraph * gr,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1 )

Definition at line 189 of file SetAttributes.h.

190{
191 gr->SetMarkerStyle(markerstyle) ;
192 gr->SetMarkerColor(markercolor) ;
193 gr->SetMarkerSize(markersize) ;
194 return 0 ;
195}

◆ SetHistAttributes()

int SetHistAttributes ( TH1F * hist,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1,
int fillstyle = 1001,
int fillcolor = 0,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.4,
float ytitlesize = 0.05,
bool displaystats = false )

Definition at line 120 of file SetAttributes.h.

126{
127 SetHistFillAttributes(hist, fillstyle, fillcolor) ;
128 SetHistAxisAttributes(hist,xlabelsize, xtitleoffset, xtitlesize, ylabelsize, ytitleoffset, ytitlesize) ;
129 SetHistLineAttributes(hist, linestyle, linewidth, linecolor) ;
130 SetHistMarkerAttributes(hist, markerstyle, markercolor, markersize) ;
131 hist->SetStats(displaystats) ;
132
133 return 0 ;
134}
int SetHistFillAttributes(TH1F *hist, int fillstyle=1001, int fillcolor=0)
int SetHistMarkerAttributes(TH1F *hist, int markerstyle=20, int markercolor=1, int markersize=1)
int SetHistAxisAttributes(TH1F *hist, float xlabelsize=0.05, float xtitleoffset=1.4, float xtitlesize=0.05, float ylabelsize=0.05, float ytitleoffset=1.4, float ytitlesize=0.05)
int SetHistLineAttributes(TH1F *hist, int linestyle=1, int linewidth=2, int linecolor=1)

◆ SetHistAxisAttributes()

int SetHistAxisAttributes ( TH1F * hist,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.4,
float ytitlesize = 0.05 )

Definition at line 100 of file SetAttributes.h.

103{
104 hist->GetXaxis()->SetTitleSize(xtitlesize) ;
105 hist->GetXaxis()->SetTitleOffset(xtitleoffset) ;
106 hist->GetXaxis()->SetLabelSize(xlabelsize) ;
107 hist->GetYaxis()->SetTitleSize(ytitlesize) ;
108 hist->GetYaxis()->SetTitleOffset(ytitleoffset) ;
109 hist->GetYaxis()->SetLabelSize(ylabelsize) ;
110 return 0 ;
111}

◆ SetHistFillAttributes()

int SetHistFillAttributes ( TH1F * hist,
int fillstyle = 1001,
int fillcolor = 0 )

Definition at line 85 of file SetAttributes.h.

86{
87 hist->SetFillStyle(fillstyle) ;
88 hist->SetFillColor(fillcolor) ;
89 return 0 ;
90}

◆ SetHistLineAttributes()

int SetHistLineAttributes ( TH1F * hist,
int linestyle = 1,
int linewidth = 2,
int linecolor = 1 )

Definition at line 92 of file SetAttributes.h.

93{
94 hist->SetLineColor(linecolor) ;
95 hist->SetLineWidth(linewidth) ;
96 hist->SetLineStyle(linestyle) ;
97 return 0 ;
98}

◆ SetHistMarkerAttributes()

int SetHistMarkerAttributes ( TH1F * hist,
int markerstyle = 20,
int markercolor = 1,
int markersize = 1 )

Definition at line 113 of file SetAttributes.h.

114{
115 hist->SetMarkerStyle(markerstyle) ;
116 hist->SetMarkerColor(markercolor) ;
117 hist->SetMarkerSize(markersize) ;
118 return 0 ;
119}

◆ SetHStackAttributes()

int SetHStackAttributes ( THStack * hstack,
float xlabelsize = 0.04,
float xtitleoffset = 1.,
float xtitlesize = 0.04,
float ylabelsize = 0.04,
float ytitleoffset = 1.,
float ytitlesize = 0.04 )

Definition at line 336 of file SetAttributes.h.

339{
340 hstack->GetXaxis()->SetTitleSize(xtitlesize) ;
341 hstack->GetXaxis()->SetTitleOffset(xtitleoffset) ;
342 hstack->GetXaxis()->SetLabelSize(xlabelsize) ;
343 hstack->GetYaxis()->SetTitleSize(ytitlesize) ;
344 hstack->GetYaxis()->SetTitleOffset(ytitleoffset) ;
345 hstack->GetYaxis()->SetLabelSize(ylabelsize) ;
346 return 0 ;
347}

◆ SetMGraphAttributes()

int SetMGraphAttributes ( TMultiGraph * mg,
float xlabelsize = 0.05,
float xtitleoffset = 1.4,
float xtitlesize = 0.05,
float ylabelsize = 0.05,
float ytitleoffset = 1.5,
float ytitlesize = 0.05 )

Definition at line 273 of file SetAttributes.h.

276{
277 mg->GetXaxis()->SetTitleSize(xtitlesize) ;
278 mg->GetXaxis()->SetTitleOffset(xtitleoffset) ;
279 mg->GetXaxis()->SetLabelSize(xlabelsize) ;
280 mg->GetYaxis()->SetTitleSize(ytitlesize) ;
281 mg->GetYaxis()->SetTitleOffset(ytitleoffset) ;
282 mg->GetYaxis()->SetLabelSize(ylabelsize) ;
283 return 0 ;
284}

◆ SetPadAttributes()

int SetPadAttributes ( TPad * pad,
int fillstyle = 0,
int fillcolor = 0,
float leftmargin = 0.15,
float rightmargin = 0.05,
float bottommargin = 0.15,
float topmargin = 0.05,
int bordermode = 0,
bool logx = false,
bool logy = true,
bool settickx = true,
bool setticky = true )

Definition at line 143 of file SetAttributes.h.

146{
147 SetPadFillAttributes(pad, fillstyle, fillcolor) ;
148 pad->SetMargin(leftmargin, rightmargin, bottommargin, topmargin) ;
149 pad->SetBorderMode(bordermode) ;
150
151 pad->SetLogx(logx) ;
152 pad->SetLogy(logy) ;
153
154 pad->SetTickx(settickx) ;
155 pad->SetTicky(setticky) ;
156 return 0 ;
157}
int SetPadFillAttributes(TPad *pad, int fillstyle=0, float fillcolor=0)
bool logy
Definition listroot.cxx:45

◆ SetPadFillAttributes()

int SetPadFillAttributes ( TPad * pad,
int fillstyle = 0,
float fillcolor = 0 )

Definition at line 136 of file SetAttributes.h.

137{
138 pad->SetFillStyle(fillstyle) ;
139 pad->SetFillColor(fillcolor) ;
140 return 0 ;
141}