GET library
GETSystem Class Reference

#include <GETSystem.hh>

Inheritance diagram for GETSystem:
GETObject GETActarTpc GETRCoBo GETActarDem GETActarEventReader

Public Member Functions

Constructors, affectation, destructor
 GETSystem (u_int n_cobo=1, u_int dim=0, double dt=0.01L)
 
virtual ~GETSystem ()
 
GET configuration
virtual int ResetConfig ()
 
virtual int InitConfig ()
 
const GETCfgSetupGetConfig () const
 
GETCfgSetupGetConfig ()
 
virtual int ReadXMLConfig (const string &fname)
 
Initialization functions
virtual void Reset ()
 
virtual int Init (u_int n_cobo, u_int n, double dt)
 
virtual void ClearEvent ()
 
bool ChannelHasData (u_int ic) const
 
GET system core objects functions
virtual string GetObjectId () const
 
virtual u_int GetChildrenNumber () const
 
virtual const GETObjectGetChild (u_int i) const
 
virtual GETObjectGetChild (u_int i)
 
const GETCoBooperator[] (u_int n) const
 
GETCoBooperator[] (u_int n)
 
virtual u_int GetCoBoNumber () const
 
virtual u_int GetAsAdNumber () const
 
virtual int GetChannelIndex (const GETChannel *ch)
 
Look-up table and analysis tools
const GETLookupTableLookupTable () const
 
GETLookupTableLookupTable ()
 
virtual u_int GetChannelCount () const
 
virtual int GetChannelIndex (int ix, int iy) const
 
virtual GETChannelGetChannel (int ix, int iy) const
 
virtual GETChannelGetChannel (u_int n)
 
virtual GETHitMaskSetHitMask (GETHitMask *mask)
 
GETHitMaskGetHitMask () const
 
virtual int SetAnalyser (GETSystemAnalyser *a)
 
GETSystemAnalyserGetAnalyser () const
 
Data (output) correction processes
virtual int SetCalibProcess (const string &calib_file)
 
virtual int SetBaselineCorrection (const string &bl_file)
 
virtual int SetOutputSmoothing (double width)
 
virtual int SetAutoBaseline (u_short num_lo, u_short num_hi, u_short off_lo=0, u_short off_hi=0)
 
virtual int SetAutoBaselineLow (u_short num_lo, u_short off_lo=0)
 
virtual int SetAutoBaselineHigh (u_short num_hi, u_short off_hi=0)
 
Access to class data
u_int GetEventCount () const
 
string GetRunFileName () const
 
Experimental data readout
virtual int OpenRunFile (const string &fname)
 
virtual int OpenRunSerie (const string &pattern, const string &serie)
 
virtual int CloseRunFile ()
 
bool IsRunFileOpen () const
 
GETRunFileGetRunFile ()
 
virtual int ReadEvent (bool process=true)
 
virtual int AnalyseRawEvent ()
 
virtual int AnalyseCorEvent ()
 
virtual int ExtractXMLFileHeaderFrame ()
 
virtual int ExtractCoboTopoFrame ()
 
virtual int ExtractCoboFrame ()
 
virtual int ExtractEbyedatFrame ()
 
virtual int ExtractMergeFrame ()
 
virtual int ProcessFrameData (MFMCommonFrame *frame)
 
virtual int ProcessMergeFrameData (MFMMergeFrame *frame)
 
virtual int ProcessCoBoFrameData (MFMCoboFrame *frame)
 
virtual int ProcessEbyedatFrameData (MFMEbyedatFrame *frame)
 
Events processing and correction
virtual GETChannelGetMaximumChannel (u_short info=GET::signalOut, bool integ=false)
 
virtual int OutputCorrectFPN (u_int opt_fpn=GET::CoBoCorrectFPN4)
 
virtual int ZeroSuppression (double thr=0.)
 
User hook functions
virtual int AnyFrameUser (MFMCommonFrame &frame)
 
virtual int MergeFrameUser (MFMMergeFrame &frame)
 
virtual int CoBoFrameUser (MFMCoboFrame &frame)
 
virtual int EbyedatFrameUser (MFMEbyedatFrame &frame)
 
ROOT related functions
 ClassDef (GETSystem, 0)
 
- Public Member Functions inherited from GETObject
 GETObject ()
 
virtual ~GETObject ()
 
int GetId () const
 
