CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes
TkAlStyle Class Reference

Static Public Member Functions

static TPaveText * customRightTitle (const TString &txt)
 
static TPaveText * customTitle (const TString &txt)
 
static void drawStandardTitle ()
 
static void drawStandardTitle (const Era era)
 
static TPaveText * label (const int nEntries, const double relWidth=0.5)
 
static TPaveText * label (TString position, const int nEntries, const double relWidth=0.5)
 
static TPaveText * labelBL (const int nEntries, const double relWidth=0.5)
 
static TPaveText * labelBR (const int nEntries, const double relWidth=0.5)
 
static TPaveText * labelTL (const int nEntries, const double relWidth=0.5)
 
static TPaveText * labelTR (const int nEntries, const double relWidth=0.5)
 
static TLegend * legend (const int nEntries, const double relWidth=0.5)
 
static TLegend * legend (TString position, const int nEntries, const double relWidth=0.5)
 
static TLegend * legendBL (const int nEntries, const double relWidth=0.5)
 
static TLegend * legendBR (const int nEntries, const double relWidth=0.5)
 
static TLegend * legendTL (const int nEntries, const double relWidth=0.5)
 
static TLegend * legendTR (const int nEntries, const double relWidth=0.5)
 
static double lineHeight ()
 
static void set (const PublicationStatus status, const Era era=NONE, const TString customTitle="", const TString customRightTitle="")
 
static void set (const TString customTitle)
 
static TPaveText * standardRightTitle (const Era era)
 
static TPaveText * standardRightTitle ()
 
static TPaveText * standardTitle (PublicationStatus status)
 
static TPaveText * standardTitle ()
 
static PublicationStatus status ()
 

Static Public Attributes

static TString legendheader = ""
 
static TString legendoptions = "all"
 
static double textSize = 0.035
 

Static Private Member Functions

static TString applyCMS (const TString &txt)
 
static TString header (const PublicationStatus status)
 
static TPaveText * label (const int nEntries, const double relWidth, const bool leftt, const bool top)
 
static TLegend * legend (const int nEntries, const double relWidth, const bool left, const bool top)
 
static TString rightheader (const Era era)
 
static TPaveText * righttitle (const TString &txt)
 
static void setXCoordinatesL (const double relWidth, double &x0, double &x1)
 
static void setXCoordinatesR (const double relWidth, double &x0, double &x1)
 
static void setYCoordinatesB (const int nEntries, double &y0, double &y1)
 
static void setYCoordinatesT (const int nEntries, double &y0, double &y1)
 
static TPaveText * title (const TString &txt)
 

Static Private Attributes

static TString customRightTitle_ = ""
 
static TString customTitle_ = ""
 
static Era era_ = NONE
 
static double lineHeight_ = 0.042
 
static double margin_ = 0.04
 
static PublicationStatus publicationStatus_ = NO_STATUS
 

Detailed Description

Definition at line 58 of file TkAlStyle.cc.

Member Function Documentation

TString TkAlStyle::applyCMS ( const TString &  txt)
staticprivate

Definition at line 315 of file TkAlStyle.cc.

Referenced by righttitle(), and title().

315  {
316  TString newtxt = txt;
317  newtxt.ReplaceAll("#CMS{","#scale[1.4]{#font[61]{CMS}} #font[52]{");
318  newtxt.ReplaceAll("#noCMS{","#font[52]{");
319  newtxt.ReplaceAll("#CMS","#scale[1.4]{#font[61]{CMS}}");
320  return newtxt;
321 }
static TPaveText* TkAlStyle::customRightTitle ( const TString &  txt)
inlinestatic

Definition at line 100 of file TkAlStyle.cc.

References righttitle().

Referenced by set().

100 { return righttitle(txt); }
static TPaveText * righttitle(const TString &txt)
Definition: TkAlStyle.cc:346
static TPaveText* TkAlStyle::customTitle ( const TString &  txt)
inlinestatic

Definition at line 99 of file TkAlStyle.cc.

References title().

Referenced by set().

99 { return title(txt); }
static TPaveText * title(const TString &txt)
Definition: TkAlStyle.cc:325
static void TkAlStyle::drawStandardTitle ( )
inlinestatic

