GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-5 > dgfc / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

GFC_stats.c File Reference

Provides routines to clear and accumulate and the summary statistics of the gamma filtering process. More...

#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.


Detailed Description

Provides routines to clear and accumulate and the summary statistics of the gamma filtering process.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: GFC_stats.c,v 1.6 2011/03/27 04:55:31 russell Exp $

Function Documentation

static __inline int getEnergyBin ( unsigned int  status,
unsigned int  stageEnergy 
) [static]

Calculates the appropriate energy bin.

Returns:
The energy bin, i.e. a number between [0-7] inclusive
Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
stats The statistics block to clear.

References _GFC_stats::energy.

void GFC_statsSizeof ( void   ) 

Returns the size, in bytes, of the statistics table.

Returns:
The size, in bytes, of the statistics table


Generated on Wed Jan 16 13:56:55 2013 by  doxygen 1.5.8