virtual string GetFullId () const
 
virtual u_int GetSignalChannelCount () const
 
virtual u_int GetTotalChannelCount () const
 
virtual GETChannelGetSignalChannel (u_int n)
 
virtual GETChannelGetTotalChannel (u_int n)
 
const GETObjectGetParent () const
 
GETObjectGetParent ()
 
virtual void SetTimeStep (double dt)
 
u_int GetSampleDim ()
 
double GetTimeStep ()
 
virtual u_int GetReadoutMultiplicity (bool fpn=true) const
 
virtual double GetSignalSum (u_short info=GET::signalOut)
 
virtual void InitLocalData (u_int n, double dt)
 
virtual void ValidDataSet ()
 
virtual void ValidSimulSet ()
 
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)
 
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 ()
 
 ClassDef (GETObject, 0)
 

Protected Attributes

GETSystemAnalyseranalyser
 Pointer to a data analyser.
 
u_int channel_count
 Total number of channels.
 
bool * channel_hit
 Whether the channel contains data.
 
GETChannel ** channel_summary
 Summary of channels pointers.
 
GETCoBocobo
 Array of CoBo modules.
 
u_int cobo_number
 Number of CoBo modules controlled.
 
GETCfgSetupconfig
 Configuration data.
 
u_int event_count
 Number of events read (in file)
 
GETHitMaskhit_mask
 Pointer to the hit mask.
 
GETLookupTable lookup_table
 Lookup table.
 
char * mfm_buffer
 MFM frames data buffer.
 
char ** mfm_buffer_adr
 Pointer of allocated buffer.
 
int mfm_buffer_size
 Size of allocated buffer.
 
MFMCommonFrame * mfm_frame
 Common frame for MFM in/out.
 
MFMCoboFrame * mfm_frame_cobo
 Specific CoBo frame for MFM in/out.
 
u_int mfm_frame_count
 Frame number in current file.
 
GETRunFilerun_file
 Pointer to the input run data.
 
u_int saturation_count
 Number of saturated channels (computed at raw event analysis)
 
u_int saturation_mult
 Number of saturated data to consider a channel as saturated.
 
u_int saturation_value
 Coder value for channel saturation (set to 0 not to perform the analysis)
 
double zero_threshold
 Threshold for raw data zero suppression.
 
- Protected Attributes inherited from GETObject
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.
 

Static Protected Attributes

static u_int options = 0
 Options for GET system.
 

Private Member Functions

 GObject (GETSystem)
 

Friends

class GETCfgSetup
 

Options functions

virtual void SetZeroSuppressMode (double thr=0.)
 
virtual void SetSaturationValue (int val)
 
virtual int GetSaturationValue () const
 
virtual int GetSaturationCount () const
 
virtual bool IsChannelSaturated (u_int ich)
 
virtual bool IsChannelSaturated (const GETChannel &ch)
 
static void SetOptions (u_int opts)
 
static void SetOption (u_int flags, bool b=true)
 
static u_int GetOptions ()
 
static bool GetOption (u_int flags)
 

Detailed Description

This class defines a the full GET system, controlling a variable number of CoBo modules.

The static options may define general behaviour of the system, such as samples corrections at readout.

The class defines some automatic corrections of raw data samples when reading an event (see options defined in the GET namespace), independently of the output data correction processes:

  • correction from FPN channels:
  • apply a (software) zero suppresion on raw data: this option is not compatible with the FPN correction or with the automatic baseline correction

Illustration of the event processing with GETSystem class:

GETEventProcessing.png
Run files and run series

When reading events with the GETSystem class (with ReadEvent function), a file must have been previously opened.

  • A run file is either a single file, either a set of several files with the same name, but with additional prefix .1, .2... in case of automatic change of file during acquisition.
    • in this case, use the GETSystem::OpenRunFile function
    • the input file name may contain a * character to indicate that there can be more than 1 file (for example "run_0201.dat*")
  • A run serie is a list of run files, with different run numbers.
    • in this case, use the GETSystem::OpenRunSerie function
    • the file name must contain a R code to indicate where is the run number
    • for example, OpenRunSerie ( "run_%4R.dat*", "201:203,206" ) will request to process files "run_0201.dat*", "run_0202.dat*", "run_0203.dat*" and "run_0206.dat*" (see above for the meaning of *).
Lookup table

