GET library
GETObject Class Referenceabstract

#include <GETObject.hh>

Inheritance diagram for GETObject:
GETAGet GETAsAd GETChannel GETCoBo GETSystem GETActarTpc GETRCoBo GETActarDem GETActarEventReader

Public Member Functions

Constructors, affectation, destructor
 GETObject ()
 
virtual ~GETObject ()
 
GET system core objects functions
int GetId () const
 
virtual string GetObjectId () const =0
 
virtual string GetFullId () const
 
virtual u_int GetSignalChannelCount () const
 
virtual u_int GetTotalChannelCount () const
 
virtual u_int GetChannelCount () const
 
virtual GETChannelGetSignalChannel (u_int n)
 
virtual GETChannelGetTotalChannel (u_int n)
 
virtual GETChannelGetChannel (u_int n)
 
const GETObjectGetParent () const
 
GETObjectGetParent ()
 
virtual void SetTimeStep (double dt)
 
u_int GetSampleDim ()
 
double GetTimeStep ()
 
virtual u_int GetChildrenNumber () const =0
 
virtual const GETObjectGetChild (u_int i) const =0
 
virtual GETObjectGetChild (u_int i)=0
 
virtual u_int GetReadoutMultiplicity (bool fpn=true) const
 
virtual double GetSignalSum (u_short info=GET::signalOut)
 
Initialization and signal related functions
virtual void InitLocalData (u_int n, double dt)
 
virtual void ValidDataSet ()
 
virtual void ValidSimulSet ()
 
Common processing data: response function, filter, noise
virtual void SetResponse (GETResponse *ptr, bool recur=true, bool fpn=false)
 
virtual void SetResponse (GETResponse &obj, bool recur=true, bool fpn=false)
 
virtual void SetFilter (GETFilter *ptr, bool recur=true, bool fpn=false)
 
virtual void SetFilter (GETFilter &obj, bool recur=true, bool fpn=false)
 
virtual void SetNoiseIn (GETSignalModifier *ptr, bool recur=true, bool fpn=false)
 
virtual void SetNoiseIn (GETSignalModifier &obj, bool recur=true, bool fpn=false)
 
virtual void SetNoiseOut (GETSignalModifier *ptr, bool recur=true, bool fpn=false)
 
virtual void SetNoiseOut (GETSignalModifier &obj, bool recur=true, bool fpn=false)
 
virtual void SetOutputCorrection (GETProcess *ptr, bool recur=true, bool fpn=false)
 
virtual void SetOutputCorrection (GETProcess &obj, bool recur=true, bool fpn=false)
 
virtual void RemoveOutputCorrection ()
 
virtual void SetOutputCorrectionList (bool warn=true)
 
virtual void AddOutputCorrection (GETProcess *ptr, bool recur=true, bool fpn=false)
 
virtual void AddOutputCorrection (GETProcess &obj, bool recur=true, bool fpn=false)
 
GETResponseGetResponse (bool force=true)
 
GETFilterGetFilter (bool force=true)
 
GETSignalModifierGetNoiseIn (bool force=true)
 
GETSignalModifierGetNoiseOut (bool force=true)
 
GETProcessGetOutputCorrection (bool force=true)
 
Samples processing
virtual int ProcessData (bool in_noise=true)
 
virtual int ProcessOutFromTst (bool in_noise=true, bool out_noise=true)
 
virtual int ProcessRecFromOut (bool out_corr=true)
 
virtual int ProcessOutputCorrection ()
 
ROOT related functions
 ClassDef (GETObject, 0)
 

Protected Attributes

GETProcessLink filter
 Signal processing filter.
 
int id
 Object identifier number (set by the parent, in filiation)
 
GETProcessLink noise_in
 Simulation input noise generator.
 
GETProcessLink noise_out
 Simulation output noise generator.
 
GETProcessLink output_corr
 Output signal correction before reconstruction of input.
 
GETObjectparent
 Parent AGet chip.
 
GETProcessLink response
 Signal response function.
 

Private Member Functions

 GObjectV (GETObject)
 

Detailed Description

This class defines base properties for GET system core objects. The GET objects, at any level, define the signal processing information, based on 4 GETProcessingData objects:

  • the response function
  • the filter for reconstruction of the input signal
  • an noise process to a apply on input signal
  • an noise process to a apply on output signal

