JG ROOT Tools libraries  version 5.0 - august 2014
RGHistoLimits Class Reference

#include <RGHistoLimits.hh>

Inheritance diagram for RGHistoLimits:
RGHistoWindow RGFitBase1D RGFitBase2D RGHistoTools RGFitDecay RGFitPeak RGFitGaus2D RGuiFitDecay RGuiFitPeak RGuiFitGaus2D

Public Member Functions

 RGHistoLimits (TH1 *hptr=NULL)
 
 RGHistoLimits (const RGHistoLimits &original)
 
RGHistoLimitsoperator= (const RGHistoLimits &original)
 
virtual void Affect (const RGHistoLimits &original)
 
virtual ~RGHistoLimits ()
 
virtual void Reset ()
 
virtual Int_t SetHisto (TH1 *hptr=NULL, const bool reset=true)
 
virtual bool IsDataSet () const
 
virtual bool SetXLog (const Bool_t b=kTRUE)
 
virtual bool SetYLog (const Bool_t b=kTRUE)
 
virtual bool SetZLog (const Bool_t b=kTRUE)
 
virtual void SetXFull ()
 
virtual void SetYFull ()
 
virtual void SetZFull ()
 
virtual void Unzoom ()
 
 ClassDef (RGHistoLimits, 0)
 

Protected Member Functions

virtual void Set1DHisto (const TH1 *hptr)
 
virtual void Set2DHisto (const TH1 *hptr)
 
virtual void Set3DHisto (const TH1 *hptr)
 

Protected Attributes

Int_t dimension
 Histogram dimension.
 
Double_t lim_x_min
 Axis lower limit.
 
Double_t lim_x_max
 Axis upper limit.
 
Double_t lim_y_min
 Axis lower limit.
 
Double_t lim_y_max
 Axis upper limit.
 
Double_t lim_z_min
 Axis lower limit.
 
Double_t lim_z_max
 Axis upper limit.
 
Double_t log_x_min
 Lower limit for log scale.
 
Double_t log_y_min
 Lower limit for log scale.
 
Double_t log_z_min
 Lower limit for log scale.
 
bool allow_x_log
 Test if log scale allowed.
 
bool allow_y_log
 Test if log scale allowed.
 
bool allow_z_log
 Test if log scale allowed.
 
Double_t x_min
 Current display lower bound.
 
Double_t x_max
 Current display upper bound.
 
Double_t y_min
 Current display lower bound.
 
Double_t y_max
 Current display upper bound.
 
Double_t z_min
 Current display lower bound.
 
Double_t z_max
 Current display upper bound.
 
bool x_log
 Log scale status.
 
bool y_log
 Log scale status.
 
bool z_log
 Log scale status.
 

Private Member Functions

 GObject (RGHistoLimits)
 

Detailed Description

class RGHistoLimits

This class defines axis information for histogram display.

Constructor & Destructor Documentation

RGHistoLimits::RGHistoLimits ( TH1 *  hptr = NULL)

Constructor.

Parameters
hptrhistogram pointer

References Reset(), and SetHisto().

RGHistoLimits::RGHistoLimits ( const RGHistoLimits original)

Copy constructor.

Parameters
originalobject to copy

References Affect().

RGHistoLimits::~RGHistoLimits ( )
virtual

Destructor.

Member Function Documentation