A lookup table is associated to the GET system object in order to associate the detector channels positions to the electronics channels.

Hit mask and hit channels

A hit mask can be created (the look-up table must be defined) in order to select the channels for analysis.

The hit mask defines 2 information for each channel:

  • whether it is selected for analysis
  • whether its signal is large enough
Hit channels

It should be noted that independently of the hit mask, the GET system class defines an array of logical values that indicates whether the channels have been filled with experimental data (for example in partial readout mode).

This hit channel information is checked when applying automatic corrections to the raw data: FPN, automatic baseline, ...

Data analyser

The GETSystemAnalyser class is a base class for specific data analysis to be performed on the GETSystem data. Such an analyser can be defined with the GETSystem::SetAnalyser function.

If an anlyser is defined, its data analysis functions will be called before and after output correction when experimental data are read.

Examples:
Demonstrator_Noise.C, Demonstrator_RMS1.C, and Demonstrator_RMS2.C.

Constructor & Destructor Documentation

GETSystem::GETSystem ( u_int  n_cobo = 1,
u_int  n = 0,
double  dt = 0.01L 
)

Constructor.

Parameters
n_cobonumber of controlled CoBo modules
ndimension of data samples
dtsampling period (us)

References analyser, channel_count, channel_hit, channel_summary, cobo, cobo_number, config, event_count, hit_mask, Init(), mfm_buffer, mfm_buffer_adr, mfm_buffer_size, mfm_frame, mfm_frame_cobo, mfm_frame_count, run_file, saturation_count, saturation_mult, saturation_value, and zero_threshold.

Member Function Documentation

int GETSystem::AnalyseCorEvent ( )
virtual

Function called just after the raw data have been read and corrected according to the selected options. If a non-zero value is returned, it means an error occured and the event reading process is interrupted.

In the GETSystem base class, this function just calls the associated analyser function (if defined) .

References GETSystemAnalyser::AnalyseCorEvent(), and analyser.

Referenced by ReadEvent().

int GETSystem::AnalyseRawEvent ( )
virtual

Function called just after the raw data have been read, before automatic corrections are applied. If a non-zero value is returned, it means an error occured and the event reading process is interrupted.

In the base class, the function counts the number of saturated channels. It also calls the associated analyser function (if defined) .

If overloaded in derived classes, the base class function should be called by the derived class function for this counting to be done.

References analyser, GETSystemAnalyser::AnalyseRawEvent(), GETObject::GetTotalChannelCount(), IsChannelSaturated(), saturation_count, and saturation_value.

Referenced by ReadEvent().

int GETSystem::AnyFrameUser ( MFMCommonFrame &  frame)
inlinevirtual

Function called after any kind of frame was read. A positive return value is considered as an error.

This function is called before the specific frames types user functions

In this base class, the function does nothing.

Parameters
frameframe data

Referenced by ProcessFrameData().

bool GETSystem::ChannelHasData ( u_int  ic) const
inline

Return true if the channel contains data after reading an event.

Parameters
icchannel number

References channel_count, and channel_hit.

Referenced by GETSystemAnalyser::ProcessFluctuationsAnalysis(), and GETSystemAnalyser::ProcessNoiseAnalysis().

GETSystem::ClassDef ( GETSystem  ,
 
)

for use within ROOT.

void GETSystem::ClearEvent ( )
virtual
int GETSystem::CloseRunFile ( )
virtual

Close current experimental data file. The function returns 0 if no error occured.

Examples:
Demonstrator_RMS1.C, ReadEvent_Demonstrator.cxx, and ReadEvent_RCoBo.cxx.

References analyser, GETSystemAnalyser::AnalyseRunStop(), GETRunFile::Close(), IsRunFileOpen(), and run_file.

Referenced by OpenRunFile(), OpenRunSerie(), Reset(), and ~GETSystem().

int GETSystem::CoBoFrameUser ( MFMCoboFrame &  frame)
inlinevirtual

Function called after a CoBo frame (single AsAd) was read. A positive return value is considered as an error. In this base class, the function does nothing.

Parameters
frameframe data

Referenced by ProcessFrameData(), and ProcessMergeFrameData().

int GETSystem::EbyedatFrameUser ( MFMEbyedatFrame &  frame)
inlinevirtual

Function called after an Ebyedat frame was read. A positive return value is considered as an error. In this base class, the function does nothing.

Parameters
frameframe data

