BCHistogramBase Class Reference

A base class for drawing histograms in BAT style. More...

#include <BCHistogramBase.h>

Inheritance diagram for BCHistogramBase:
[legend]

Public Types

Enumerators
enum  BCHColorScheme { kBlackWhite = 0, kGreenYellowRed = 1, kBlueOrange = 2, kRedGreen = 3 }
 An enumerator for the color schemes. More...
 

Public Member Functions

Constructors and destructors

}

 BCHistogramBase (const TH1 *const hist=0, int dimension=0)
 The default constructor. More...
 
 BCHistogramBase (const BCHistogramBase &other)
 Copy constructor. More...
 
virtual ~BCHistogramBase ()
 The default destructor. More...
 
Member functions (get)
TH1 * GetHistogram ()
 
unsigned GetDimension () const
 
TLegend & GetLegend ()
 
unsigned GetNLegendColumns () const
 
std::vector< double > & GetBestFitParameters ()
 
const std::vector< double > & GetBestFitParameters () const
 
double GetBestFitParameters (unsigned i) const
 
std::vector< double > & GetLocalMode ()
 
const std::vector< double > & GetLocalMode () const
 
double GetLocalMode (unsigned i)
 
int GetBandColor (int index) const
 Returns a band color of the current color scheme. More...
 
bool GetBandOvercoverage () const
 
int GetLineColor () const
 
int GetLineStyle () const
 
int GetLineWidth () const
 