Definition at line 75 of file TkAlStyle.cc.

References standardRightTitle(), and standardTitle().

Referenced by MergeRootfile().

75 { standardTitle()->Draw("same"); standardRightTitle()->Draw("same"); }
static TPaveText * standardRightTitle()
Definition: TkAlStyle.cc:93
static TPaveText * standardTitle()
Definition: TkAlStyle.cc:86
static void TkAlStyle::drawStandardTitle ( const Era  era)
inlinestatic

Definition at line 76 of file TkAlStyle.cc.

References standardRightTitle(), and standardTitle().

76 { standardTitle()->Draw("same"); standardRightTitle(era)->Draw("same"); }
static TPaveText * standardRightTitle()
Definition: TkAlStyle.cc:93
static TPaveText * standardTitle()
Definition: TkAlStyle.cc:86
TString TkAlStyle::header ( const PublicationStatus  status)
staticprivate

Definition at line 367 of file TkAlStyle.cc.

References gather_cfg::cout, CUSTOM, customTitle_, INTERNAL_SIMULATION, NO_STATUS, PRELIMINARY, PUBLIC, SIMULATION, and UNPUBLISHED.

Referenced by standardTitle().

367  {
368  TString txt;
369  if( status == NO_STATUS ) {
370  std::cout << "Status not set yet! Can't draw the title!" << std::endl;
371  } else if( status == INTERNAL_SIMULATION ) {
372  txt = "#noCMS{Simulation}";
373  } else if( status == PRELIMINARY ) {
374  txt = "#CMS{Preliminary}";
375  } else if( status == PUBLIC ) {
376  txt = "#CMS";
377  } else if( status == SIMULATION ) {
378  txt = "#CMS{Simulation}";
379  } else if( status == UNPUBLISHED ) {
380  txt = "#CMS{(unpublished)}";
381  } else if( status == CUSTOM ) {
382  txt = customTitle_;
383  }
384 
385  return txt;
386 }
static TString customTitle_
Definition: TkAlStyle.cc:199
static PublicationStatus status()
Definition: TkAlStyle.cc:63
static TPaveText* TkAlStyle::label ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic
static TPaveText* TkAlStyle::label ( TString  position,
const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 156 of file TkAlStyle.cc.

References label(), labelBL(), labelBR(), labelTL(), and labelTR().

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::_sort_list(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::foundIn(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::fullFilename(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor::properties(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::readConnections(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor::updateProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::usedBy().

156  {
157  position.ToLower();
158  if( !( position.Contains("top") || position.Contains("bottom") ) )
159  position += "top";
160  if( !( position.Contains("left") || position.Contains("right") ) )
161  position += "right";
162  TPaveText* label = 0;
163  if( position.Contains("top") && position.Contains("right") ) {
164  label = labelTR(nEntries,relWidth);
165  } else if( position.Contains("top") && position.Contains("left") ) {
166  label = labelTL(nEntries,relWidth);
167  } else if( position.Contains("bottom") && position.Contains("right") ) {
168  label = labelBR(nEntries,relWidth);
169  } else if( position.Contains("bottom") && position.Contains("left") ) {
170  label = labelBL(nEntries,relWidth);
171  } else {
172  label = labelTR(nEntries,relWidth);
173  }
174 
175  return label;
176  }
static TPaveText * labelBR(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:188
static TPaveText * labelBL(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:185
static TPaveText * labelTR(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:182
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static int position[264][3]
Definition: ReadPGInfo.cc:509
static TPaveText * labelTL(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:179
TPaveText * TkAlStyle::label ( const int  nEntries,
const double  relWidth,
const bool  leftt,
const bool  top 
)
staticprivate

Definition at line 288 of file TkAlStyle.cc.

References label(), setXCoordinatesL(), setXCoordinatesR(), setYCoordinatesB(), setYCoordinatesT(), and textSize.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::_sort_list(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::foundIn(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::fullFilename(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor::properties(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::readConnections(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor::updateProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::usedBy().

288  {
289  double x0 = 0.;
290  double x1 = 0.;
291  double y0 = 0.;
292  double y1 = 0.;
293  if( left ) setXCoordinatesL(relWidth,x0,x1);
294  else setXCoordinatesR(relWidth,x0,x1);
295  if( top ) setYCoordinatesT(nEntries,y0,y1);
296  else setYCoordinatesB(nEntries,y0,y1);
297 
298  TPaveText* label = new TPaveText(x0,y0,x1,y1,"NDC");
299  label->SetBorderSize(0);
300  label->SetFillColor(0);
301  label->SetFillStyle(0);
302  label->SetTextFont(42);
303  label->SetTextAlign(12); // left adjusted and vertically centered
304  label->SetTextSize(textSize);
305  label->SetMargin(0.);
306 
307  return label;
308 }
static void setYCoordinatesB(const int nEntries, double &y0, double &y1)
Definition: TkAlStyle.cc:257
static double textSize
Definition: TkAlStyle.cc:104
static void setYCoordinatesT(const int nEntries, double &y0, double &y1)
Definition: TkAlStyle.cc:250
static void setXCoordinatesL(const double relWidth, double &x0, double &x1)
Definition: TkAlStyle.cc:236
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static void setXCoordinatesR(const double relWidth, double &x0, double &x1)
Definition: TkAlStyle.cc:243
static TPaveText* TkAlStyle::labelBL ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 185 of file TkAlStyle.cc.

References label().

Referenced by label().

185  {
186  return label(nEntries,relWidth,true,false);
187  }
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static TPaveText* TkAlStyle::labelBR ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 188 of file TkAlStyle.cc.

References label().

Referenced by label().

188  {
189  return label(nEntries,relWidth,false,false);
190  }
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static TPaveText* TkAlStyle::labelTL ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 179 of file TkAlStyle.cc.

References label().

Referenced by label().

179  {
180  return label(nEntries,relWidth,true,true);
181  }
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static TPaveText* TkAlStyle::labelTR ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 182 of file TkAlStyle.cc.

References label().

Referenced by label().

182  {
183  return label(nEntries,relWidth,false,true);
184  }
static TPaveText * label(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:152
static TLegend* TkAlStyle::legend ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 109 of file TkAlStyle.cc.

References legendTR().

Referenced by legendBL(), legendBR(), legendTL(), and legendTR().

109  {
110  return legendTR(nEntries,relWidth);
111  }
static TLegend * legendTR(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:137
static TLegend* TkAlStyle::legend ( TString  position,
const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 112 of file TkAlStyle.cc.

References create_public_lumi_plots::leg, legendBL(), legendBR(), legendTL(), and legendTR().

112  {
113  position.ToLower();
114  if( !( position.Contains("top") || position.Contains("bottom") ) )
115  position += "top";
116  if( !( position.Contains("left") || position.Contains("right") ) )
117  position += "right";
118  TLegend* leg = 0;
119  if( position.Contains("top") && position.Contains("right") ) {
120  leg = legendTR(nEntries,relWidth);
121  } else if( position.Contains("top") && position.Contains("left") ) {
122  leg = legendTL(nEntries,relWidth);
123  } else if( position.Contains("bottom") && position.Contains("right") ) {
124  leg = legendBR(nEntries,relWidth);
125  } else if( position.Contains("bottom") && position.Contains("left") ) {
126  leg = legendBL(nEntries,relWidth);
127  } else {
128  leg = legendTR(nEntries,relWidth);
129  }
130 
131  return leg;
132  }
static TLegend * legendBR(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:143
static TLegend * legendBL(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:140
static TLegend * legendTR(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:137
static int position[264][3]
Definition: ReadPGInfo.cc:509
static TLegend * legendTL(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:134
TLegend * TkAlStyle::legend ( const int  nEntries,
const double  relWidth,
const bool  left,
const bool  top 
)
staticprivate

Definition at line 264 of file TkAlStyle.cc.

References create_public_lumi_plots::leg, legendheader, setXCoordinatesL(), setXCoordinatesR(), setYCoordinatesB(), setYCoordinatesT(), and textSize.

264  {
265  double x0 = 0.;
266  double x1 = 0.;
267  double y0 = 0.;
268  double y1 = 0.;
269  bool hasheader = (TkAlStyle::legendheader != "");
270  if( left ) setXCoordinatesL(relWidth, x0,x1);
271  else setXCoordinatesR(relWidth, x0,x1);
272  if( top ) setYCoordinatesT(nEntries+hasheader,y0,y1);
273  else setYCoordinatesB(nEntries+hasheader,y0,y1);
274 
275  TLegend* leg = new TLegend(x0,y0,x1,y1);
276  leg->SetBorderSize(0);
277  leg->SetFillColor(0);
278  leg->SetFillStyle(0);
279  leg->SetTextFont(42);
280  leg->SetTextSize(textSize);
281  if (hasheader) leg->SetHeader(TkAlStyle::legendheader);
282 
283  return leg;
284 }
static void setYCoordinatesB(const int nEntries, double &y0, double &y1)
Definition: TkAlStyle.cc:257
static double textSize
Definition: TkAlStyle.cc:104
static void setYCoordinatesT(const int nEntries, double &y0, double &y1)
Definition: TkAlStyle.cc:250
static TString legendheader
Definition: TkAlStyle.cc:102
static void setXCoordinatesL(const double relWidth, double &x0, double &x1)
Definition: TkAlStyle.cc:236
static void setXCoordinatesR(const double relWidth, double &x0, double &x1)
Definition: TkAlStyle.cc:243
static TLegend* TkAlStyle::legendBL ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 140 of file TkAlStyle.cc.

References legend().

Referenced by legend().

140  {
141  return legend(nEntries,relWidth,true,false);
142  }
static TLegend * legend(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:109
static TLegend* TkAlStyle::legendBR ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 143 of file TkAlStyle.cc.

References legend().

Referenced by legend().

143  {
144  return legend(nEntries,relWidth,false,false);
145  }
static TLegend * legend(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:109
static TLegend* TkAlStyle::legendTL ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 134 of file TkAlStyle.cc.

References legend().

Referenced by legend().

134  {
135  return legend(nEntries,relWidth,true,true);
136  }
static TLegend * legend(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:109
static TLegend* TkAlStyle::legendTR ( const int  nEntries,
const double  relWidth = 0.5 
)
inlinestatic

Definition at line 137 of file TkAlStyle.cc.

References legend().

Referenced by legend().

137  {
138  return legend(nEntries,relWidth,false,true);
139  }
static TLegend * legend(const int nEntries, const double relWidth=0.5)
Definition: TkAlStyle.cc:109
static double TkAlStyle::lineHeight ( )
inlinestatic

Definition at line 193 of file TkAlStyle.cc.

References lineHeight_.

193 { return lineHeight_; }
static double lineHeight_
Definition: TkAlStyle.cc:201
TString TkAlStyle::rightheader ( const Era  era)
staticprivate

Definition at line 388 of file TkAlStyle.cc.

References customRightTitle_, NONE, and toTString().

Referenced by standardRightTitle().

389 {
390  TString txt = "";
391  if( era != NONE ) {
392  txt = toTString(era);
393  } else {
394  txt = customRightTitle_;
395  }
396  return txt;
397 }
static TString customRightTitle_
Definition: TkAlStyle.cc:200
TString toTString(const PublicationStatus status)
Definition: TkAlStyle.cc:31
TPaveText * TkAlStyle::righttitle ( const TString &  txt)
staticprivate

Definition at line 346 of file TkAlStyle.cc.

References applyCMS().

Referenced by customRightTitle(), and standardRightTitle().

346  {
347  TString newtxt = applyCMS(txt);
348  double x0 = gStyle->GetPadLeftMargin();
349  double x1 = 1.-gStyle->GetPadRightMargin();
350  double y0 = 1.-gStyle->GetPadTopMargin();
351  double y1 = 1.;
352  TPaveText* theTitle = new TPaveText(x0,y0,x1,y1,"NDC");
353  theTitle->SetBorderSize(0);
354  theTitle->SetFillColor(10);
355  theTitle->SetFillStyle(0);
356  theTitle->SetTextFont(42);
357  theTitle->SetTextAlign(33); // right bottom adjusted
358  theTitle->SetTextSize(0.038);
359  theTitle->SetMargin(0.);
360  theTitle->AddText(newtxt);
361 
362  return theTitle;
363 }
static TString applyCMS(const TString &txt)
Definition: TkAlStyle.cc:315
void TkAlStyle::set ( const PublicationStatus  status,
const Era  era = NONE,
const TString  customTitle = "",
const TString  customRightTitle = "" 
)
static

Definition at line 401 of file TkAlStyle.cc.

References gather_cfg::cout, CUSTOM, customRightTitle(), customRightTitle_, customTitle(), customTitle_, era_, utils::gErrorIgnoreLevel, publicationStatus_, and status().

Referenced by compareAlignments(), and betterConfigParser.BetterConfigParser::getGeneral().

401  {
402  // Store the PublicationStatus for later usage, e.g. in the title
406  era_ = era;
407  if (publicationStatus_ == CUSTOM && customTitle_ == "")
408  std::cout << "Error: you are trying to use a custom title, but you don't provide it" << std::endl;
409  if (publicationStatus_ != CUSTOM && customTitle_ != "")
410  std::cout << "Error: you provide a custom title, but you don't indicate CUSTOM status. Your title will not be used." << std::endl;
411 
412  // Suppress message when canvas has been saved
413  gErrorIgnoreLevel = 1001;
414 
415  // Zero horizontal error bars
416  gStyle->SetErrorX(0);
417 
418  // For the canvas
419  gStyle->SetCanvasBorderMode(0);
420  gStyle->SetCanvasColor(kWhite);
421  gStyle->SetCanvasDefH(800); //Height of canvas
422  gStyle->SetCanvasDefW(800); //Width of canvas
423  gStyle->SetCanvasDefX(0); //Position on screen
424  gStyle->SetCanvasDefY(0);
425 
426  // For the frame
427  gStyle->SetFrameBorderMode(0);
428  gStyle->SetFrameBorderSize(10);
429  gStyle->SetFrameFillColor(kBlack);
430  gStyle->SetFrameFillStyle(0);
431  gStyle->SetFrameLineColor(kBlack);
432  gStyle->SetFrameLineStyle(0);
433  gStyle->SetFrameLineWidth(2);
434  gStyle->SetLineWidth(3);
435 
436  // For the Pad
437  gStyle->SetPadBorderMode(0);
438  gStyle->SetPadColor(kWhite);
439  gStyle->SetPadGridX(false);
440  gStyle->SetPadGridY(false);
441  gStyle->SetGridColor(0);
442  gStyle->SetGridStyle(3);
443  gStyle->SetGridWidth(1);
444 
445  // Margins
446  gStyle->SetPadTopMargin(0.08);
447  gStyle->SetPadBottomMargin(0.13);
448  gStyle->SetPadLeftMargin(0.16);
449  gStyle->SetPadRightMargin(0.05);
450 
451  // For the histo:
452  gStyle->SetHistLineColor(kBlack);
453  gStyle->SetHistLineStyle(0);
454  gStyle->SetHistLineWidth(3);
455  gStyle->SetMarkerSize(0.8);
456  gStyle->SetEndErrorSize(4);
457  gStyle->SetHatchesLineWidth(1);
458 
459  // For the statistics box:
460  gStyle->SetOptStat(0);
461 
462  // For the axis
463  gStyle->SetAxisColor(1,"XYZ");
464  gStyle->SetTickLength(0.03,"XYZ");
465  gStyle->SetNdivisions(510,"XYZ");
466  gStyle->SetPadTickX(1);
467  gStyle->SetPadTickY(1);
468  gStyle->SetStripDecimals(kFALSE);
469 
470  // For the axis labels and titles
471  gStyle->SetTitleColor(1,"XYZ");
472  gStyle->SetLabelColor(1,"XYZ");
473  gStyle->SetLabelFont(42,"XYZ");
474  gStyle->SetLabelOffset(0.007,"XYZ");
475  gStyle->SetLabelSize(0.04,"XYZ");
476  gStyle->SetTitleFont(42,"XYZ");
477  gStyle->SetTitleSize(0.047,"XYZ");
478  gStyle->SetTitleXOffset(1.2);
479  gStyle->SetTitleYOffset(1.5);
480 
481  // For the legend
482  gStyle->SetLegendBorderSize(0);
483 }
static TString customTitle_
Definition: TkAlStyle.cc:199
static TPaveText * customTitle(const TString &txt)
Definition: TkAlStyle.cc:99
static PublicationStatus status()
Definition: TkAlStyle.cc:63
static Era era_
Definition: TkAlStyle.cc:198
static TString customRightTitle_
Definition: TkAlStyle.cc:200
static PublicationStatus publicationStatus_
Definition: TkAlStyle.cc:197
static TPaveText * customRightTitle(const TString &txt)
Definition: TkAlStyle.cc:100
gErrorIgnoreLevel
Definition: utils.py:25
void TkAlStyle::set ( const TString  customTitle)
static

Definition at line 485 of file TkAlStyle.cc.

References CUSTOM, customTitle(), and NONE.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

486 {
487  set(CUSTOM, NONE, customTitle);
488 }
static TPaveText * customTitle(const TString &txt)
Definition: TkAlStyle.cc:99
void TkAlStyle::setXCoordinatesL ( const double  relWidth,
double &  x0,
double &  x1 
)
staticprivate

Definition at line 236 of file TkAlStyle.cc.

References margin_.

Referenced by label(), and legend().

236  {
237  x0 = gStyle->GetPadLeftMargin()+margin_;
238  x1 = x0 + relWidth*(1.-gStyle->GetPadLeftMargin()-gStyle->GetPadRightMargin()-2.*margin_);
239 }
static double margin_
Definition: TkAlStyle.cc:202
void TkAlStyle::setXCoordinatesR ( const double  relWidth,
double &  x0,
double &  x1 
)
staticprivate

Definition at line 243 of file TkAlStyle.cc.

References margin_.

Referenced by label(), and legend().

243  {
244  x0 = 1.-gStyle->GetPadRightMargin()-margin_-relWidth*(1.-gStyle->GetPadLeftMargin()-gStyle->GetPadRightMargin()-2.*margin_);
245  x1 = 1.-gStyle->GetPadRightMargin()-margin_;
246 }
static double margin_
Definition: TkAlStyle.cc:202
void TkAlStyle::setYCoordinatesB ( const int  nEntries,
double &  y0,
double &  y1 
)
staticprivate

Definition at line 257 of file TkAlStyle.cc.

References lineHeight_, and margin_.

Referenced by label(), and legend().

257  {
258  y1 = gStyle->GetPadBottomMargin()+margin_;
259  y0 = y1+nEntries*lineHeight_;
260 }
static double lineHeight_
Definition: TkAlStyle.cc:201
static double margin_
Definition: TkAlStyle.cc:202
void TkAlStyle::setYCoordinatesT ( const int  nEntries,
double &  y0,
double &  y1 
)
staticprivate

Definition at line 250 of file TkAlStyle.cc.

References lineHeight_, and margin_.

Referenced by label(), and legend().

250  {
251  y1 = 1.-gStyle->GetPadTopMargin()-margin_;
252  y0 = y1-nEntries*lineHeight_;
253 }
static double lineHeight_
Definition: TkAlStyle.cc:201
static double margin_
Definition: TkAlStyle.cc:202
static TPaveText* TkAlStyle::standardRightTitle ( const Era  era)
inlinestatic

Definition at line 90 of file TkAlStyle.cc.

References rightheader(), and righttitle().

90  {
91  return righttitle(rightheader(era));
92  }
static TPaveText * righttitle(const TString &txt)
Definition: TkAlStyle.cc:346
static TString rightheader(const Era era)
Definition: TkAlStyle.cc:388
static TPaveText* TkAlStyle::standardRightTitle ( )
inlinestatic

Definition at line 93 of file TkAlStyle.cc.

References era_.

Referenced by drawStandardTitle().

93  {
94  return standardRightTitle(era_);
95  }
static Era era_
Definition: TkAlStyle.cc:198
static TPaveText * standardRightTitle()
Definition: TkAlStyle.cc:93
static TPaveText* TkAlStyle::standardTitle ( PublicationStatus  status)
inlinestatic

Definition at line 83 of file TkAlStyle.cc.

References header(), and title().

83  {
84  return title(header(status));
85  }
static PublicationStatus status()
Definition: TkAlStyle.cc:63
static TPaveText * title(const TString &txt)
Definition: TkAlStyle.cc:325
static TString header(const PublicationStatus status)
Definition: TkAlStyle.cc:367
static TPaveText* TkAlStyle::standardTitle ( )
inlinestatic

Definition at line 86 of file TkAlStyle.cc.

References publicationStatus_.

Referenced by drawStandardTitle().

86  {
88  }
static PublicationStatus publicationStatus_
Definition: TkAlStyle.cc:197
static TPaveText * standardTitle()
Definition: TkAlStyle.cc:86
static PublicationStatus TkAlStyle::status ( )
inlinestatic

Definition at line 63 of file TkAlStyle.cc.

References publicationStatus_.

Referenced by set().

63 { return publicationStatus_; }
static PublicationStatus publicationStatus_
Definition: TkAlStyle.cc:197
TPaveText * TkAlStyle::title ( const TString &  txt)
staticprivate

Definition at line 325 of file TkAlStyle.cc.

References applyCMS().

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::autolayout(), Vispa.Views.LineDecayView.LineDecayContainer::autolayoutThreadFinished(), Vispa.Views.LineDecayView.LineDecayContainer::childFinishedAutolayouting(), customTitle(), Vispa.Gui.PortWidget.PortWidget::name(), and standardTitle().

325  {
326  double x0 = gStyle->GetPadLeftMargin();
327  double x1 = 1.-gStyle->GetPadRightMargin();
328  double y0 = 1.-gStyle->GetPadTopMargin();
329  double y1 = 1.;
330  if (txt.Contains("#CMS")) y0 += .02;
331  TPaveText* theTitle = new TPaveText(x0,y0,x1,y1,"NDC");
332  theTitle->SetBorderSize(0);
333  theTitle->SetFillColor(10);
334  theTitle->SetFillStyle(0);
335  theTitle->SetTextFont(42);
336  theTitle->SetTextAlign(13); // left bottom adjusted
337  theTitle->SetTextSize(0.038);
338  theTitle->SetMargin(0.);
339  theTitle->AddText(applyCMS(txt));
340 
341  return theTitle;
342 }
static TString applyCMS(const TString &txt)
Definition: TkAlStyle.cc:315

Member Data Documentation

TString TkAlStyle::customRightTitle_ = ""
staticprivate

Definition at line 200 of file TkAlStyle.cc.

Referenced by rightheader(), and set().

TString TkAlStyle::customTitle_ = ""
staticprivate

Definition at line 199 of file TkAlStyle.cc.

Referenced by header(), and set().

Era TkAlStyle::era_ = NONE
staticprivate

Definition at line 198 of file TkAlStyle.cc.

Referenced by set(), and standardRightTitle().

TString TkAlStyle::legendheader = ""
static

Definition at line 102 of file TkAlStyle.cc.

Referenced by compareAlignments(), legend(), and MergeRootfile().

TString TkAlStyle::legendoptions = "all"
static

Definition at line 103 of file TkAlStyle.cc.

double TkAlStyle::lineHeight_ = 0.042
staticprivate

Definition at line 201 of file TkAlStyle.cc.

Referenced by lineHeight(), setYCoordinatesB(), and setYCoordinatesT().

double TkAlStyle::margin_ = 0.04
staticprivate
PublicationStatus TkAlStyle::publicationStatus_ = NO_STATUS
staticprivate

Definition at line 197 of file TkAlStyle.cc.

Referenced by set(), standardTitle(), and status().

double TkAlStyle::textSize = 0.035
static

Definition at line 104 of file TkAlStyle.cc.

Referenced by label(), legend(), and MergeRootfile().