GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc


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.

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.

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

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


Generated on Thu Sep 2 14:54:53 2010 by  doxygen 1.5.3