GET library
GETRunMean.hh File Reference
#include "GETSystem.hh"
#include "GETSystemAnalyser.hh"
#include "icc/GETRunMean.icc"

Go to the source code of this file.

Functions

int GETRunAsAdMean (GETSystem &get, const string runfile, u_int *ndat=NULL, u_int nmax=0)
 
int GETRunAsAdRMS (GETSystem &get, const string runfile, u_int *ndat=NULL, u_int nmax=0, bool same=true)
 
int GETRunHitChannelMean (GETSystem &get, const string runfile, u_int *ndat=NULL, u_int nmax=0)
 
int GETRunHitChannelRMS (GETSystem &get, const string runfile, u_int *ndat=NULL, u_int nmax=0, bool same=true)
 
int GETRunMean (GETSystem &get, const string runfile, u_int nmax=0)
 
int GETRunRMS (GETSystem &get, const string runfile, u_int nmax=0, bool same=true)
 
int GETSystemMean (GETSystem &get, const string &data_file, int nmax=0, bool outcorr=false)
 
int GETSystemMean (GETSystem &get, const GStringList &file_list, int nmax=0, bool outcorr=false)
 
int GETSystemMeanPower (GETSystem &get, const string &data_file, int nmax=0, bool outcorr=false)
 
int GETSystemMeanPower (GETSystem &get, const GStringList &file_list, int nmax=0, bool outcorr=false)
 
int GETSystemStdDeviation (GETSystem &get, const string &data_file, int nmax=0, bool outcorr=false, bool same=true)
 
int GETSystemStdDeviation (GETSystem &get, const GStringList &file_list, int nmax=0, bool outcorr=false, bool same=true)
 

Variables

u_int getEventCountInfo
 

Detailed Description

Header file for functions related to the averaging of runs events.

Function Documentation

int GETRunAsAdMean ( GETSystem get,
const string  runfile,
u_int *  ndat,
u_int  nmax 
)

Function reading a run file, and summing signals from all events in order to compute the average, that is stored in the output samples of the GET system channels.

This function works also for non merged CoBo (AsAd) frames, since it counts frames individually for each AsAd.

If the GET system analyser is defined and some data checks are set, only events with no problems are processed.

The function returns the number of frames read, or a negative value in case of problem.

Parameters
getGET system object
runfilerun file pattern
ndatif not NULL, return the number of frames for each AsAd
nmaxmaximum number of events to read (0 for all)

References AGET_SIZE, ASAD_SIZE, GETSystemAnalyser::BadChannelCount(), COBO_SIZE, and getEventCountInfo.

int GETRunAsAdRMS ( GETSystem get,
const string  runfile,
u_int *  ndat,
u_int  nmax,
bool  same 
)

Function reading a run file, and computing the standard deviation from all events compared to the (average) samples initially stored in the output samples of the GET system channels.

This function works also for non merged CoBo (AsAd) frames, since it counts frames individually for each AsAd.

If the GET system analyser is defined and some data checks are set, only events with no problems are processed.

The resulting RMS samples are then stored in the output samples of the GET system channels, replacing the average samples. The function returns the number of frames read, or a negative value in case of problem.

Parameters
getGET system object
runfilerun file pattern
nmaxmaximum number of events to read (0 for all)
ndatif not NULL, return the number of frames for each AsAd
samewhether the RMS is computed from same data than the average (then the sum is divided by N-1 instead of N)

References AGET_SIZE, ASAD_SIZE, GETSystemAnalyser::BadChannelCount(), COBO_SIZE, and getEventCountInfo.

int GETRunHitChannelMean ( GETSystem get,
const string  runfile,
u_int *  ndat,
u_int  nmax 
)

Function reading a run file, and summing signals from all events in order to compute the average, that is stored in the output samples of the GET system channels.

This function works also for non merged CoBo (AsAd) frames, and computes the number of events for each individual channel.

If the analyser is defined, the data corrections apply, and if the hit-mask is defined, only hit channels are counted in the average.

The function returns the number of frames read, or a negative value in case of problem.

Parameters
getGET system object
runfilerun file pattern
ndatif not NULL, return the number of events for each channel
nmaxmaximum number of events to read (0 for all)

References AGET_SIZE, ASAD_SIZE, COBO_SIZE, and getEventCountInfo.

int GETRunHitChannelRMS ( GETSystem get,
const string  runfile,
u_int *  ndat,
u_int  nmax,
bool  same 
)

Function reading a run file, and computing the standard deviation from all events compared to the (average) samples initially stored in the output samples of the GET system channels.

This function works also for non merged CoBo (AsAd) frames, and computes the number of events for each individual channel.

If the analyser is defined, the data corrections apply, and if the hit-mask is defined, only hit channels are counted in the average.

The resulting RMS samples are then stored in the output samples of the GET system channels, replacing the average samples. The function returns the number of frames read, or a negative value in case of problem.

