GET library
GETAutoBaseline Class Reference

#include <GETAutoBaseline.hh>

Inheritance diagram for GETAutoBaseline:
GETSignalModifier GETProcess GETAutoBaselineHigh GETAutoBaselineLow

Public Member Functions

Constructors, affectation, destructor
 GETAutoBaseline (GETObject &obj, u_short num_lo=0, u_short num_hi=0, u_short off_lo=0, u_short off_hi=0)
 
 GETAutoBaseline (u_int n=0, double dt=0.01, u_short num_lo=0, u_short num_hi=0, u_short off_lo=0, u_short off_hi=0)
 
 GETAutoBaseline (const GETAutoBaseline &proc)
 
virtual ~GETAutoBaseline ()
 
Process parameters
virtual void SetBaselineLow (u_short num_lo, u_short off_lo=0)
 
virtual void SetBaselineHigh (u_short num_hi, u_short off_hi=0)
 
Signal processing
virtual GETSampleProcessSample (GETSample &sample, GETSample &result, GETChannel &channel)
 
ROOT related functions
 ClassDef (GETAutoBaseline, 0)
 
- Public Member Functions inherited from GETSignalModifier
 GETSignalModifier (GETObject &obj)
 
 GETSignalModifier (u_int n=0, double dt=0.01)
 
 GETSignalModifier (const GETSignalModifier &proc)
 
virtual ~GETSignalModifier ()
 
virtual GETSampleProcessSample (GETChannel &channel, u_short info)
 
 ClassDef (GETSignalModifier, 0)
 
- Public Member Functions inherited from GETProcess
 GETProcess (GETObject &obj)
 
 GETProcess (u_int n=0, double dt=0.01)
 
 GETProcess (const GETProcess &proc)
 
virtual ~GETProcess ()
 
virtual void SetOptions (u_int opts)
 
virtual void SetOption (u_int flags, bool b=true)
 
virtual u_int GetOptions ()
 
virtual bool GetOption (u_int flags)
 
virtual void Init (u_int n, double dt)
 
u_int GetDimension () const
 
double GetSamplingTime () const
 
GETSampleGetResultSamplePtr ()
 
const GETSampleGetResultSamplePtr () const
 
GETSampleGetResultSample ()
 
const GETSampleGetResultSample () const
 
 ClassDef (GETProcess, 0)
 

Protected Attributes

u_short bucket_num_hi
 Number of buckets in the high part of the sample.
 
u_short bucket_num_lo
 Number of buckets in the low part of the sample.
 
u_short bucket_off_hi
 Buckets offset from last bucket.
 
u_short bucket_off_lo
 Buckets offset from first bucket.
 
double x_hi
 Center of the high part.
 
double x_lo
 Center of the low part.
 
- Protected Attributes inherited from GETProcess
u_int options
 Option flags.
 
GETSample result_sample
 Internal processing result sample (processing result)
 

Private Member Functions

 GObject (GETAutoBaseline)
 

Detailed Description

This class defines an automatic base-line correction process.

The automatic baseline computes an average at the beginning of the sample and another average at the end of the sample, and use them to perform a linear subtraction to the signal.

Constructor & Destructor Documentation

GETAutoBaseline::GETAutoBaseline ( GETObject obj,
u_short  num_lo = 0,
u_short  num_hi = 0,
u_short  off_lo = 0,
u_short  off_hi = 0 
)

Constructor. The dimension of the first channel of the object is used for the process definition. The baseline sample is initialized to 0.

Parameters
obja core object of the GET system
num_lonumber of buckets in the low part of the sample
num_hinumber of buckets in the high part of the sample
off_lobuckets offset from first bucket
off_hibuckets offset from last bucket

References bucket_num_hi, bucket_num_lo, bucket_off_hi, bucket_off_lo, SetBaselineHigh(), and SetBaselineLow().

GETAutoBaseline::GETAutoBaseline ( u_int  n = 0,
double  dt = 0.01,
u_short  num_lo = 0,
u_short  num_hi = 0,
u_short  off_lo = 0,
u_short  off_hi = 0 
)

Constructor. The baseline sample is initialized to 0.

Parameters
nsampling size of the channels
dtsampling period (us)
num_lonumber of buckets in the low part of the sample
num_hinumber of buckets in the high part of the sample
off_lobuckets offset from first bucket
off_hibuckets offset from last bucket

References bucket_num_hi, bucket_num_lo, bucket_off_hi, bucket_off_lo, SetBaselineHigh(), and SetBaselineLow().

GETAutoBaseline::GETAutoBaseline ( const GETAutoBaseline proc)

Copy constructor.

Parameters
procobject to copy

References bucket_num_hi, bucket_num_lo, bucket_off_hi, and bucket_off_lo.

GETAutoBaseline::~GETAutoBaseline ( )
virtual

Destructor.

Member Function Documentation

GETAutoBaseline::ClassDef ( GETAutoBaseline  ,
 
)

for use within ROOT.

GETAutoBaseline::GObject ( GETAutoBaseline  )
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.
GETSample * GETAutoBaseline::ProcessSample ( GETSample sample,
GETSample result,
GETChannel channel 
)
virtual

This function process the input sample channel and stores the result in the result sample.

The function returns the (argument) result sample sample pointer. In case of error, the result is a NULL pointer.

Note
  • The sample to be processed and the result sample can be the same object, in which case the initial sample is replaced by the processing result.
  • The initial and result samples may be the same object, in which case the sample is replaced by the result.
Parameters
sampleinput sample to be processed
resultsample where result should be stored
channelGET system channel (no use in this class)

Implements GETSignalModifier.

Reimplemented in GETAutoBaselineHigh, and GETAutoBaselineLow.

References bucket_num_hi, bucket_num_lo, bucket_off_hi, bucket_off_lo, x_hi, and x_lo.

void GETAutoBaseline::SetBaselineHigh ( u_short  num_hi,
u_short  off_hi = 0 
)
virtual

Define the range for the high part of the sample to determine the baseline correction.

Parameters
num_hinumber of buckets in the high part of the sample
off_hibuckets offset from last bucket

References bucket_num_hi, bucket_off_hi, GETProcess::GetDimension(), and x_hi.

Referenced by GETAutoBaseline().

void GETAutoBaseline::SetBaselineLow ( u_short  num_lo,
u_short  off_lo = 0 
)
virtual

Define the range for the low part of the sample to determine the baseline correction.

Parameters
num_lonumber of buckets in the low part of the sample
off_lobuckets offset from first bucket

References bucket_num_lo, bucket_off_lo, GETProcess::GetDimension(), and x_lo.

Referenced by GETAutoBaseline().


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