int GetMarkerColor () const
 Returns the marker colors (used for mean, median, and mode. More...
 
double GetMarkerScale () const
 
short GetBandFillStyle () const
 
unsigned GetNBands () const
 
unsigned GetNSmooth () const
 
bool GetDrawGlobalMode () const
 
bool GetDrawGlobalModeArrows () const
 
int GetBestFitParametersMarkerStyle () const
 
bool GetDrawLocalMode () const
 
bool GetDrawLocalModeArrows () const
 
int GetLocalModeMarkerStyle () const
 
bool GetDrawMean () const
 
int GetMeanMarkerStyle () const
 
bool GetDrawStandardDeviation () const
 
bool GetLogx () const
 
bool GetLogy () const
 
bool GetLogz () const
 
bool GetGridx () const
 
bool GetGridy () const
 
std::vector< double > & GetIntervals ()
 
const std::vector< double > & GetIntervals () const
 
std::string & GetROOToptions ()
 
const std::string & GetROOToptions () const
 
Member functions (set)
virtual void CopyOptions (const BCHistogramBase &other)
 Copy options from. More...
 
void SetGlobalMode (std::vector< double > gm)
 Set global mode. More...
 
void UnsetGlobalMode ()
 Unset global mode. More...
 
void SetGlobalMode (unsigned i, double lm)
 Set global mode element. More...
 
void SetLocalMode (std::vector< double > lm)
 Set local mode. More...
 
void UnsetLocalMode ()
 Unset local mode. More...
 
void SetLocalMode (unsigned i, double lm)
 Set local mode element. More...
 
virtual void SetColorScheme (BCHColorScheme scheme)
 Sets the color scheme. More...
 
void AddBandColor (int c)
 Add band color. More...
 
void SetBandColor (unsigned i, int c)
 Set band color. More...
 
void SetBandOvercoverage (bool flag=true)
 Set band coverage to be overcoverage (true) or undercoverage (false). More...
 
void SetLineColor (int c)
 Set histogram line color. More...
 
void SetLineStyle (int s)
 Set histogram line style. More...
 
void SetLineWidth (int w)
 Set histogram line width. More...
 
void SetMarkerColor (int c)
 Set marker color (used for mean, median, and mode). More...
 
void SetMarkerScale (double s)
 Set marker size scale. More...
 
void SetBandFillStyle (short f)
 Set band fill style. More...
 
virtual void SetHistogram (const TH1 *const hist)
 Sets the histogram. More...
 
void SetLogx (bool flag=true)
 Sets drawing of x axis in log. More...
 
void SetLogy (bool flag=true)
 Sets drawing of y axis in log. More...
 
void SetLogz (bool flag=true)
 Sets drawing of z axis in log. More...
 
void SetGridx (bool flag=true)
 Sets drawing of grid on x axis. More...
 
void SetGridy (bool flag=true)
 Sets drawing of grid on y axis. More...
 
void SetNBands (unsigned n)
 Sets number of credibility interval bands to draw. More...
 
void SetNSmooth (unsigned n)
 Sets number of times to smooth the histogram using ROOT's smoothing function. More...
 
void SetDrawGlobalMode (bool flag=true, bool arrows=true)
 Set drawing of global mode. More...
 
void SetGlobalModeMarkerStyle (int s)
 Set global mode marker style. More...
 
void SetDrawLocalMode (bool flag=true, bool arrows=true)
 Set drawing of global mode. More...
 
void SetLocalModeMarkerStyle (int s)
 Set Local mode marker style. More...
 
void SetDrawMean (bool flag=true, bool stddev=true)
 Set drawing of mean. More...
 
void SetMeanMarkerStyle (int s)
 Set mean marker style. More...
 
void SetDrawLegend (bool flag=true)
 Set drawing of legend. More...
 
void SetNLegendColumns (unsigned n)
 Set number of columns in legend. More...
 
void SetStats (bool flag=true)
 Set drawing of ROOT histogram stats box. More...
 
void SetIntervals (std::vector< double > intervals)
 Set intervals to be drawn. More...
 
void SetInterval (double interval)
 Set intervals to one single value. More...
 
void AddInterval (double interval)
 Add interval value. More...
 
void SetROOToptions (const std::string &options)
 Set ROOT drawing options. More...
 
Member functions (miscellaneous methods)
virtual bool Valid () const
 Whether histogram has been set and filled. More...
 
void ClearBandColors ()
 
void ClearIntervals ()
 
void Smooth (int n=-1)
 Applying ROOT smoothing to histogram, and renormalize. More...
 
virtual void Draw ()
 Draw distribution into the active pad.
 
virtual void DrawBands (const std::string &)
 Draw bands. More...
 
virtual void DrawMarkers ()
 Draw markers (global mode, local mode, etc.). More...
 
virtual void DrawGlobalMode ()
 Draw global mode. More...
 
virtual void DrawLocalMode ()
 Draw global mode. More...
 
virtual void DrawMean ()
 Draw mean and standard deviation. More...
 
virtual double ResizeLegend ()
 Resize legend and set it for placement at the top of the pad. More...
 
virtual void DrawLegend ()
 Resize histogram and draw legend. More...
 
void GetNonzeroBinDensityMassVector (std::vector< std::pair< double, double > > &bin_dens_mass, int sort=-1)
 Fill vector with values and integrals of nonzero bins sorted by value. More...
 
std::vector< std::pair< double, double > > GetSmallestIntervalBounds (std::vector< double > masses, bool overcoverage=true)
 Get probability density levels bounding from below the smallest-interval levels with probability mass near that provided in the argument. More...
 
virtual std::vector< double > GetSmallestIntervalSize (std::vector< double > masses, bool overcoverage=true)
 Get smallest interval sizes in dimensions of histogram: length (1D), area (2D), volume (3D). More...
 
virtual double GetSmallestIntervalSize (double mass, bool overcoverage=true)
 Get smallest interval size in dimensions of histogram: length (1D), area (2D), volume (3D). More...
 
virtual void CheckIntervals (std::vector< double > &intervals, int sort)
 Check intervals: remove values below 0 or above 1. More...
 
virtual std::vector< double > DefaultIntervals (int nbands=-1)
 Return default intervals. More...
 
TLegendEntry * AddLegendEntry (TObject *obj, const std::string &label, const std::string &options)
 Add legend entry, checking first for unused extra entries. More...
 
TLegendEntry * AddBandLegendEntry (TObject *obj, const std::string &label, const std::string &options)
 Add band legend entry, creating unused extra entries if necessary. More...
 

Protected Attributes

std::vector< int > fBandColors
 The colors of the color scheme. More...
 
short fBandFillStyle
 The fill style for the bands. More...
 
bool fBandOvercoverage
 flag for whether bands should overcover. More...
 
int fDimension
 Dimension of histogram. More...
 
bool fDrawGlobalMode
 Flag for drawing global mode. More...
 
bool fDrawGlobalModeArrows
 Flag for drawing global mode arrows. More...
 
bool fDrawLegend
 Flag for drawing legend. More...
 
bool fDrawLocalMode
 Flag for drawing local mode. More...
 
bool fDrawLocalModeArrows
 Flag for drawing local mode arrows. More...
 
bool fDrawMean
 Flag for drawing mean. More...
 
bool fDrawStandardDeviation
 Flag for drawing standard deviation. More...
 
bool fDrawStats
 Flag for drawing stats box. More...
 
std::vector< TLegendEntry * > fExtraLegendEntries
 Storage for unused legend entries (for use with multicolumn legends). More...
 
std::vector< double > fGlobalMode
 Global mode.
 
int fGlobalModeMarkerStyle
 Holds option for global-mode marker style. More...
 
bool fGridx
 Flag for drawing of grid on x axis. More...
 
bool fGridy
 Flag for drawing of grid on y axis. More...
 
TH1 * fHistogram
 The histogram.
 
std::vector< double > fIntervals
 intervals to draw. More...
 
TLegend fLegend
 Legend. More...
 
int fLineColor
 histogram line color. More...
 
int fLineStyle
 histogram line style. More...
 
int fLineWidth
 histogram line width. More...
 
std::vector< double > fLocalMode
 Local mode.
 
int fLocalModeMarkerStyle
 Holds option for local-mode marker style. More...
 
bool fLogx
 Flag for controlling log plotting of x axis. More...
 
bool fLogy
 Flag for controlling log plotting of y axis. More...
 
bool fLogz
 Flag for controlling log plotting of z axis. More...
 
int fMarkerColor
 Marker color. More...
 
double fMarkerScale
 Marker size scale. More...
 
int fMeanMarkerStyle
 Holds option for mean marker style. More...
 
unsigned fNBands
 Number of credibility interval bands to draw. More...
 
unsigned fNLegendColumns
 number of columns to be set for legend. More...
 
unsigned fNSmooth
 Number of times to smooth histogram using ROOT's smooth function. More...
 
std::vector< TObject * > fROOTObjects
 Storage for plot objects. More...
 
std::string fROOToptions
 ROOT drawing options. More...
 

Operators and swap

BCHistogramBaseoperator= (BCHistogramBase other)
 Assignment operator. More...
 
BCHistogramBaseoperator= (const TH1 *const hist)
 Assign TH1 histogram with operator. More...
 
BCHistogramBaseoperator= (const TH1 &hist)
 Assign TH1 histogram with operator. More...
 
void swap (BCHistogramBase &first, BCHistogramBase &second)
 Swap function. More...
 

Detailed Description

A base class for drawing histograms in BAT style.

Author
Daniel Greenwald
Version
1.0

Definition at line 33 of file BCHistogramBase.h.

Member Enumeration Documentation

An enumerator for the color schemes.

Definition at line 42 of file BCHistogramBase.h.

Constructor & Destructor Documentation

BCHistogramBase::BCHistogramBase ( const TH1 *const  hist = 0,
int  dimension = 0 
)

The default constructor.

Parameters
histHistogram to build BCHistogram around.
dimensionDimension of the histogram (for checking purposes), if negative, no check is made.

Definition at line 32 of file BCHistogramBase.cxx.

BCHistogramBase::BCHistogramBase ( const BCHistogramBase other)

Copy constructor.

Definition at line 76 of file BCHistogramBase.cxx.

BCHistogramBase::~BCHistogramBase ( )
virtual

The default destructor.

Definition at line 89 of file BCHistogramBase.cxx.

Member Function Documentation

void BCHistogramBase::AddBandColor ( int  c)
inline

Add band color.

Parameters
cColor to add.

Definition at line 343 of file BCHistogramBase.h.

TLegendEntry * BCHistogramBase::AddBandLegendEntry ( TObject *  obj,
const std::string &  label,
const std::string &  options 
)

Add band legend entry, creating unused extra entries if necessary.

Definition at line 728 of file BCHistogramBase.cxx.

void BCHistogramBase::AddInterval ( double  interval)
inline

Add interval value.

Definition at line 493 of file BCHistogramBase.h.

TLegendEntry * BCHistogramBase::AddLegendEntry ( TObject *  obj,
const std::string &  label,
const std::string &  options 
)

Add legend entry, checking first for unused extra entries.

Definition at line 715 of file BCHistogramBase.cxx.

void BCHistogramBase::CheckIntervals ( std::vector< double > &  intervals,
int  sort 
)
virtual

Check intervals: remove values below 0 or above 1.

Parameters
intervalsThe intervals.
sortIf positive, sort by increasing order (default); if negative, sort by decreasing order; if zero, don't sort.

Definition at line 310 of file BCHistogramBase.cxx.

void BCHistogramBase::CopyOptions ( const BCHistogramBase other)
virtual

Copy options from.

Definition at line 97 of file BCHistogramBase.cxx.

std::vector< double > BCHistogramBase::DefaultIntervals ( int  nbands = -1)
virtual

Return default intervals.

Parameters
nbandsnbands to give defaults for; if negative, use fNBands.
Returns
vector of default values for band intervals.

Reimplemented in BCH2D, and BCH1D.

Definition at line 334 of file BCHistogramBase.cxx.

virtual void BCHistogramBase::DrawBands ( const std::string &  )
inlinevirtual

Draw bands.

Reimplemented in BCH2D, and BCH1D.

Definition at line 528 of file BCHistogramBase.h.

void BCHistogramBase::DrawGlobalMode ( )
virtual

Draw global mode.

Definition at line 530 of file BCHistogramBase.cxx.

void BCHistogramBase::DrawLegend ( )
virtual

Resize histogram and draw legend.

Definition at line 737 of file BCHistogramBase.cxx.

void BCHistogramBase::DrawLocalMode ( )
virtual

Draw global mode.

Definition at line 586 of file BCHistogramBase.cxx.

void BCHistogramBase::DrawMarkers ( )
virtual

Draw markers (global mode, local mode, etc.).

Reimplemented in BCH2D, and BCH1D.

Definition at line 522 of file BCHistogramBase.cxx.

void BCHistogramBase::DrawMean ( )
virtual

Draw mean and standard deviation.

Definition at line 642 of file BCHistogramBase.cxx.

int BCHistogramBase::GetBandColor ( int  index) const
inline

Returns a band color of the current color scheme.

Parameters
indexthe color index
Returns
the color number.

Definition at line 152 of file BCHistogramBase.h.

short BCHistogramBase::GetBandFillStyle ( ) const
inline
Returns
Band fill style.

Definition at line 187 of file BCHistogramBase.h.

bool BCHistogramBase::GetBandOvercoverage ( ) const
inline
Returns
flag for whether bands should be drawn to overcover (true) or undercover (false).

Definition at line 157 of file BCHistogramBase.h.

std::vector<double>& BCHistogramBase::GetBestFitParameters ( )
inline
Returns
The global mode.

Definition at line 118 of file BCHistogramBase.h.

const std::vector<double>& BCHistogramBase::GetBestFitParameters ( ) const
inline
Returns
The global mode.

Definition at line 123 of file BCHistogramBase.h.

double BCHistogramBase::GetBestFitParameters ( unsigned  i) const
inline
Returns
i'th component of global mode.
Parameters
iindex of coordinate to return.

Definition at line 129 of file BCHistogramBase.h.

int BCHistogramBase::GetBestFitParametersMarkerStyle ( ) const
inline
Returns
Global mode marker style.

Definition at line 212 of file BCHistogramBase.h.

unsigned BCHistogramBase::GetDimension ( ) const
inline
Returns
Dimensions of BC Histogram.

Definition at line 103 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawGlobalMode ( ) const
inline
Returns
whether to draw global mode.

Definition at line 202 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawGlobalModeArrows ( ) const
inline
Returns
whether to draw global mode arrow.

Definition at line 207 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawLocalMode ( ) const
inline
Returns
whether to draw local mode.

Definition at line 217 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawLocalModeArrows ( ) const
inline
Returns
whether to draw global mode arrow.

Definition at line 222 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawMean ( ) const
inline
Returns
whether to draw mean.

Definition at line 232 of file BCHistogramBase.h.

bool BCHistogramBase::GetDrawStandardDeviation ( ) const
inline
Returns
whether to draw standard deviation.

Definition at line 242 of file BCHistogramBase.h.

bool BCHistogramBase::GetGridx ( ) const
inline
Returns
flag for drawing grid on x axis.

Definition at line 262 of file BCHistogramBase.h.

bool BCHistogramBase::GetGridy ( ) const
inline
Returns
flag for drawing grid on y axis.

Definition at line 267 of file BCHistogramBase.h.

TH1* BCHistogramBase::GetHistogram ( )
inline
Returns
The histogram.

Definition at line 98 of file BCHistogramBase.h.

std::vector<double>& BCHistogramBase::GetIntervals ( )
inline
Returns
vector of intervals to draw.

Definition at line 272 of file BCHistogramBase.h.

const std::vector<double>& BCHistogramBase::GetIntervals ( ) const
inline
Returns
vector of intervals to draw.

Definition at line 277 of file BCHistogramBase.h.

TLegend& BCHistogramBase::GetLegend ( )
inline
Returns
The legend.

Definition at line 108 of file BCHistogramBase.h.

int BCHistogramBase::GetLineColor ( ) const
inline
Returns
histogram line color.

Definition at line 162 of file BCHistogramBase.h.

int BCHistogramBase::GetLineStyle ( ) const
inline
Returns
histogram line style.

Definition at line 167 of file BCHistogramBase.h.

int BCHistogramBase::GetLineWidth ( ) const
inline
Returns
histogram line width.

Definition at line 172 of file BCHistogramBase.h.

std::vector<double>& BCHistogramBase::GetLocalMode ( )
inline
Returns
The local mode.

Definition at line 134 of file BCHistogramBase.h.

const std::vector<double>& BCHistogramBase::GetLocalMode ( ) const
inline
Returns
The local mode.

Definition at line 139 of file BCHistogramBase.h.

double BCHistogramBase::GetLocalMode ( unsigned  i)
inline
Returns
i'th component of local mode.
Parameters
iindex of coordinate to return.

Definition at line 145 of file BCHistogramBase.h.

int BCHistogramBase::GetLocalModeMarkerStyle ( ) const
inline
Returns
Local mode marker style.

Definition at line 227 of file BCHistogramBase.h.

bool BCHistogramBase::GetLogx ( ) const
inline
Returns
flag for plotting log on x axis.

Definition at line 247 of file BCHistogramBase.h.

bool BCHistogramBase::GetLogy ( ) const
inline
Returns
flag for plotting log on y axis.

Definition at line 252 of file BCHistogramBase.h.

bool BCHistogramBase::GetLogz ( ) const
inline
Returns
flag for plotting log on z axis.

Definition at line 257 of file BCHistogramBase.h.

int BCHistogramBase::GetMarkerColor ( ) const
inline

Returns the marker colors (used for mean, median, and mode.

Definition at line 177 of file BCHistogramBase.h.

double BCHistogramBase::GetMarkerScale ( ) const
inline
Returns
scale of marker size.

Definition at line 182 of file BCHistogramBase.h.

int BCHistogramBase::GetMeanMarkerStyle ( ) const
inline
Returns
Mean marker style.

Definition at line 237 of file BCHistogramBase.h.

unsigned BCHistogramBase::GetNBands ( ) const
inline
Returns
N bands to draw.

Definition at line 192 of file BCHistogramBase.h.

unsigned BCHistogramBase::GetNLegendColumns ( ) const
inline
Returns
the number of columns to be set into the legend.

Definition at line 113 of file BCHistogramBase.h.

void BCHistogramBase::GetNonzeroBinDensityMassVector ( std::vector< std::pair< double, double > > &  bin_dens_mass,
int  sort = -1 
)

Fill vector with values and integrals of nonzero bins sorted by value.

Parameters
bin_dens_massvector of bin densities (values) and masses (integrals).
sortorder to sort in: -1 (default) decreasing; +1 increasing; 0 unsorted.

Definition at line 351 of file BCHistogramBase.cxx.

unsigned BCHistogramBase::GetNSmooth ( ) const
inline
Returns
N times to smooth.

Definition at line 197 of file BCHistogramBase.h.

std::string& BCHistogramBase::GetROOToptions ( )
inline
Returns
ROOT drawing options.

Definition at line 282 of file BCHistogramBase.h.

const std::string& BCHistogramBase::GetROOToptions ( ) const
inline
Returns
ROOT drawing options.

Definition at line 287 of file BCHistogramBase.h.

std::vector< std::pair< double, double > > BCHistogramBase::GetSmallestIntervalBounds ( std::vector< double >  masses,
bool  overcoverage = true 
)

Get probability density levels bounding from below the smallest-interval levels with probability mass near that provided in the argument.

CAUTION: This function will sort all bins of the histogram; if the histogram has many bins, this can be an expensive calculation.

Parameters
massesVector of probability masses to bound.
overcoverageFlag for providing values that overcover (if true), or undercover (if false).
Returns
Vector of pairs (probability density, probability mass lower-bounded by it).

Definition at line 382 of file BCHistogramBase.cxx.

std::vector< double > BCHistogramBase::GetSmallestIntervalSize ( std::vector< double >  masses,
bool  overcoverage = true 
)
virtual

Get smallest interval sizes in dimensions of histogram: length (1D), area (2D), volume (3D).

Parameters
massesvector of probability masses defining smallest intervals.
overcoverageFlag for providing values that overcover (if true), or undercover (if false).
Returns
vector of smallest interval sizes.

Definition at line 437 of file BCHistogramBase.cxx.

double BCHistogramBase::GetSmallestIntervalSize ( double  mass,
bool  overcoverage = true 
)
virtual

Get smallest interval size in dimensions of histogram: length (1D), area (2D), volume (3D).

Parameters
massprobability mass defining smallest interval.
overcoverageFlag for providing values that overcover (if true), or undercover (if false).
Returns
smallest interval size.

Definition at line 470 of file BCHistogramBase.cxx.

BCHistogramBase & BCHistogramBase::operator= ( BCHistogramBase  other)

Assignment operator.

Definition at line 131 of file BCHistogramBase.cxx.

BCHistogramBase& BCHistogramBase::operator= ( const TH1 *const  hist)
inline

Assign TH1 histogram with operator.

Definition at line 83 of file BCHistogramBase.h.

BCHistogramBase& BCHistogramBase::operator= ( const TH1 &  hist)
inline

Assign TH1 histogram with operator.

Definition at line 88 of file BCHistogramBase.h.

double BCHistogramBase::ResizeLegend ( )
virtual

Resize legend and set it for placement at the top of the pad.

Returns
new lower y coordinate of legend

Definition at line 695 of file BCHistogramBase.cxx.

void BCHistogramBase::SetBandColor ( unsigned  i,
int  c 
)
inline

Set band color.

Parameters
iIndex of color to set.
cColor to set it to.

Definition at line 350 of file BCHistogramBase.h.

void BCHistogramBase::SetBandFillStyle ( short  f)
inline

Set band fill style.

Parameters
fFill style for bands.

Definition at line 390 of file BCHistogramBase.h.

void BCHistogramBase::SetBandOvercoverage ( bool  flag = true)
inline

Set band coverage to be overcoverage (true) or undercoverage (false).

Definition at line 355 of file BCHistogramBase.h.

void BCHistogramBase::SetColorScheme ( BCHColorScheme  scheme)
virtual

Sets the color scheme.

Parameters
schemethe scheme index
0 : black and white 1 : yellow-green-red 2 : blueish colors 2 : redish colors 2 : blueish colors

Reimplemented in BCH1D.

Definition at line 232 of file BCHistogramBase.cxx.

void BCHistogramBase::SetDrawGlobalMode ( bool  flag = true,
bool  arrows = true 
)
inline

Set drawing of global mode.

Definition at line 434 of file BCHistogramBase.h.

void BCHistogramBase::SetDrawLegend ( bool  flag = true)
inline

Set drawing of legend.

Definition at line 469 of file BCHistogramBase.h.

void BCHistogramBase::SetDrawLocalMode ( bool  flag = true,
bool  arrows = true 
)
inline

Set drawing of global mode.

Definition at line 445 of file BCHistogramBase.h.

void BCHistogramBase::SetDrawMean ( bool  flag = true,
bool  stddev = true 
)
inline

Set drawing of mean.

Parameters
flagToggles mean drawing.
stddevToggles standard deviaton drawing. (Automatically suppressed if mean is suppressed.)

Definition at line 458 of file BCHistogramBase.h.

void BCHistogramBase::SetGlobalMode ( std::vector< double >  gm)
inline

Set global mode.

Definition at line 301 of file BCHistogramBase.h.

void BCHistogramBase::SetGlobalMode ( unsigned  i,
double  lm 
)
inline

Set global mode element.

Definition at line 311 of file BCHistogramBase.h.

void BCHistogramBase::SetGlobalModeMarkerStyle ( int  s)
inline

Set global mode marker style.

Parameters
sMarker style.

Definition at line 440 of file BCHistogramBase.h.

void BCHistogramBase::SetGridx ( bool  flag = true)
inline

Sets drawing of grid on x axis.

Definition at line 414 of file BCHistogramBase.h.

void BCHistogramBase::SetGridy ( bool  flag = true)
inline

Sets drawing of grid on y axis.

Definition at line 419 of file BCHistogramBase.h.

void BCHistogramBase::SetHistogram ( const TH1 *const  hist)
virtual

Sets the histogram.

Definition at line 194 of file BCHistogramBase.cxx.

void BCHistogramBase::SetInterval ( double  interval)
inline

Set intervals to one single value.

Definition at line 489 of file BCHistogramBase.h.

void BCHistogramBase::SetIntervals ( std::vector< double >  intervals)
inline

Set intervals to be drawn.

Definition at line 484 of file BCHistogramBase.h.

void BCHistogramBase::SetLineColor ( int  c)
inline

Set histogram line color.

Parameters
cColor for histogram line.

Definition at line 361 of file BCHistogramBase.h.

void BCHistogramBase::SetLineStyle ( int  s)
inline

Set histogram line style.

Parameters
sstyle for histogram line.

Definition at line 367 of file BCHistogramBase.h.

void BCHistogramBase::SetLineWidth ( int  w)
inline

Set histogram line width.

Parameters
wwidth for histogram line.

Definition at line 373 of file BCHistogramBase.h.

void BCHistogramBase::SetLocalMode ( std::vector< double >  lm)
inline

Set local mode.

Definition at line 316 of file BCHistogramBase.h.

void BCHistogramBase::SetLocalMode ( unsigned  i,
double  lm 
)
inline

Set local mode element.

Definition at line 326 of file BCHistogramBase.h.

void BCHistogramBase::SetLocalModeMarkerStyle ( int  s)
inline

Set Local mode marker style.

Parameters
sMarker style.

Definition at line 451 of file BCHistogramBase.h.

void BCHistogramBase::SetLogx ( bool  flag = true)
inline

Sets drawing of x axis in log.

Definition at line 399 of file BCHistogramBase.h.

void BCHistogramBase::SetLogy ( bool  flag = true)
inline

Sets drawing of y axis in log.

Definition at line 404 of file BCHistogramBase.h.

void BCHistogramBase::SetLogz ( bool  flag = true)
inline

Sets drawing of z axis in log.

Definition at line 409 of file BCHistogramBase.h.

void BCHistogramBase::SetMarkerColor ( int  c)
inline

Set marker color (used for mean, median, and mode).

Parameters
cColor for markers.

Definition at line 379 of file BCHistogramBase.h.

void BCHistogramBase::SetMarkerScale ( double  s)
inline

Set marker size scale.

Definition at line 384 of file BCHistogramBase.h.

void BCHistogramBase::SetMeanMarkerStyle ( int  s)
inline

Set mean marker style.

Parameters
sMarker style.

Definition at line 464 of file BCHistogramBase.h.

void BCHistogramBase::SetNBands ( unsigned  n)
inline

Sets number of credibility interval bands to draw.

Definition at line 424 of file BCHistogramBase.h.

void BCHistogramBase::SetNLegendColumns ( unsigned  n)
inline

Set number of columns in legend.

Definition at line 474 of file BCHistogramBase.h.

void BCHistogramBase::SetNSmooth ( unsigned  n)
inline

Sets number of times to smooth the histogram using ROOT's smoothing function.

Definition at line 429 of file BCHistogramBase.h.

void BCHistogramBase::SetROOToptions ( const std::string &  options)
inline

Set ROOT drawing options.

Definition at line 497 of file BCHistogramBase.h.

void BCHistogramBase::SetStats ( bool  flag = true)
inline

Set drawing of ROOT histogram stats box.

Definition at line 479 of file BCHistogramBase.h.

void BCHistogramBase::Smooth ( int  n = -1)

Applying ROOT smoothing to histogram, and renormalize.

Parameters
nNumber of times to smooth; fNSmooth, if n is negative.

Definition at line 291 of file BCHistogramBase.cxx.

void BCHistogramBase::UnsetGlobalMode ( )
inline

Unset global mode.

Definition at line 306 of file BCHistogramBase.h.

void BCHistogramBase::UnsetLocalMode ( )
inline

Unset local mode.

Definition at line 321 of file BCHistogramBase.h.

bool BCHistogramBase::Valid ( ) const
virtual

Whether histogram has been set and filled.

Returns
whether BC Histogram object is valid

Definition at line 226 of file BCHistogramBase.cxx.

Friends And Related Function Documentation

void swap ( BCHistogramBase first,
BCHistogramBase second 
)
friend

Swap function.

Definition at line 140 of file BCHistogramBase.cxx.

Member Data Documentation

std::vector<int> BCHistogramBase::fBandColors
protected

The colors of the color scheme.

Definition at line 636 of file BCHistogramBase.h.

short BCHistogramBase::fBandFillStyle
protected

The fill style for the bands.

Definition at line 644 of file BCHistogramBase.h.

bool BCHistogramBase::fBandOvercoverage
protected

flag for whether bands should overcover.

Definition at line 640 of file BCHistogramBase.h.

int BCHistogramBase::fDimension
protected

Dimension of histogram.

Definition at line 740 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawGlobalMode
protected

Flag for drawing global mode.

Definition at line 696 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawGlobalModeArrows
protected

Flag for drawing global mode arrows.

Definition at line 700 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawLegend
protected

Flag for drawing legend.

Definition at line 732 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawLocalMode
protected

Flag for drawing local mode.

Definition at line 708 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawLocalModeArrows
protected

Flag for drawing local mode arrows.

Definition at line 712 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawMean
protected

Flag for drawing mean.

Definition at line 720 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawStandardDeviation
protected

Flag for drawing standard deviation.

Definition at line 728 of file BCHistogramBase.h.

bool BCHistogramBase::fDrawStats
protected

Flag for drawing stats box.

Definition at line 736 of file BCHistogramBase.h.

std::vector<TLegendEntry*> BCHistogramBase::fExtraLegendEntries
protected

Storage for unused legend entries (for use with multicolumn legends).

Definition at line 756 of file BCHistogramBase.h.

int BCHistogramBase::fGlobalModeMarkerStyle
protected

Holds option for global-mode marker style.

Definition at line 704 of file BCHistogramBase.h.

bool BCHistogramBase::fGridx
protected

Flag for drawing of grid on x axis.

Definition at line 680 of file BCHistogramBase.h.

bool BCHistogramBase::fGridy
protected

Flag for drawing of grid on y axis.

Definition at line 684 of file BCHistogramBase.h.

std::vector<double> BCHistogramBase::fIntervals
protected

intervals to draw.

Definition at line 744 of file BCHistogramBase.h.

TLegend BCHistogramBase::fLegend
protected

Legend.

Definition at line 620 of file BCHistogramBase.h.

int BCHistogramBase::fLineColor
protected

histogram line color.

Definition at line 648 of file BCHistogramBase.h.

int BCHistogramBase::fLineStyle
protected

histogram line style.

Definition at line 652 of file BCHistogramBase.h.

int BCHistogramBase::fLineWidth
protected

histogram line width.

Definition at line 656 of file BCHistogramBase.h.

int BCHistogramBase::fLocalModeMarkerStyle
protected

Holds option for local-mode marker style.

Definition at line 716 of file BCHistogramBase.h.

bool BCHistogramBase::fLogx
protected

Flag for controlling log plotting of x axis.

Definition at line 668 of file BCHistogramBase.h.

bool BCHistogramBase::fLogy
protected

Flag for controlling log plotting of y axis.

Definition at line 672 of file BCHistogramBase.h.

bool BCHistogramBase::fLogz
protected

Flag for controlling log plotting of z axis.

Definition at line 676 of file BCHistogramBase.h.

int BCHistogramBase::fMarkerColor
protected

Marker color.

Definition at line 660 of file BCHistogramBase.h.

double BCHistogramBase::fMarkerScale
protected

Marker size scale.

Definition at line 664 of file BCHistogramBase.h.

int BCHistogramBase::fMeanMarkerStyle
protected

Holds option for mean marker style.

Definition at line 724 of file BCHistogramBase.h.

unsigned BCHistogramBase::fNBands
protected

Number of credibility interval bands to draw.

Definition at line 688 of file BCHistogramBase.h.

unsigned BCHistogramBase::fNLegendColumns
protected

number of columns to be set for legend.

Definition at line 624 of file BCHistogramBase.h.

unsigned BCHistogramBase::fNSmooth
protected

Number of times to smooth histogram using ROOT's smooth function.

Definition at line 692 of file BCHistogramBase.h.

std::vector<TObject*> BCHistogramBase::fROOTObjects
mutableprotected

Storage for plot objects.

Definition at line 752 of file BCHistogramBase.h.

std::string BCHistogramBase::fROOToptions
protected

ROOT drawing options.

Definition at line 748 of file BCHistogramBase.h.


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