Referenced by ProcessFrameData(), and ProcessMergeFrameData().

int GETSystem::ExtractCoboFrame ( )
virtual

Function extracting information from the CoBo data frame.

Reimplemented in GETActarTpc.

References mfm_frame.

Referenced by ReadEvent().

int GETSystem::ExtractCoboTopoFrame ( )
virtual

Function extracting information from the CoBo topology frame.

References mfm_frame.

Referenced by ReadEvent().

int GETSystem::ExtractEbyedatFrame ( )
virtual

Function extracting information from the EBYEDAT data frame.

References mfm_frame.

Referenced by ReadEvent().

int GETSystem::ExtractMergeFrame ( )
virtual

Function extracting information from a merged frame.

References mfm_frame, and ProcessMergeFrameData().

Referenced by ReadEvent().

int GETSystem::ExtractXMLFileHeaderFrame ( )
virtual

Function extracting information from the file header frame.

References mfm_frame.

Referenced by ReadEvent().

GETSystemAnalyser * GETSystem::GetAnalyser ( ) const
inline

Function returning the pointer to the data analyser.

References analyser.

Referenced by GETActarEventReader::GETInit().

u_int GETSystem::GetAsAdNumber ( ) const
virtual

Return the number of AsAd boards controlled by the module.

References cobo, and cobo_number.

Referenced by ProcessMergeFrameData().

GETChannel * GETSystem::GetChannel ( int  ix,
int  iy 
) const
inlinevirtual

Return the channel pointer from pad position.

Parameters
ixX pad index
iyY pad index
Examples:
Demonstrator_RMS1.C.

References channel_summary, GETLookupTable::GetChannel(), and lookup_table.

Referenced by GETActarEventReader::AnalysisEvent(), GETActarTpcAnalyser::ApplyOffTrackCorrection(), GETSystemAnalyser::CalcChannelMaxima(), GETSystemAnalyser::CalcChannelOutput(), GETSystemAnalyser::ComputeAmplitudeData(), GETActarTpcAnalyser::ComputeSumInt(), GETSystemAnalyser::CreateAllChannelsHisto(), GETActarTpcAnalyser::CreateInTrackMeanHisto(), GETActarTpcAnalyser::CreateOffTrackMeanHisto(), GETSystemAnalyser::CumulChannelsSummaryHisto(), GETActarEventReader::DefinePadSpectrum(), GETActarTpcAnalyser::Export3D_POV(), GETActarTpcAnalyser::ExportPads_POV(), GETSystemAnalyser::FillAllChannelsHisto(), GETActarTpcAnalyser::FillAutoHistograms(), GETSystemAnalyser::FillChannelsSummaryHisto(), GETSystemAnalyser::FillFullEventHisto(), GETActarTpcAnalyser::FillHistogram3D(), GETActarTpcAnalyser::FillHistogramXTmax(), GETActarTpcAnalyser::FillHistogramYTmax(), GETActarTpcAnalyser::FillPadHistogram(), GETHitMaskXY::GetMaxSignalChannel(), GETActarEventReader::HistoClickedSlot(), GETActarEventReader::HistoEventSlot(), GETActarEventReader::PresetAnalysis(), GETSystemAnalyser::ProcessDataContinuityCheck(), GETSystemAnalyser::ProcessDataNumberCheck(), GETSystemAnalyser::ProcessFluctuationsAnalysis(), GETSystemAnalyser::ProcessNoiseAnalysis(), GETActarTpcAnalyser::ProcessOffTrackAnalysis(), SetBaselineCorrection(), SetCalibProcess(), GETHitMaskXY::UpdateMask(), GETHitMask::UpdateMask(), and ZeroSuppression().

GETChannel * GETSystem::GetChannel ( u_int  n)
inlinevirtual

Return a channel (signal or FPN) from the object The function returns NULL if the channel does not exist.

Parameters
nchannel number

Reimplemented from GETObject.

References channel_count, and channel_summary.

int GETSystem::GetChannelIndex ( const GETChannel ch)
virtual

Return the index of a channel in the GET system. If the channel is not found, the function returns -1.

Parameters
chpointer to channel object

References channel_count, and channel_summary.

Referenced by GETActarEventReader::DefineChannelParam().

int GETSystem::GetChannelIndex ( int  ix,
int  iy 
) const
inlinevirtual

Return the electronics channel index (including FPN) from pad position.