The use of GETProcessingData objects allow to define these processes (if needed) either locally, either externally for sharing the same process for several GET objects (see GETProcessingData).

Constructor & Destructor Documentation

GETObject::GETObject ( )

Base constructor.

References parent.

GETObject::~GETObject ( )
virtual

Destructor.

Member Function Documentation

void GETObject::AddOutputCorrection ( GETProcess ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the output correction process locally for the object (pointer is adopted). The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrnoise generator pointer
recurrecursivelly set noise generator to sub-objects
fpnadd process also to FPN channels

References AddOutputCorrection(), GETProcessSerie::AddProcess(), GetChild(), GetChildrenNumber(), GetFullId(), GetOutputCorrection(), and SetOutputCorrectionList().

Referenced by AddOutputCorrection(), GETSystem::SetAutoBaseline(), GETSystem::SetAutoBaselineHigh(), GETSystem::SetAutoBaselineLow(), GETSystem::SetBaselineCorrection(), GETSystem::SetCalibProcess(), and GETSystem::SetOutputSmoothing().

void GETObject::AddOutputCorrection ( GETProcess obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the output correction process externally for the object. The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objnoise generator object
recurrecursivelly set noise generator to sub-objects
fpnadd process also to FPN channels

References AddOutputCorrection(), GETProcessSerie::AddProcess(), GetChild(), GetChildrenNumber(), GetFullId(), GetOutputCorrection(), and SetOutputCorrectionList().

GETObject::ClassDef ( GETObject  ,
 
)

for use within ROOT.

GETChannel * GETObject::GetChannel ( u_int  n)
inlinevirtual

Return a channel (signal or FPN) from the object (see GetTotalChannel function). The function loops on children until the one corresponding to the requested channel number. The function returns NULL if the channel does not exist.

Parameters
nchannel number

Reimplemented in GETSystem.

References GetTotalChannel().

Referenced by GetSampleDim(), and GetTimeStep().

u_int GETObject::GetChannelCount ( ) const
inlinevirtual

Return the total number of (signal and FPN) channels under the object (see GetTotalChannelCount function).

Reimplemented in GETSystem, and GETChannel.

References GetTotalChannelCount().

virtual GETObject* GETObject::GetChild ( u_int  i)
pure virtual

Return the pointer of a child objects.

Implemented in GETSystem, GETChannel, GETAGet, GETAsAd, and GETCoBo.

GETFilter * GETObject::GetFilter ( bool  force = true)

Return the filter associated to the object. If no process is defined for the object, the argument force indicates whether to look for a process in the parent object hierarchy.

Parameters
forcesearch for process in ascendant objects

References filter, GetFilter(), GETProcessLink::GetProcess(), and parent.

Referenced by GetFilter(), and GETChannel::ProcessRecFromOut().

int GETObject::GetId ( ) const
inline

Return the object identifier in parent children (-1 if undefined).

Referenced by GETChannel::IsFPNChannel(), GETSystem::OutputCorrectFPN(), and GETRCoBo::ReadEvent().

GETSignalModifier * GETObject::GetNoiseIn ( bool  force = true)

Return the input noise generator associated to the object. If no process is defined for the object, the argument force indicates whether to look for a process in the parent object hierarchy.

Parameters
forcesearch for process in ascendant objects

References GetNoiseIn(), GETProcessLink::GetProcess(), noise_in, and parent.

Referenced by GetNoiseIn(), and GETChannel::ProcessOutFromTst().

GETSignalModifier * GETObject::GetNoiseOut ( bool  force = true)

Return the output noise generator associated to the object. If no process is defined for the object, the argument force indicates whether to look for a process in the parent object hierarchy.

Parameters
forcesearch for process in ascendant objects

References GetNoiseOut(), GETProcessLink::GetProcess(), noise_out, and parent.

Referenced by GETChannel::ApplyOutputNoise(), GetNoiseOut(), and GETChannel::ProcessOutFromTst().

virtual string GETObject::GetObjectId ( ) const
pure virtual

Return the object string identifier.

Implemented in GETSystem, GETChannel, GETAGet, GETAsAd, and GETCoBo.

Referenced by GetFullId().

GETProcess * GETObject::GetOutputCorrection ( bool  force = true)

Return the output correction process associated to the object. If no process is defined for the object, the argument force indicates whether to look for a process in the parent object hierarchy.

Parameters
forcesearch for process in ascendant objects

References GetOutputCorrection(), GETProcessLink::GetProcess(), output_corr, and parent.

Referenced by AddOutputCorrection(), GETChannel::ApplyOutputCorrection(), GetOutputCorrection(), RemoveOutputCorrection(), GETSystem::SetAutoBaseline(), GETSystem::SetAutoBaselineHigh(), GETSystem::SetAutoBaselineLow(), GETSystem::SetBaselineCorrection(), GETSystem::SetCalibProcess(), SetOutputCorrectionList(), and GETSystem::SetOutputSmoothing().

const GETObject * GETObject::GetParent ( ) const
inline

Return the pointer to parent object.

References parent.

GETObject * GETObject::GetParent ( )
inline

Return the pointer to parent object.

References parent.

u_int GETObject::GetReadoutMultiplicity ( bool  fpn = true) const
virtual

Return the number of read channels: this gives the readout multiplicity.

Parameters
fpnindicates if the FPN channels should be counted

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and GetReadoutMultiplicity().

Referenced by GETActarEventReader::AnalysisEvent(), and GetReadoutMultiplicity().

GETResponse * GETObject::GetResponse ( bool  force = true)

Return the response function associated to the object. If no process is defined for the object, the argument force indicates whether to look for a process in the parent object hierarchy.

Parameters
forcesearch for process in ascendant objects

References GETProcessLink::GetProcess(), GetResponse(), parent, and response.

Referenced by GetResponse(), GETChannel::ProcessOutFromTst(), and GETChannel::ProcessRecFromOut().

GETChannel * GETObject::GetSignalChannel ( u_int  n)
virtual

Return a (signal) channel from the object. The FPN channels are not included. The function loops on children until the one corresponding to the requested channel number. Only signal channels are taken into account for counting (not FPN). The function returns NULL if the channel does not exist.

Parameters
nchannel number

Reimplemented in GETAGet.

References GetChild(), GetChildrenNumber(), GetSignalChannel(), GetSignalChannelCount(), and GETChannel::IsFPNChannel().

Referenced by GetSignalChannel(), GETSystem::OutputCorrectFPN(), and GETRCoBo::ReadEvent().

double GETObject::GetSignalSum ( u_short  info = GET::signalOut)
virtual

Return the sum of the signal channels (FPN are not included.

Parameters
infosamples used for signal summing: GET::signalOut (default) GET::signalTst or GET::signalRec

Reimplemented in GETChannel, and GETAGet.

References GetChild(), GetChildrenNumber(), and GetSignalSum().

Referenced by GetSignalSum().

GETChannel * GETObject::GetTotalChannel ( u_int  n)
virtual

Return a channel (signal or FPN) from the object. The function loops on children until the one corresponding to the requested channel number. Only signal channels are taken into account for counting (not FPN). The function returns NULL if the channel does not exist.

Parameters
nchannel number

Reimplemented in GETAGet.

Examples:
Demonstrator_Noise.C.

References GetChild(), GetChildrenNumber(), GetTotalChannel(), and GetTotalChannelCount().

Referenced by GETSystemAnalyser::CreateFullEventHisto(), GetChannel(), GetTotalChannel(), GETSystem::Init(), GETSystem::IsChannelSaturated(), GETLookupTable::SetDefaultTable(), and GETLookupTable::SetHVpad64Table().

GETObject::GObjectV ( GETObject  )
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 GETObject::InitLocalData ( u_int  n,
double  dt 
)
virtual

Function initializing associated data with sample dimensions, if they are defined locally:

  • the signal response function
  • the processing filter

References filter, GETProcessLink::InitProcess(), GETProcessLink::IsDefined(), GETProcessLink::IsLocal(), noise_in, noise_out, output_corr, and response.

Referenced by GETCoBo::Init(), GETAsAd::Init(), GETAGet::Init(), GETChannel::Init(), and GETSystem::Init().

int GETObject::ProcessData ( bool  in_noise = true)
virtual

Compute all samples for the channels of the object: for simulated inputs (test channel input sample), the output is computed from response function (see ProcessOutFromTst function), and for simulated or experimental data, the reconstructed signal sample is computed (see ProcessRecFromOut function). The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
in_noiseindicate whether the input sample is modified by the input noise process (in such case, the function should not be called several times for the same channel - for the same event - since the noise would be added several times)

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ProcessData().

Referenced by ProcessData().

int GETObject::ProcessOutFromTst ( bool  in_noise = true,
bool  out_noise = true 
)
virtual

Function that computes the output signal sample from the test (simulation) input for all channels of the object. If a channel defines an input and/or an output noise generator, the corresponding noise is included in the processing. The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
in_noiseindicate whether the input sample is modified by the input noise process (in such case, the function should not be called several times for the same channel - for the same event - since the noise would be added several times)
out_noiseindicate whether the output noise should be applied (this is defined to allow to separately apply the output noise in processes decomposition)

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ProcessOutFromTst().

Referenced by ProcessOutFromTst().

int GETObject::ProcessOutputCorrection ( )
virtual

Function that applies the ouput correction to all GET objects recursively.

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ProcessOutputCorrection().

Referenced by ProcessOutputCorrection(), and GETSystem::ReadEvent().

int GETObject::ProcessRecFromOut ( bool  out_corr = true)
virtual

Function that computes the reconstructed signal sample from the output (AGet response) for all channels of the object. If a channel defines processing filter, the output is filtered before the deconvolution of the channel output with AGet response function. The function returns a non-0 value if an error occured (if the required signals are not defined).

Parameters
out_corrwhether the output correction should apply (if it has not been applied yet)

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ProcessRecFromOut().

Referenced by ProcessRecFromOut(), GETRCoBo::ReadEvent(), and GETSystem::ReadEvent().

void GETObject::RemoveOutputCorrection ( )
virtual

Remove the output correction processes for the object and all its children. This function may be used when modifying the correction from one run to another.

References GetChild(), GetChildrenNumber(), GetOutputCorrection(), output_corr, RemoveOutputCorrection(), and GETProcessLink::RemoveProcess().

Referenced by GETActarEventReader::ReadRunConfig(), and RemoveOutputCorrection().

void GETObject::SetFilter ( GETFilter ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common filter locally for the object (pointer is adopted). The filter is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrfilter pointer
recurrecursivelly set filter to sub-objects
fpnset filter also to FPN channels

Reimplemented in GETAGet.

Examples:
TestChannel.C.

References filter, GetChild(), GetChildrenNumber(), SetFilter(), and GETProcessLink::SetLocalProcess().

Referenced by SetFilter().

void GETObject::SetFilter ( GETFilter obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common filter externally for the object. The filter is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objfilter object
recurrecursivelly set filter to sub-objects
fpnset filter also to FPN channels

Reimplemented in GETAGet.

References filter, GetChild(), GetChildrenNumber(), GETProcessLink::SetExternalProcess(), and SetFilter().

void GETObject::SetNoiseIn ( GETSignalModifier ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common noise generator locally for the object (pointer is adopted). The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrnoise generator pointer
recurrecursivelly set noise generator to sub-objects
fpnset noise generator also to FPN channels

Reimplemented in GETAGet.

References GetChild(), GetChildrenNumber(), noise_in, GETProcessLink::SetLocalProcess(), and SetNoiseIn().

Referenced by SetNoiseIn().

void GETObject::SetNoiseIn ( GETSignalModifier obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common noise generator externally for the object. The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objnoise generator object
recurrecursivelly set noise generator to sub-objects
fpnset noise generator also to FPN channels

Reimplemented in GETAGet.

References GetChild(), GetChildrenNumber(), noise_in, GETProcessLink::SetExternalProcess(), and SetNoiseIn().

void GETObject::SetNoiseOut ( GETSignalModifier ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common noise generator locally for the object (pointer is adopted). The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrnoise generator pointer
recurrecursivelly set noise generator to sub-objects
fpnset noise generator also to FPN channels

Reimplemented in GETAGet.

Examples:
TestChannel.C.

References GetChild(), GetChildrenNumber(), noise_out, GETProcessLink::SetLocalProcess(), and SetNoiseOut().

Referenced by SetNoiseOut().

void GETObject::SetNoiseOut ( GETSignalModifier obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common noise generator externally for the object. The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objnoise generator object
recurrecursivelly set noise generator to sub-objects
fpnset noise generator also to FPN channels

Reimplemented in GETAGet.

References GetChild(), GetChildrenNumber(), noise_out, GETProcessLink::SetExternalProcess(), and SetNoiseOut().

void GETObject::SetOutputCorrection ( GETProcess ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the output correction process locally for the object (pointer is adopted). The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrnoise generator pointer
recurrecursivelly set noise generator to sub-objects
fpnset output correction also to FPN channels

References GetChild(), GetChildrenNumber(), output_corr, GETProcessLink::SetLocalProcess(), and SetOutputCorrection().

Referenced by SetOutputCorrection().

void GETObject::SetOutputCorrection ( GETProcess obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the output correction process externally for the object. The process is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objnoise generator object
recurrecursivelly set noise generator to sub-objects
fpnset output correction also to FPN channels

References GetChild(), GetChildrenNumber(), output_corr, GETProcessLink::SetExternalProcess(), and SetOutputCorrection().

void GETObject::SetOutputCorrectionList ( bool  warn = true)
virtual

Define the ouptut correction for the object as a list of processes.

The output correction processes of all children is automatically set also as a list of processes. The list itself, as a process, is created locally for the object and all the children.

Nevertheless, when addind a process to the list (with the AddOutputCorrection functions), the added process can be defined locally or externally.

If a process was already set for the object, it is replaced by the new list, and the previous process is removed (deleted if defined locally).

Parameters
warnissue a warning if a process was already defined

References GetChild(), GetChildrenNumber(), GetFullId(), GetOutputCorrection(), GetSampleDim(), GetTimeStep(), output_corr, GETProcessLink::SetLocalProcess(), and SetOutputCorrectionList().

Referenced by AddOutputCorrection(), GETSystem::SetAutoBaseline(), GETSystem::SetAutoBaselineHigh(), GETSystem::SetAutoBaselineLow(), GETSystem::SetBaselineCorrection(), GETSystem::SetCalibProcess(), SetOutputCorrectionList(), and GETSystem::SetOutputSmoothing().

void GETObject::SetResponse ( GETResponse ptr,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common response function locally for the object (pointer is adopted). The response function is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
ptrresponse function pointer
recurrecursivelly set response function to sub-objects
fpnset response function also to FPN channels

Reimplemented in GETAGet.

Examples:
TestChannel.C.

References GetChild(), GetChildrenNumber(), response, GETProcessLink::SetLocalProcess(), and SetResponse().

Referenced by SetResponse().

void GETObject::SetResponse ( GETResponse obj,
bool  recur = true,
bool  fpn = false 
)
virtual

Set the common response function externally for the object. The response function is recursivelly set (externally) to sub-objects if recur is true (except for FPN channels is fpn is false).

Parameters
objresponse function object
recurrecursivelly set response function to sub-objects
fpnset response function also to FPN channels

Reimplemented in GETAGet.

References GetChild(), GetChildrenNumber(), response, GETProcessLink::SetExternalProcess(), and SetResponse().

void GETObject::SetTimeStep ( double  dt)
virtual

Set the time step for the object (all channels). The minimum value is 0.01 us.

Parameters
dtnew time step (in us)

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and SetTimeStep().

Referenced by SetTimeStep().

void GETObject::ValidDataSet ( )
inlinevirtual

Function setting output sample (from experimental file) as valid for all children, and setting channels data mode to GET::modeData. The function is recursively called for children, and is overloaded for GETChannel class, where it really acts.

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ValidDataSet().

Referenced by GETSystem::ProcessMergeFrameData(), GETRCoBo::ReadEvent(), GETSystem::ReadEvent(), and ValidDataSet().

void GETObject::ValidSimulSet ( )
inlinevirtual

Function setting test (input) sample (from simulation) as valid for all children, and setting channels data mode to GET::modeSimul. The function is recursively called for children, and is overloaded for GETChannel class, where it really acts.

Reimplemented in GETChannel.

References GetChild(), GetChildrenNumber(), and ValidSimulSet().

Referenced by ValidSimulSet().


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