GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

QDF_cal_prd.h File Reference

Interface to the CAL range predictor functions. More...


Typedefs

typedef struct _QDF_cal_prd QDF_cal_prd
typedef struct _ECR_cal ECR_cal

Functions

unsigned int QDF_cal_prd_sizeof (void)
 Returns the size, in bytes, of a QDF_cal_prd structure.
int QDF_cal_prd_construct (QDF_cal_prd *prd, const ECR_cal *cal)
 Fills the range prediction data structures.
static __inline int QDF__calA_prd_predict (unsigned short int base, unsigned char shift, unsigned short int gain, signed short int pedestal)
 Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple.
static __inline int QDF__calB_prd_predict (unsigned short int base, unsigned char shift, unsigned short int gain, signed short int pedestal)
 Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple.


Detailed Description

Interface to the CAL range predictor functions.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_cal_prd.h,v 1.3 2010/09/02 21:35:39 russell Exp $

Function Documentation

static __inline int QDF__calA_prd_predict ( unsigned short int  base,
unsigned char  shift,
unsigned short int  gain,
signed short int  pedestal 
) [static]

Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple.

Returns:
The predicted value
Parameters:
base The base range value
shift The exponent of relative gains between the base range and the range to be predicted.
gain The normalized manitissa of the relative gain between the base range and the range to be predicted
pedestal The pedestal or offset between the two ranges, in units of the predicted range. Note that this is a signed quantity.
This predictor is for format 0 and 1 events, i.e. those prior to the fix that does not allow for negative ADC values.

Referenced by phaA_restore3().

static __inline int QDF__calB_prd_predict ( unsigned short int  base,
unsigned char  shift,
unsigned short int  gain,
signed short int  pedestal 
) [static]

Predicts the value of a different range from the value of a specified range (range) using linear parameters found in ple.

Returns:
The predicted value
Parameters:
base The base range value
shift The exponent of relative gains between the base range and the range to be predicted.
gain The normalized manitissa of the relative gain between the base range and the range to be predicted
pedestal The pedestal or offset between the two ranges, in units of the predicted range. Note that this is a signed quantity.
This predictor is for format 2 events, i.e. those after the fix that does not allow for negative ADC values.

Referenced by phaB_restore3().

int QDF_cal_prd_construct ( QDF_cal_prd prd,
const ECR_cal *  cal 
)

Fills the range prediction data structures.

Returns:
Status. Currently the only failure mode is if one of the generated constants occupies more bits than it is allocated.
Parameters:
prd The range prediction data structure to fill
cal The CAL calibration constants used in the filling of the range prediction data structure

References _QDF_cal_prd_tower::logs, _QDF_cal_prd_log::n, _QDF_cal_prd_log::p, _QDF_cal_prd_log_end_table::tbls, and _QDF_cal_prd::twrs.

Referenced by QDF_calCtxUpdate().

unsigned int QDF_cal_prd_sizeof ( void   ) 

Returns the size, in bytes, of a QDF_cal_prd structure.

Returns:
The size, in bytes, of a QDF_cal_prd structure

Referenced by QDF_calCtxSizeof().


Generated on Fri Nov 30 10:25:28 2012 by  doxygen 1.5.8