Parameters
ixX pad index
iyY pad index

References GETLookupTable::GetChannel(), and lookup_table.

const GETObject * GETSystem::GetChild ( u_int  i) const
inlinevirtual

Return a GET core child object (NULL since channels have no children).

Parameters
ichild number

Implements GETObject.

References cobo, and cobo_number.

Referenced by GETCfgSetup::GETCfgSetup().

GETObject * GETSystem::GetChild ( u_int  i)
inlinevirtual

Return a GET core child object (NULL since channels have no children).

Parameters
ichild number

Implements GETObject.

References cobo, and cobo_number.

u_int GETSystem::GetChildrenNumber ( ) const
inlinevirtual

Return the number of GET core children objects.

Implements GETObject.

References cobo_number.

Referenced by GETSystemAnalyser::BadChannelsWarning(), GETHitMask::CreateThresholdXML(), and OutputCorrectFPN().

u_int GETSystem::GetCoBoNumber ( ) const
inlinevirtual

Return the number of CoBo modules controlled by the module.

References cobo_number.

Referenced by GETActarEventReader::DefineChannelParam(), GETCfgSetup::GETCfgSetup(), and GETActarEventReader::PresetAnalysis().

const GETCfgSetup * GETSystem::GetConfig ( ) const
inline

Return the pointer to the related GET configuration.

References config.

GETCfgSetup * GETSystem::GetConfig ( )
inline

Return the pointer to the related GET configuration.

References config.

u_int GETSystem::GetEventCount ( ) const
inline
GETChannel * GETSystem::GetMaximumChannel ( u_short  info = GET::signalOut,
bool  integ = false 
)
virtual

Return a pointer to the channel with maximum signal (amplitude or integral signal). The FPN channels are not checked.

Parameters
infosamples used for filling: GET::signalOut (default) GET::signalTst or GET::signalRec
integwhether the integral is checked instead of amplitude

References channel_count, channel_summary, GETChannel::IsSignalChannel(), GETChannel::OutSample(), GETChannel::RecSample(), GET::signalRec, GET::signalTst, and GETChannel::TstSample().

string GETSystem::GetObjectId ( ) const
inlinevirtual

Return the object string identifier.

Implements GETObject.

bool GETSystem::GetOption ( u_int  flags)
inlinestatic

Get the status of selected options for the GET system (true if all selected options are ON).

Parameters
flagschecked options

References options.

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

u_int GETSystem::GetOptions ( )
inlinestatic

Get the options for the GET system.

References options.

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

GETRunFile * GETSystem::GetRunFile ( )
inline

Return the pointer to the run file(s) object;

References run_file.

string GETSystem::GetRunFileName ( ) const
inline

Return the name of current experimental data file.

References GETRunFile::GetFileName(), and run_file.

int GETSystem::GetSaturationCount ( ) const
inlinevirtual

Function returning the number of saturated channels.

References saturation_count.

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

int GETSystem::GetSaturationValue ( ) const
inlinevirtual

Function returning the coder value above which a channel is considered saturated.

References saturation_value.

GETSystem::GObject ( GETSystem  )
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.
int GETSystem::Init ( u_int  n_cobo,
u_int  n,
double  dt 
)
virtual

Initialize the CoBo modules with 4 AsAd boards. If the number of CoBo modules is modified, they are recreated. In any case, they are resetted.

The function returns 0 if no error occured.

Warning: the look-up table and the hit mask must be redefined if needed after a call the the Init function.

Parameters
n_cobonumber of CoBo modules
ndimension of data samples
dtsampling period (us)

Reimplemented in GETRCoBo.

References channel_count, channel_hit, channel_summary, cobo, cobo_number, GETLookupTable::EraseTables(), GETObject::GetTotalChannel(), GETObject::GetTotalChannelCount(), GETObject::id, GETCoBo::Init(), GETObject::InitLocalData(), lookup_table, GETObject::parent, Reset(), and SetHitMask().

Referenced by GETSystem(), GETRCoBo::Init(), and GETActarTpc::Init().

int GETSystem::InitConfig ( )
virtual

Create the configuration architecture. This function should be called after the GET core system has been fully defined.

Examples:
ReadConfig.cxx.

References config, and ResetConfig().

bool GETSystem::IsChannelSaturated ( u_int  ich)
inlinevirtual

