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

#include <RExtremaFinder.hh>

Inheritance diagram for RExtremaFinder:

Public Member Functions

Constructors, destructors, affectation
 RExtremaFinder (u_int n=0, double *data=NULL, double bin=1.)
 
 RExtremaFinder (RRealSampleFFT *sptr)
 
 RExtremaFinder (RRealSampleFFT &s)
 
 RExtremaFinder (TH1 *hptr)
 
 RExtremaFinder (const RExtremaFinder &original)
 
 RExtremaFinder (const GExtremaFinder &original)
 
RExtremaFinderoperator= (const RExtremaFinder &original)
 
virtual ~RExtremaFinder ()
 
Initialisation and setting functions
virtual int InitData (u_int n, double *data, double bin=1.)
 
virtual int InitData (TH1 *hptr)
 
Access to data
const RRealSampleFFTGetSample () const
 
RRealSampleFFTGetSample ()
 
const RRealSampleFFTGetDerivativeSample () const
 
RRealSampleFFTGetDerivativeSample ()
 
ROOT related function
virtual TGraph * CreateExtremaGraph () const
 
virtual TGraph * CreateMaximaGraph () const
 
virtual TGraph * CreateAverageGraph (bool ampl=true) const
 
virtual TGraphAsymmErrors * CreateMaxZoneGraph (bool ampl=false) const
 
virtual TGraph * CreateMaxTriangleGraph () const
 
 ClassDef (RExtremaFinder, 0)
 

Private Member Functions

 GObject (RExtremaFinder)
 

Detailed Description

This class adds ROOT related functions to the base class GExtremaFinder.

Constructor & Destructor Documentation

RExtremaFinder::RExtremaFinder ( u_int  n = 0,
double *  data = NULL,
double  bin = 1. 
)

Base constructor. The data array is copied into an internal sample for the analysis.

Parameters
narray dimension (should be a power of 2)
datadata array
binbin size
RExtremaFinder::RExtremaFinder ( RRealSampleFFT sptr)

Constructor from a RRealSampleFFT pointer. The RRealSampleFFT object is adopted (deleted with the GExtremaFinder object).

Parameters
sptrpointer to the sample

References InitData().

RExtremaFinder::RExtremaFinder ( RRealSampleFFT s)

Constructor from a RRealSampleFFT object. The RRealSampleFFT object is external.

Parameters
ssample object

References InitData().

RExtremaFinder::RExtremaFinder ( TH1 *  hptr)

Constructor from a 1D histogram pointer. An internal sample (local) is created from the histogram.

Parameters
hptrpointer to the histogram

References InitData().

RExtremaFinder::RExtremaFinder ( const RExtremaFinder original)

Copy constructor.

Parameters
originalobject to be copied
RExtremaFinder::RExtremaFinder ( const GExtremaFinder &  original)

Copy constructor.

Parameters
originalobject to be copied
RExtremaFinder::~RExtremaFinder ( )
virtual

Destructor: cleans-up the data.

Member Function Documentation

RExtremaFinder::GObject ( RExtremaFinder  )
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.
RExtremaFinder & RExtremaFinder::operator= ( const RExtremaFinder original)

Affectation operator.

Parameters
originalobject to be copied
int RExtremaFinder::InitData ( u_int  n,
double *  data,
double  dt = 1. 
)
virtual

This function is redefined from the base class so that the created sample is a GRealSampleFFT instead of a GRealSampleFFT.

Parameters
nrequested size of arrays
datadata array
dtsampling time step

Referenced by InitData(), and RExtremaFinder().

int RExtremaFinder::InitData ( TH1 *  hptr)
virtual

This function is redefined from the base class to initialize data from an histogram.

Parameters
hptrpointer to the histogram

References InitData().

const RRealSampleFFT * RExtremaFinder::GetSample ( ) const
inline

Return the sample.

RRealSampleFFT * RExtremaFinder::GetSample ( )
inline

Return the sample.

const RRealSampleFFT * RExtremaFinder::GetDerivativeSample ( ) const
inline

Return the derivative sample.

RRealSampleFFT * RExtremaFinder::GetDerivativeSample ( )
inline

Return the derivative sample.

TGraph * RExtremaFinder::CreateExtremaGraph ( ) const
virtual

Create a graph from minima and maxima.

TGraph * RExtremaFinder::CreateMaximaGraph ( ) const
virtual

Create a graph from maxima.

TGraph * RExtremaFinder::CreateAverageGraph ( bool  ampl = true) const
virtual

Create a graph with points located at average position of maxima zones. The vertical axis is either the average or the integral amplitude of signal over the maxima zones.

Parameters
ampltrue for integral signal amplitude, false for average signal
TGraphAsymmErrors * RExtremaFinder::CreateMaxZoneGraph ( bool  ampl = false) const
virtual

Create a graph with points located at average position of maxima zones, with horizontal errors correspondig to the zone size. The vertical axis is either the average or the integral amplitude of signal over the maxima zones.

Parameters
ampltrue for integral signal amplitude, false for average signal
TGraph * RExtremaFinder::CreateMaxTriangleGraph ( ) const
virtual

Create a graph with triangles with a surface conserving the maxima signal: the summit is 2x the average signal for the maxima zones and the base is the zone limits at a value 0.

RExtremaFinder::ClassDef ( RExtremaFinder  ,
 
)

for use within ROOT.


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