GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / dev > gdgfc / rhel4-32
#include <EFC/GFC_V3_status.h>
#include <EFC/GFC_stats.h>
#include <GFC_statsDef.h>
#include <GFC_resultDef.h>
#include <EDS/ECR_cal.h>
#include <string.h>
Functions | |
static __inline int | getEnergyBin (unsigned int status, unsigned int stageEnergy) |
Calculates the appropriate energy bin. | |
static __inline void | accumulate (unsigned int cnts[64], unsigned int status, unsigned int stage) |
void | GFC_statsAccumulate (GFC_stats *stats, const GFC_result *beg, const GFC_result *end) |
Accumulates the statistics from a vector of event-by-event filtering results. | |
void | GFC_statsClear (GFC_stats *stats) |
Clears the statistics block. | |
int | GFC_statsSizeof (void) |
Returns the size, in bytes, of the statistics table. | |
void | GFC_statsAltAccumulate (GFC_stats *stats, const GFC_result *beg, const GFC_result *end, int nenergies, const unsigned int *energies) |
Accumulates the statistics from a vector of event-by-event filtering results. The alternate energy binning scheme is used. |
CVS $Id: GFC_stats.c,v 1.6 2011/03/27 04:55:31 russell Exp $
static __inline int getEnergyBin | ( | unsigned int | status, | |
unsigned int | stageEnergy | |||
) | [static] |
Calculates the appropriate energy bin.
status | The status, this indicates whether the energy is valid | |
stageEnergy | The stage + energy to classify |
References GFC_V3__resultEnergyInLeuGet(), and GFC_V3_STAGE_M_CAL.
Referenced by GFC_statsAccumulate().
void GFC_statsAccumulate | ( | GFC_stats * | stats, | |
const GFC_result * | beg, | |||
const GFC_result * | end | |||
) |
Accumulates the statistics from a vector of event-by-event filtering results.
stats | The statistics block to accumulate into | |
beg | The first result vector in the array to accumulate | |
end | The last (actually one past the last) result vector in the array to accumulate |
References _GFC_statsVector::cnts, _GFC_stats::energy, getEnergyBin(), GFC_V3_STAGE_M_TKR, GFC_V3_STAGE_V_TKR, _GFC_result::stageEnergy, and _GFC_result::status.
void GFC_statsAltAccumulate | ( | GFC_stats * | stats, | |
const GFC_result * | beg, | |||
const GFC_result * | end, | |||
int | nenergies, | |||
const unsigned int * | energies | |||
) |
Accumulates the statistics from a vector of event-by-event filtering results. The alternate energy binning scheme is used.
stats | The statistics block to accumulate into | |
beg | The first result vector in the array to accumulate | |
end | The last (actually one past the last) result vector in the array to accumulate | |
nenergies | The number of energy bins (up to 7) | |
energies | The energy bins, there can be up to 8. These define the upper edge of the energy bin. If 0 is defined as the first bin, the energy in the results bin will be considered a calculated value and checked for validity against the status value. If not, the value in the energy will be considered always valid. |
References _GFC_statsVector::cnts, _GFC_stats::energy, GFC_V3_STAGE_M_ENERGY, GFC_V3_STAGE_M_TKR, GFC_V3_STAGE_V_TKR, _GFC_result::stageEnergy, and _GFC_result::status.
void GFC_statsClear | ( | GFC_stats * | stats | ) |
Clears the statistics block.
stats | The statistics block to clear. |
References _GFC_stats::energy.
void GFC_statsSizeof | ( | void | ) |
Returns the size, in bytes, of the statistics table.