eicplot  trunk
EIC ROOT plotting utilities
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes
erhic::Credits Class Reference

#include <Credits.h>

List of all members.

Public Member Functions

virtual ~Credits ()

Static Public Member Functions

static TText * Draw (TVirtualPad *=NULL)
static std::string Text ()
static double MinimumMargin ()
static void SetMinimumMargin (double)
static TVirtualPad * Test ()

Static Protected Member Functions

static std::pair< double, double > ComputeCoordinates (TVirtualPad &)
static std::list< TH1 * > GetHists (TVirtualPad &)
static bool InterferesWithCredits (TPave *)

Static Protected Attributes

static std::string smText = "BNL EIC Science Task Force"
static double smMinMargin = 0.05

Detailed Description

Utility to print "EIC Science Task Force" credits to a ROOT pad. Credits are written in the right margin. Attempts to avoid stat boxes and colour palettes and to resize text automatically to fit in the available space. Expands the right margin if it is too small for the credits.


Constructor & Destructor Documentation

virtual erhic::Credits::~Credits ( ) [inline, virtual]

Destructor


Member Function Documentation

std::pair< double, double > erhic::Credits::ComputeCoordinates ( TVirtualPad &  pad) [static, protected]

Computes the x-y NDC coordinates for the centre of the credits on the input pad. Return value is a pair storing (x, y).

TText * erhic::Credits::Draw ( TVirtualPad *  pad = NULL) [static]

Draw the credits to a ROOT pad. If the argument is NULL the current ROOT pad is used. If no pad exists, a default canvas is created. Returns the text object drawn to the pad. Each text is given a name "erhiccredits#", where # is an integer starting at 0 and incrementing each time the credits are drawn to the same pad. It can therefore be accessed via e.g. pad->FindObject("erhiccredits0"); The drawn credits are automatically deleted when the pad is cleared, so the user should not delete the text themselves.

std::list< TH1 * > erhic::Credits::GetHists ( TVirtualPad &  pad) [static, protected]

Return all histogram objects drawn on a pad

bool erhic::Credits::InterferesWithCredits ( TPave *  pave) [static, protected]

Returns true if the pad object coordinates are believed to interfere with the default location for the credits text.

double erhic::Credits::MinimumMargin ( ) [inline, static]

Returns the minimum fraction of the pad width reserved for the credits.

void erhic::Credits::SetMinimumMargin ( double  val) [inline, static]

Set the minimum fraction of a pad width reserved for credits.

TVirtualPad * erhic::Credits::Test ( ) [static]

Draws a test page.

std::string erhic::Credits::Text ( ) [inline, static]

Returns the credits message that is printed,


The documentation for this class was generated from the following files: