CanvasHelper
|
#include "CanvasHelper.h"
Inherits TObject.
Public Member Functions | |
virtual | ~CanvasHelper () |
Class destructor. | |
void | addCanvas (TCanvas *canvas) |
Register your canvas for processing. Canvas needs to be added after all the primitives are drawn on it. More... | |
Static Public Member Functions | |
static CanvasHelper * | getInstance () |
Obtain an instance of the CanvasHelper class. More... | |
static void | addSubtitle (TVirtualPad *pad, const char *text) |
Add subtitle to the canvas. lololo. More... | |
static void | setPaveAlignment (TPave *pave, UInt_t align) |
Used to specify TPave's alignment on the ROOT canvas. Emum variables can be combined: More... | |
static TPaveStats * | getDefaultPaveStats (TVirtualPad *pad) |
Used to obtain default ROOT statistics box from a canvas with histogram, graph etc. Finds TPave in the histogram (graph) list of primitives. Detaches TPave and attaches to the canvas. Returns a pointer to the TPave. More... | |
static TLegend * | getDefaultLegend (TVirtualPad *pad) |
Used to obtain default ROOT legend from a canvas. More... | |
static void | addTextToStats (const char *text, TVirtualPad *pad) |
Used to add a line to the default canvas (pad) statistics box. More... | |
static void | addTextToStats (const char *text, TPaveStats *stats, TVirtualPad *pad) |
Used to add a line to a custom specific statistics box on a canvas (pad). More... | |
static void | addMultiCanvasTitle (TCanvas *canvas, const char *title, const char *subtitle="") |
Adding a multi-pad canvas title. Optionally supprts subtitle too. More... | |
static void | saveCanvas (TCanvas *canvas, UInt_t format) |
One and only library class represented by a singleton.
void CanvasHelper::addCanvas | ( | TCanvas * | canvas | ) |
Register your canvas for processing. Canvas needs to be added after all the primitives are drawn on it.
canvas | Canvas to be processed. |
|
static |
Adding a multi-pad canvas title. Optionally supprts subtitle too.
canvas | ROOT canvas divided into a number of sub-pads. |
title | String to be used as title. |
subtitle | String to be used as sub-title. |
|
static |
Add subtitle to the canvas. lololo.
pad | Canvas object. |
text | Subtitle text. Can use TLatex syntax. |
|
static |
Used to add a line to a custom specific statistics box on a canvas (pad).
text | String of text to be added. |
stats | Specific statistics box to add a line to. |
pad | Canvas or a sub-pad containing the legend. |
|
static |
Used to add a line to the default canvas (pad) statistics box.
text | String of text to be added. Use = as a spacer between left and right-aligned substrings. TLatex is also supported. |
pad | Canvas or a sub-pad containing the legend. |
|
static |
Used to obtain default ROOT legend from a canvas.
pad | Canvas or a sub-pad containing the legend. |
|
static |
Used to obtain default ROOT statistics box from a canvas with histogram, graph etc. Finds TPave in the histogram (graph) list of primitives. Detaches TPave and attaches to the canvas. Returns a pointer to the TPave.
pad | Canvas or a sub-pad containing statistics box. |
|
static |
Obtain an instance of the CanvasHelper class.
|
static |
Function saves canvas to disk in certain format. Formats are manipulated as bits:
*
|
static |
Used to specify TPave's alignment on the ROOT canvas. Emum variables can be combined:
pave | Statistic box, legend or other TPave |
align | Binary combination of EPaveAlignBits |