RGHistoLimits::GObject ( RGHistoLimits  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
RGHistoLimits & RGHistoLimits::operator= ( const RGHistoLimits original)

Affectation operator.

Parameters
originalinstance to copy

References Affect().

void RGHistoLimits::Affect ( const RGHistoLimits original)
virtual

Affectation function of an instance.

Parameters
originalinstance to copy

References allow_x_log, allow_y_log, allow_z_log, dimension, lim_x_max, lim_x_min, lim_y_max, lim_y_min, lim_z_max, lim_z_min, log_x_min, log_y_min, log_z_min, x_log, x_max, x_min, y_log, y_max, y_min, z_log, z_max, and z_min.

Referenced by operator=(), and RGHistoLimits().

void RGHistoLimits::Reset ( )
virtual
Int_t RGHistoLimits::SetHisto ( TH1 *  hptr = NULL,
const bool  reset = true 
)
virtual

Update information from histogram pointer. The function returns 0 if no error occured (null pointer or bad dimension). In case of problem, all class data are initialized if argument reset is true.

Parameters
hptrhistogram pointer to set display limits
resetinitialize in case of problem

Reimplemented in RGHistoWindow.

References lim_x_max, lim_x_min, lim_y_max, lim_y_min, lim_z_max, lim_z_min, log_x_min, log_y_min, log_z_min, Reset(), Set1DHisto(), Set2DHisto(), and Set3DHisto().

Referenced by RGHistoLimits(), and RGHistoWindow::SetHisto().

bool RGHistoLimits::IsDataSet ( ) const
inlinevirtual

Return true if data are defined.

References dimension.

Referenced by SetXFull(), SetXLog(), SetYFull(), SetYLog(), SetZFull(), and SetZLog().

void RGHistoLimits::Set1DHisto ( const TH1 *  hptr)
protectedvirtual

Update data from a 1D histogram (called by SetHisto function).

Parameters
hptrhistogram pointer to set display limits

References allow_x_log, allow_y_log, allow_z_log, dimension, lim_x_max, lim_x_min, lim_y_max, lim_y_min, lim_z_max, lim_z_min, log_x_min, log_y_min, log_z_min, x_max, x_min, y_max, and y_min.

Referenced by SetHisto().

void RGHistoLimits::Set2DHisto ( const TH1 *  hptr)
protectedvirtual

Update data from a 2D histogram (called by SetHisto function).

Parameters
hptrhistogram pointer to set display limits

References allow_x_log, allow_y_log, allow_z_log, dimension, lim_x_max, lim_x_min, lim_y_max, lim_y_min, lim_z_max, lim_z_min, log_x_min, log_y_min, log_z_min, x_max, x_min, y_max, y_min, z_max, and z_min.

Referenced by SetHisto().

void RGHistoLimits::Set3DHisto ( const TH1 *  hptr)
protectedvirtual

Update data from a 3D histogram (called by SetHisto function).

Parameters
hptrhistogram pointer to set display limits

References allow_x_log, allow_y_log, allow_z_log, dimension, lim_x_max, lim_x_min, lim_y_max, lim_y_min, lim_z_max, lim_z_min, log_x_min, log_y_min, log_z_min, x_max, x_min, y_max, y_min, z_max, and z_min.

Referenced by SetHisto().

bool RGHistoLimits::SetXLog ( const Bool_t  b = kTRUE)
virtual

Set log-scale mode for the axis. The function returns true if a change has been done.

Parameters
blog scale status

Reimplemented in RGHistoWindow.

References allow_x_log, IsDataSet(), lim_x_max, lim_x_min, log_x_min, x_log, x_max, and x_min.

bool RGHistoLimits::SetYLog ( const Bool_t  b = kTRUE)
virtual

Set log-scale mode for the axis. The function returns true if a change has been done.

Parameters
blog scale status

Reimplemented in RGHistoWindow.

References allow_y_log, IsDataSet(), lim_y_max, lim_y_min, log_y_min, y_log, y_max, and y_min.

bool RGHistoLimits::SetZLog ( const Bool_t  b = kTRUE)
virtual

Set log-scale mode for the axis. The function returns true if a change has been done.

Parameters
blog scale status

Reimplemented in RGHistoWindow.

References allow_z_log, IsDataSet(), lim_z_max, lim_z_min, log_z_min, z_log, z_max, and z_min.

void RGHistoLimits::SetXFull ( )
virtual

Set X axis full scale.

Reimplemented in RGHistoWindow.

References IsDataSet(), lim_x_max, lim_x_min, log_x_min, x_log, x_max, and x_min.

Referenced by Unzoom().

void RGHistoLimits::SetYFull ( )
virtual

Set Y axis full scale.

Reimplemented in RGHistoWindow.

References dimension, IsDataSet(), lim_y_max, lim_y_min, log_y_min, y_log, y_max, and y_min.

Referenced by Unzoom().

void RGHistoLimits::SetZFull ( )
virtual

Set Z axis full scale.

Reimplemented in RGHistoWindow.

References IsDataSet(), z_max, and z_min.

Referenced by Unzoom().

void RGHistoLimits::Unzoom ( )
inlinevirtual

Set all axis limits to maximum values.

References SetXFull(), SetYFull(), and SetZFull().

RGHistoLimits::ClassDef ( RGHistoLimits  ,
 
)

For ROOT dictionary.


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