GET library
GETFilter Class Reference

#include <GETFilter.hh>

Inheritance diagram for GETFilter:
GETProcess GETFilterCut GETFilterRef GETFilterShift GETFilterSmooth GETFilterHigh GETFilterLow GETFilterLow2 GETFilterAget GETFilterAgetGaus GETFilterGaus GETFilterLowN

Public Member Functions

Constructors, affectation, destructor
 GETFilter (GETObject &obj)
 
 GETFilter (u_int n=0, double dt=0.01)
 
 GETFilter (const GETFilter &proc)
 
 GETFilter (GETFilter &f1, GETFilter &f2)
 
virtual ~GETFilter ()
 
Initialization functions
virtual void Reset ()
 
virtual void Init (u_int n, double dt)
 
virtual void SetNormalized (bool b=true)
 
virtual void Normalize (double norm=1.)
 
virtual void Scale (double fact=1.)
 
Access to class data
const GETSampleGetFilterPtr () const
 
GETSampleGetFilterPtr ()
 
const GETSampleGetFilter () const
 
GETSampleGetFilter ()
 
Signal processing
virtual GETSampleProcessSample (GETChannel &channel, u_short info=GET::signalOut)
 
virtual GETSampleProcessSample (GETSample &sample, GETSample &result, GETChannel &channel)
 
ROOT related functions
 ClassDef (GETFilter, 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)
 
u_int GetDimension () const
 
double GetSamplingTime () const
 
GETSampleGetResultSamplePtr ()
 
const GETSampleGetResultSamplePtr () const
 
GETSampleGetResultSample ()
 
const GETSampleGetResultSample () const
 
 ClassDef (GETProcess, 0)
 

Protected Attributes

GETSample filter_fct
 Filter function for an AGET channel.
 
- Protected Attributes inherited from GETProcess
u_int options
 Option flags.
 
GETSample result_sample
 Internal processing result sample (processing result)
 

Private Member Functions

 GObject (GETFilter)
 

Detailed Description

This class defines the filter function for the GET signal processing.

Constructor & Destructor Documentation

GETFilter::GETFilter ( GETObject obj)

Constructor: the dimension of the first channel of the object is used for the process definition. At initialization, the default filter is set to the full band filter.

Parameters
obja core object of the GET system

References GETObject::GetSampleDim(), GETObject::GetTimeStep(), and Init().

GETFilter::GETFilter ( u_int  n = 0,
double  dt = 0.01 
)

Constructor. At initialization, the default filter is set to the full band filter.

Parameters
nsampling size of the channels
dtsampling period (us)

References Init().

GETFilter::GETFilter ( const GETFilter proc)

Copy constructor.

Parameters
procobject to copy

References filter_fct, and GetFilter().

GETFilter::GETFilter ( GETFilter f1,
GETFilter f2 
)

Constructor from composition of 2 filters.

Parameters
f1first filter
f2second filter

References filter_fct, GETProcess::GetDimension(), GetFilter(), GETProcess::GetSamplingTime(), and Init().

GETFilter::~GETFilter ( )
virtual

Destructor.

Member Function Documentation

GETFilter::ClassDef ( GETFilter  ,
 
)

for use within ROOT.

GETSample & GETFilter::GetFilter ( )
inline

Return the filter function sample (by reference).

References filter_fct.

GETSample * GETFilter::GetFilterPtr ( )
inline

Return the pointer to the filter function sample.

References filter_fct.

GETFilter::GObject ( GETFilter  )
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.
void GETFilter::Normalize ( double  norm = 1.)
virtual

Normalize the filter so that it conserves the signal integral when it is applied (if normalization factor is 1). In Fourier space, this corresponds to the FFT value at null frequency.

Parameters
normnormalization value

References filter_fct.

Referenced by GETFilterSmooth::UpdateFilter().

GETSample * GETFilter::ProcessSample ( GETChannel channel,
u_short  info = GET::signalOut 
)
virtual

This function process the argument channel output sample and stores the result in the internal sample. The info argument is ignored since filters apply only on output sample for signal reconstruction. The function returns the internal result sample pointer. In case of error, the result is a NULL pointer.

For the base filter class, the processing is the convolution with the filter sample data.

Parameters
channelGET system channel to be processed
infoadditional optional information (sample signal identifier)

Implements GETProcess.

References GETChannel::OutSample(), and GETProcess::result_sample.

Referenced by GETChannel::ProcessRecFromOut().

GETSample * GETFilter::ProcessSample ( GETSample sample,
GETSample result,
GETChannel channel 
)
virtual

This function process the input sample channel and stores the result in the result sample. The channel argument is provided if processing (from derived classes) may be affected by GET core objects properties. The function returns the (argument) result sample sample pointer. In case of error, the result is a NULL pointer.

For the base filter class, the processing is the convolution with the filter sample data (the channel argument is useless here).

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 (the samples should correspond to this channel)

Implements GETProcess.

References filter_fct.

void GETFilter::Reset ( )
virtual

Function resetting the filter function.

References filter_fct, and GETProcess::result_sample.

void GETFilter::Scale ( double  fact = 1.)
inlinevirtual

Scale the filter (amplitude).

Parameters
factscaling factor

References filter_fct.

Referenced by GETCreateCFDFilter().

void GETFilter::SetNormalized ( bool  b = true)
inlinevirtual

Set the option whether the filter should be normalized when it is computed, after parameters changes. Note that external changes to the filter sample may not conserve the normalization.

Parameters
boption ON /OFF

References GET::filterNormalize, and GETProcess::SetOption().


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