Parameters
getGET system object
runfilerun file pattern
nmaxmaximum number of events to read (0 for all)
ndatif not NULL, return the number of events for each channel
samewhether the RMS is computed from same data than the average (then the sum is divided by N-1 instead of N)

References AGET_SIZE, ASAD_SIZE, COBO_SIZE, and getEventCountInfo.

int GETRunMean ( GETSystem get,
const string  runfile,
u_int  nmax 
)
inline

Function reading a run file, and summing signals from all events in order to compute the average, that is stored in the output samples of the GET system channels. The function returns the number of events read.

Parameters
getGET system object
runfilerun file pattern
nmaxmaximum number of events to read (0 for all)

References GETSystemMean().

int GETRunRMS ( GETSystem get,
const string  runfile,
u_int  nmax,
bool  same 
)
inline

Function reading a run file, and computing the standard deviation from all events compared to the (average) samples initially stored in the output samples of the GET system channels. The resulting RMS samples are then stored in the output samples of the GET system channels, replacing the average samples. The function returns the number of events read,.

Parameters
getGET system object
runfilerun file pattern
nmaxmaximum number of events to read (0 for all)
samewhether the RMS is computed from same data than the average (then the sum is divided by N-1 instead of N)

References GETSystemStdDeviation().

int GETSystemMean ( GETSystem get,
const string &  data_file,
int  nmax,
bool  outcorr 
)

This function reads events for the GET system, and computes the average of the (output) samples. The mean signals are stored in the argument get object. The function returns the effective number of events that have been read.

Parameters
getGET system to store average signals
data_fileevents run file
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined

References GETSystemMean().

Referenced by GETRunMean(), and GETSystemMean().

int GETSystemMean ( GETSystem get,
const GStringList &  file_list,
int  nmax,
bool  outcorr 
)

This function reads events for the GET system, and computes the average of the (output) samples. The mean signals are stored in the argument get object. The function returns the effective number of events that have been read.

Parameters
getGET system to store average signals
file_listlist of events run files names
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined

References GETChannel::ApplyOutputCorrection(), GETSystemAnalyser::BadChannelCount(), getEventCountInfo, GETObject::GetTotalChannel(), and GETChannel::OutSample().

int GETSystemMeanPower ( GETSystem get,
const string &  data_file,
int  nmax,
bool  outcorr 
)

This function reads events for the GET system, and computes the average spectral power of the (output) samples. The mean powers are stored in the argument get object. The macro returns the effective number of events that have been read.

Parameters
getGET system to store average signals
data_fileevents run file
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined

References GETSystemMeanPower().

Referenced by GETSystemMeanPower().

int GETSystemMeanPower ( GETSystem get,
const GStringList &  file_list,
int  nmax,
bool  outcorr 
)

This function reads events for the GET system, and computes the average spectral power of the (output) samples. The mean powers are stored in the argument get object. The macro returns the effective number of events that have been read.

Parameters
getGET system to store average signals
file_listlist of events run files names
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined

References GETChannel::ApplyOutputCorrection(), GETSystemAnalyser::BadChannelCount(), getEventCountInfo, GETObject::GetTotalChannel(), and GETChannel::OutSample().

int GETSystemStdDeviation ( GETSystem get,
const string &  data_file,
int  nmax,
bool  outcorr,
bool  same 
)

This function reads events for the GET system, and computes the standard deviation of the (output) samples, with respect to the initial content of the channels of the reduced CoBo argument. The initial content of the output channels should be the signal average.

The sum of the squared difference is divided by (N-1) where N is the number of events, assuming the RMS samples are computed with the same events than the mean samples.

The RMS signals are stored in the argument get object. The macro returns the effective number of events that have been read.

Parameters
getGET system with mean output samples at function call and standard deviation at function return
data_fileevents run file
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined
samewhether the RMS is computed from same data than the average (then the sum is divided by N-1 instead of N)

References GETSystemStdDeviation().

Referenced by GETRunRMS(), and GETSystemStdDeviation().

int GETSystemStdDeviation ( GETSystem get,
const GStringList &  file_list,
int  nmax,
bool  outcorr,
bool  same 
)

This function reads events for the GET system, and computes the standard deviation of the (output) samples, with respect to the initial content of the channels of the reduced CoBo argument. The initial content of the output channels should be the signal average.

The sum of the squared difference is divided by (N-1) where N is the number of events, assuming the RMS samples are computed with the same events than the mean samples.

The RMS signals are stored in the argument get object. The macro returns the effective number of events that have been read.

Parameters
getGET system with mean output samples at function call and standard deviation at function return
file_listlist of events run files names
nmaxnumber of events to read (0 for all)
outcorrwhether to apply output correction process to each event (for example baseline process), if defined
samewhether the RMS is computed from same data than the average (then the sum is divided by N-1 instead of N)

References GETChannel::ApplyOutputCorrection(), GETSystemAnalyser::BadChannelCount(), getEventCountInfo, GETObject::GetTotalChannel(), and GETChannel::OutSample().

Variable Documentation

u_int getEventCountInfo