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


Interface   Data Structures   File List   Data Fields   Globals  

QDF_calRepack.c File Reference

Reformats one tower in the QDF_calEvt to EBF format. More...

#include "QSE/QDF_calRepack.h"
#include "QDF_cal_def.h"
#include "EDS/FFS.h"
#include "dprintf.h"
#include <string.h>

Defines

#define print_title_bar()

Functions

static __inline
unsigned int 
repack_cal_log (const signed short int *syms, const ECR_calLog *clb, int col, int rngN, int rngP)
 Repacks one CAL log data word using symbol values as the pedestal subtracted ADC value and then the full ADC value by adding on the pedestal. The restoring ranges and column are added.
static __inline
unsigned int 
form_pair_cnts (unsigned int cnts, unsigned int *dst, unsigned int **dsts)
static __inline
unsigned int * 
cal_copy_repack (const QDF_calEvtCopyDir *dir, int tem, unsigned int *dst, const EBF_ctb *end)
 Repacks the CAL event for the specified TEM into its EBF format by copying the data into the output stream.
unsigned int * QDF_calStd1Repack (const QDF_calEvt *cal, int tem, unsigned int *dst, const EBF_ctb *end)
 Repacks a single-range, zero-suppressed CAL event for the specified TEM into its EBF format.
unsigned int * QDF_calStd4Repack (const QDF_calEvt *cal, int tem, unsigned int *dst, const EBF_ctb *end)
 Repacks a 4-range, zero-suppressed CAL event for the specified TEM into its EBF format The input data must be for range, non-zero suppressed.
unsigned int * QDF_calPed1Repack (const QDF_calEvt *cal, int tem, unsigned int *dst, const EBF_ctb *end)
 Repacks the CAL event for the specified TEM into its EBF format The input data must be single range, non-zero suppressed.
unsigned int * QDF_calPed4Repack (const QDF_calEvt *cal, int tem, unsigned int *dst, const EBF_ctb *end)
 Repacks the CAL event for the specified TEM into its EBF format The input data must be for range, non-zero suppressed.


Detailed Description

Reformats one tower in the QDF_calEvt to EBF format.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_calRepack.c,v 1.3 2009/05/01 00:52:22 russell Exp $

Function Documentation

static __inline unsigned int * cal_copy_repack ( const QDF_calEvtCopyDir dir,
int  tem,
unsigned int *  dst,
const EBF_ctb *  end 
) [static]

Repacks the CAL event for the specified TEM into its EBF format by copying the data into the output stream.

Returns:
The next location to fill in
Parameters:
dir The copy directory. This contains a map of the active towers plus a list of descriptors for each tower. The
tem Which TEM
dst The EBF destination address
end The address just past the last legitimate address

unsigned int * QDF_calPed1Repack ( const QDF_calEvt cal,
int  tem,
unsigned int *  dst,
const EBF_ctb *  end 
)

Repacks the CAL event for the specified TEM into its EBF format The input data must be single range, non-zero suppressed.

Returns:
The next location to fill in
Parameters:
cal The unpacked CAL event data
tem Which TEM
dst The EBF destination address
end The address just past the last legitimate address

unsigned int * QDF_calPed4Repack ( const QDF_calEvt cal,
int  tem,
unsigned int *  dst,
const EBF_ctb *  end 
)

Repacks the CAL event for the specified TEM into its EBF format The input data must be for range, non-zero suppressed.

Returns:
The next location to fill in
Parameters:
cal The unpacked CAL event data
tem Which TEM
dst The EBF destination address
end The address just past the last legitimate address

unsigned int * QDF_calStd1Repack ( const QDF_calEvt cal,
int  tem,
unsigned int *  dst,
const EBF_ctb *  end 
)

Repacks a single-range, zero-suppressed CAL event for the specified TEM into its EBF format.

Returns:
The next location to fill in
Parameters:
cal The unpacked CAL event data
tem Which TEM
dst The EBF destination address
end The address just past the last legitimate address

unsigned int * QDF_calStd4Repack ( const QDF_calEvt cal,
int  tem,
unsigned int *  dst,
const EBF_ctb *  end 
)

Repacks a 4-range, zero-suppressed CAL event for the specified TEM into its EBF format The input data must be for range, non-zero suppressed.

Returns:
The next location to fill in
Parameters:
cal The unpacked CAL event data
tem Which TEM
dst The EBF destination address
end The address just past the last legitimate address

static __inline unsigned int repack_cal_log ( const signed short int *  syms,
const ECR_calLog *  clb,
int  col,
int  rngN,
int  rngP 
) [static]

Repacks one CAL log data word using symbol values as the pedestal subtracted ADC value and then the full ADC value by adding on the pedestal. The restoring ranges and column are added.

Returns:
The reconstituted CAL log data word
Parameters:
syms The pedestal subtracted PHA values for the - (element 0) and + log end (element 1).
clb The calibration constants to be used added back on
col The column number
rngN The - range value
rngP The + range value


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