The function returns true if the number of channel data over saturation threshold is at least the saturation multiplicity.

Parameters
ichchannel index

References GetSaturationCount(), GETObject::GetTotalChannel(), and saturation_mult.

Referenced by AnalyseRawEvent().

bool GETSystem::IsChannelSaturated ( const GETChannel ch)
inlinevirtual

The function returns true if the number of channel data over saturation threshold is at least the saturation multiplicity.

Parameters
chchannel reference

References GETChannel::GetSaturationCount(), and saturation_mult.

bool GETSystem::IsRunFileOpen ( ) const
inline

Return whether an experimental data file is currently open.

References GETRunFile::IsOpen(), and run_file.

Referenced by CloseRunFile(), GETActarEventReader::IsOpen(), OpenRunFile(), OpenRunSerie(), GETRCoBo::ReadEvent(), ReadEvent(), Reset(), and ~GETSystem().

GETLookupTable & GETSystem::LookupTable ( )
inline

Return the look-up table (by reference).

References lookup_table.

int GETSystem::MergeFrameUser ( MFMMergeFrame &  frame)
inlinevirtual

Function called after a merge frame was read. A positive return value is considered as an error. In this base class, the function does nothing.

Parameters
frameframe data

Referenced by ProcessFrameData().

int GETSystem::OpenRunFile ( const string &  fname)
virtual

Open an experimental data file. If the file name contains a '*' character, a file list is created instead of a single file. The function returns 0 if no error occured.

Parameters
fnamefile name
Examples:
Demonstrator_RMS1.C, ReadEvent_Demonstrator.cxx, ReadEvent_RCoBo.cxx, and ReadRCoBo.C.

References analyser, GETSystemAnalyser::AnalyseRunStart(), CloseRunFile(), event_count, IsRunFileOpen(), mfm_frame_count, GETRunFile::Open(), and run_file.

int GETSystem::OpenRunSerie ( const string &  pattern,
const string &  serie 
)
virtual

Open a serie of run files. The function returns 0 if no error occured.

Parameters
patternpattern to select run files, with "%R" or "%<n>R" indicating the run number position
seriestring indicating the list of run numbers

References analyser, GETSystemAnalyser::AnalyseRunStart(), CloseRunFile(), event_count, IsRunFileOpen(), mfm_frame_count, GETRunFile::Open(), and run_file.

const GETCoBo & GETSystem::operator[] ( u_int  n) const
inline

Access to one of the CoBo module. There is no index verification.

Parameters
nCoBo number

References cobo.

GETCoBo & GETSystem::operator[] ( u_int  n)
inline

Access to one of the CoBo module. There is no index verification.

Parameters
nCoBo number

References cobo.

int GETSystem::OutputCorrectFPN ( u_int  opt_fpn = GET::CoBoCorrectFPN4)
virtual

Function correcting event output samples for FPN. The argument overrides the GET system current option. Only the signal channels are affected. The function returns 0 if no error occured.

Parameters
opt_fpnFPN correction option (see GET namespace)

References AGET_CHANNELS, ASAD_SIZE, channel_hit, GETAGet::CloserFPNIndex(), cobo, COBO_SIZE, GET::CoBoCorrectFPN4, GetChildrenNumber(), GETObject::GetId(), GetOption(), GETObject::GetSignalChannel(), GETChannel::OutSample(), GET::RCoBoCorrectFPN2, and GET::RCoBoCorrectFPN4.

Referenced by ReadEvent().

int GETSystem::ProcessCoBoFrameData ( MFMCoboFrame *  frame)
virtual

Function extracting the data from an external MFM Merge frame.

Parameters
framepointer to the frame to be analysed

References AGET_SIZE, ASAD_SIZE, channel_hit, cobo, COBO_SIZE, event_count, GETChannel::OutSample(), GETChannel::read_count, GETChannel::satur_count, and saturation_value.

Referenced by ProcessFrameData(), and ProcessMergeFrameData().

int GETSystem::ProcessEbyedatFrameData ( MFMEbyedatFrame *  frame)
virtual

Function extracting the data from an external MFM Merge frame.

Parameters
framepointer to the frame to be analysed

Referenced by ProcessFrameData(), and ProcessMergeFrameData().

int GETSystem::ProcessFrameData ( MFMCommonFrame *  frame)
virtual

Function extracting the data from an external MFM frame.

Parameters
framepointer to the frame to be analysed

References AnyFrameUser(), CoBoFrameUser(), EbyedatFrameUser(), MergeFrameUser(), ProcessCoBoFrameData(), ProcessEbyedatFrameData(), and ProcessMergeFrameData().

int GETSystem::ProcessMergeFrameData ( MFMMergeFrame *  frame)
virtual

Function extracting the data from an external MFM Merge frame.

Parameters
framepointer to the frame to be analysed

References CoBoFrameUser(), EbyedatFrameUser(), GET_FRAME_ERROR, GET_FRAME_WARN, GetAsAdNumber(), GET::MergedIncompleteError, GET::MergedIncompleteSkip, mfm_frame_count, options, ProcessCoBoFrameData(), ProcessEbyedatFrameData(), and GETObject::ValidDataSet().

Referenced by ExtractMergeFrame(), and ProcessFrameData().

int GETSystem::ReadEvent ( bool  process = true)
virtual

Read next event in current file. The function returns -1 if end of file is reached (no event read) or a positive value is case of error.

After an event has been read, the channels are set to experimental mode, and all channels output are set to valid (and other signals must be recomputed).

The function does:

  • read a raw event
  • call the AnalyseRawEvent() function
  • applies corrections, according to options:
    • FPN correction
    • output correction processes
  • call the AnalyseCorrEvent() function
  • reconstruct input channels (if process argument is true)
Parameters
processwhether the reconstructed sample should be processed

Reimplemented in GETRCoBo.

Examples:
Demonstrator_RMS1.C, and ReadEvent_Demonstrator.cxx.

References AnalyseCorEvent(), AnalyseRawEvent(), GETRunFile::AtEnd(), ClearEvent(), GET::CoBoZeroSuppress, event_count, ExtractCoboFrame(), ExtractCoboTopoFrame(), ExtractEbyedatFrame(), ExtractMergeFrame(), ExtractXMLFileHeaderFrame(), GET_EOF, GET_FILE_ERROR, GETRunFile::GetFileLun(), GetOptions(), IsRunFileOpen(), mfm_buffer_adr, mfm_buffer_size, mfm_frame, mfm_frame_count, GETRunFile::OpenNext(), OutputCorrectFPN(), GETObject::ProcessOutputCorrection(), GETObject::ProcessRecFromOut(), GET::RCoBoCorrectFPN4, run_file, GETObject::ValidDataSet(), zero_threshold, and ZeroSuppression().

int GETSystem::ReadXMLConfig ( const string &  fname)
inlinevirtual

Read the setup configuration file.

Parameters
fnamefile name
Examples:
ReadConfig.cxx.

References config, and GETCfgSetup::ReadXMLConfig().

void GETSystem::Reset ( )
virtual

Function resetting all CoBo modules (see GETCoBo::Reset function). The array of CoBo modules is not deleted, and the number of CoBo modules is not modified. The function also closes input file and resets counters.

Reimplemented in GETActarEventReader.

References CloseRunFile(), cobo, cobo_number, event_count, IsRunFileOpen(), and GETCoBo::Reset().

Referenced by Init().

int GETSystem::ResetConfig ( )
virtual

Removes the configuration architecture.

References cobo_number, and config.

Referenced by InitConfig().

int GETSystem::SetAnalyser ( GETSystemAnalyser a)
virtual

Set a data analyser associated to the GET system. If the analyser pointer is NULL, a previously defined analyser is deleted. The function return 0 if no error occured.

Parameters
apointer to the analyser

References analyser, and GETSystemAnalyser::SetSystem().

Referenced by GETActarEventReader::GETInit().

int GETSystem::SetAutoBaseline ( u_short  num_lo,
u_short  off_lo,
u_short  num_hi = 0,
u_short  off_hi = 0 
)
virtual

Function setting the automatic linear baseline correction for the GET system. It is set recursively to all children, down to the signal channels.

If not already set, the function starts attributing a process serie for all output corrections

The function returns 0 if no error occured.

Parameters
num_lonumber of buckets in the low part of the sample
off_lobuckets offset from first bucket
num_hinumber of buckets in the high part of the sample
off_hibuckets offset from last bucket

References GETObject::AddOutputCorrection(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

int GETSystem::SetAutoBaselineHigh ( u_short  num_hi,
u_short  off_hi = 0 
)
virtual

Function setting the high sample range constant baseline correction for the GET system. It is set recursively to all children, down to the signal channels.

If not already set, the function starts attributing a process serie for all output corrections

The function returns 0 if no error occured.

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

References GETObject::AddOutputCorrection(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

int GETSystem::SetAutoBaselineLow ( u_short  num_lo,
u_short  off_lo = 0 
)
virtual

Function setting the low sample range constant baseline correction for the GET system. It is set recursively to all children, down to the signal channels.

If not already set, the function starts attributing a process serie for all output corrections

The function returns 0 if no error occured.

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

References GETObject::AddOutputCorrection(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

int GETSystem::SetBaselineCorrection ( const string &  bl_file)
virtual

Function setting the baseline correction for each channel of the GET system.

A process is attributed only to signal channels (not FPN). If not already set, the function starts attributing a process serie for all output corrections

The file must contain the exact number of samples (including FPN channels) previously stored with the sample formet (with GETSample::Write function).

The function returns 0 if no error occured.

Parameters
bl_filebaselines file (1 sample per channel)

References GETObject::AddOutputCorrection(), GetChannel(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), GETObject::GetTotalChannelCount(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

int GETSystem::SetCalibProcess ( const string &  calib_file)
virtual

Function setting the calibration process for each channel of the GET system.

A process is attributed only to signal channels (not FPN). If not already set, the function starts attributing a process serie for all output corrections

The function returns 0 if no error occured.

Parameters
calib_filecalibration file

References GETObject::AddOutputCorrection(), GetChannel(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), GETChannel::IsSignalChannel(), GETCalibProcess::SetCoefficient(), GETCalibProcess::SetDegree(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

GETHitMask * GETSystem::SetHitMask ( GETHitMask mask)
virtual

Defines the hit mask associated to the channels. The hit mask is adopted by the GETSystem system objet (the mask will be deleted when the GETSystem object is destroyed). If a hit mask was previous set, deletes the previous one. If an analyser (GETSystemAnalyser) is defined, the mask pointer is modified for the analyser. If the argument is a NULL pointer, the current hit mask is removed. The function returns the hit mask pointer if properly set, a NULL pointer otherwise.

Parameters
maskpointer to the hit mask

References analyser, hit_mask, and GETSystemAnalyser::hit_mask.

Referenced by Init(), and GETActarTpc::SetHitMask().

void GETSystem::SetOption ( u_int  flags,
bool  b = true 
)
inlinestatic

Set selected options for the GET system.

Parameters
flagschosen options
boptions value (on/off)

References options.

Referenced by GETSystemAnalyser::ConfigCommand(), and SetZeroSuppressMode().

void GETSystem::SetOptions ( u_int  opts)
inlinestatic

Set all options for the GET system.

Parameters
optsselected options

References options.

Referenced by GETActarEventReader::GETInit().

int GETSystem::SetOutputSmoothing ( double  width)
virtual

Function adding a smoothing filter to the output signals correction. It is set recursively to all children, down to the signal channels.

If not already set, the function starts attributing a process serie for all output corrections

The function returns 0 if no error occured.

Parameters
widthwidth (FWHM) of the smoothing Gauss function

References GETObject::AddOutputCorrection(), GETObject::GetOutputCorrection(), GETObject::GetSampleDim(), GETObject::GetTimeStep(), and GETObject::SetOutputCorrectionList().

Referenced by GETSystemAnalyser::ConfigCommand().

void GETSystem::SetSaturationValue ( int  val)
inlinevirtual

Function setting the coder value above which a channel is considered saturated.

Parameters
valcoder value for saturation

References saturation_value.

void GETSystem::SetZeroSuppressMode ( double  thr = 0.)
virtual

Set / remove the zero suppression mode. If the threshold is larger than 1, then the zero suppression is activated with the given threshold value. Else, the zero suppression mode is set off. When set on, this mode inhibits the FPN and the automatic baseline corrections.

Parameters
thrthreshold below which values are set to 0.

References GET::CoBoZeroSuppress, SetOption(), and zero_threshold.

int GETSystem::ZeroSuppression ( double  thr = 0.)
virtual

Function setting the values below the threshold to 0, in the output samples of all channels.

Parameters
thrzero suppression threshold

References channel_count, GetChannel(), GETObject::GetSampleDim(), and GETChannel::OutSample().

Referenced by ReadEvent().


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