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


Interface   Data Structures   File List   Data Fields   Globals  

QDF_cal.h File Reference

Interface to the CAL decoding routines. More...

#include <LDT/BFU.h>

Typedefs

typedef struct _QDF_calCache QDF_calCache
typedef struct _QDF_calEvt QDF_calEvt
typedef struct _QDF_calCtx QDF_calCtx
typedef struct _QDF_calEvtCopyDir QDF_calEvtCopyDir
typedef struct _QDF_esbEvt QDF_esbEvt
typedef struct _QDF_gemEvt QDF_gemEvt
typedef struct _QDF_errEvt QDF_errEvt
typedef struct _QFR_fileCtx QFR_fileCtx
typedef struct _QSE_ctx QSE_ctx
typedef struct _QDF_exc QDF_exc
typedef struct _CDF_calBdy CDF_calBdy

Functions

int QDF_calCtxSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of the CAL decoding context needed to support the specified compression level.
QDF_calCtxQDF_calCtxConstruct (QDF_calCtx *ctx, unsigned int level, QDF_calCache *cache, const QSE_ctx *qse)
 Constructs (initializes) the specified CAL decoding context structure.
int QDF_calCtxUpdate (QDF_calCtx *cal, QFR_fileCtx *qfr, const CDF_calBdy *bdy)
 Updates the CAL context from the datagram contribution.
int QDF_calEvtSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of QDF_cal event needed to support the specified compression level.
QDF_calEvtQDF_calEvtConstruct (QDF_calEvt *evt, unsigned int level, void *prm, QDF_exc *exc, QDF_esbEvt *esb, QDF_gemEvt *gem, QDF_errEvt *err)
 Constructs (initializes) the specified CAL event structure.
BFU QDF_calEvtCopyDirForm (QDF_calEvtCopyDir *dir, unsigned int map, unsigned int four_range, const unsigned int *src, int max, BFU bfu)
 Forms the directory of copy descriptors for CAL data that was just copied into the output stream.
BFU QDF_calStd1Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes the single-range, 0-suppress, CAL events.
BFU QDF_calStd4Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes 4-range, 0-suppressed CAL events that where encoded prior to the fix to the pha prediction model.
BFU QDF_calAStd4Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes 4-range, 0-suppressed CAL events that where encoded prior to the fix to the pha prediction model.
BFU QDF_calBStd4Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes 4-range, 0-suppressed CAL events that where encoded after the fix to the pha prediction model.
BFU QDF_calPed1Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes the CAL when the data was acquired with zero-suppression disabled and single range readout.
BFU QDF_calPed4Decode (QDF_calCtx *ctx, QDF_calEvt *evt, const unsigned int *src, unsigned int max, BFU bfu)
 Decodes the CAL when the data was acquired with zero-suppression disabled and four range readout.


Detailed Description

Interface to the CAL decoding routines.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_cal.h,v 1.6 2011/03/27 01:45:43 russell Exp $

Function Documentation

BFU QDF_calAStd4Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
)

Decodes 4-range, 0-suppressed CAL events that where encoded prior to the fix to the pha prediction model.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The CAL compressed data decoding context
evt The CAL event data to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer
This version is for format 0 and 1 events, i.e. those prior to the CAL prediction model fix.

References calStd4Decode(), and phaA_restore3().

Referenced by QDF_calStd4Decode().

BFU QDF_calBStd4Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
)

Decodes 4-range, 0-suppressed CAL events that where encoded after the fix to the pha prediction model.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The CAL compressed data decoding context
evt The CAL event data to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer
This version is for format 2 events, i.e. those after the fix to the CAL prediction model fix.

References calStd4Decode(), and phaB_restore3().

QDF_calCtx * QDF_calCtxConstruct ( QDF_calCtx ctx,
unsigned int  level,
QDF_calCache *  cache,
const QSE_ctx qse 
)

Constructs (initializes) the specified CAL decoding context structure.

Returns:
Pointer to the context structure to construct
Parameters:
ctx The context structure to construct.
level The maximum level of compression that will be supported.
cache The CAL caches
qse Pointer to the public/generic QSE context parameter

References _QDF_calCtx::cache, _QDF_calCtx::hdd, _QDF_calCtx::opts, and _QDF_calCtx::prd.

Referenced by QDF_temCtxConstruct().

int QDF_calCtxSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of the CAL decoding context needed to support the specified compression level.

Returns:
The size, in bytes, of the CAL decoding context
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now

References QDF_cal_prd_sizeof().

Referenced by QDF_temCtxConstruct(), and QDF_temCtxSizeof().

int QDF_calCtxUpdate ( QDF_calCtx ctx,
QFR_fileCtx *  qfr,
const CDF_calBdy *  bdy 
)

Updates the CAL context from the datagram contribution.

Return values:
0,Success 
0x80000010,Pedestal file error, file not found
0x80000020,Pedestal file error, checksum mismatch
0x80000040,Gain file error, file not found
0x80000080,Gain file error, checksum mismatch
Parameters:
ctx The context to update
qfr The file translation context
bdy The update information

References calCtxGainsConstruct(), calCtxPedsConstruct(), _QDF_calCtx::calib, _QDF_calCtx::key_gains, _QDF_calCtx::key_peds, _QDF_calCtx::prd, and QDF_cal_prd_construct().

QDF_esbCtx * QDF_calEvtConstruct ( QDF_calEvt evt,
unsigned int  level,
void *  prm,
QDF_exc exc,
QDF_esbEvt esb,
QDF_gemEvt gem,
QDF_errEvt err 
)

Constructs (initializes) the specified CAL event structure.

Returns:
Pointer to the context structure to construct
Parameters:
evt The CAL event structure to construct.
level The maximum level of compression that will be supported.
prm Additional configuation parameter, unused as of now
exc Pointer to the global exception handling context
esb Pointer to the Event Summary Data for this event
gem Pointer to the GEM data for this event
err Pointer to the ERR data for this event

References _QDF_calEvt::err, _QDF_calEvt::esb, _QDF_calPedEvt::exc, _QDF_calStdEvt::exc, _QDF_calEvt::gem, _QDF_calEvt::ped, QDF_gemEvtGemGet(), and _QDF_calEvt::std.

Referenced by QDF_temEvtConstruct().

BFU QDF_calEvtCopyDirForm ( QDF_calEvtCopyDir dir,
unsigned int  map,
unsigned int  four_range,
const unsigned int *  src,
int  max,
BFU  bfu 
)

Forms the directory of copy descriptors for CAL data that was just copied into the output stream.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
dir The copy directory to fill out
map Left-justified, big-endian map of the active towers
four_range 0, 0 if single range, 1 if four-range
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

References _QDF_calEvtCopyDsc::dat, _QDF_calEvtCopyDir::map, _QDF_calEvtCopyDsc::nbytes, and _QDF_calEvtCopyDir::twrs.

Referenced by cal_ped1_style_0(), and cal_ped4_style_0().

int QDF_calEvtSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of QDF_cal event needed to support the specified compression level.

Returns:
The size, in bytes, of the CAL event
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now

Referenced by QDF_temEvtConstruct(), and QDF_temEvtSizeof().

BFU QDF_calPed1Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
)

Decodes the CAL when the data was acquired with zero-suppression disabled and single range readout.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The compressed data decoding context
evt The CAL event block to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer
This routine is a simple dispatcher, extracting the formatting style, then dispatching to the appropriate decoding routine.

References cal_ped1_style_0(), cal_ped1_style_1(), cal_ped1_style_2(), cal_ped1_style_3(), _QDF_calEvt::ped, and _QDF_calPedEvt::style.

BFU QDF_calPed4Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
)

Decodes the CAL when the data was acquired with zero-suppression disabled and four range readout.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The compressed data decoding context
evt The CAL event block to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer
This routine is a simple dispatcher, extracting the formatting style, then dispatching to the appropriate decoding routine.

References cal_ped4_style_0(), cal_ped4_style_1(), cal_ped4_style_2(), cal_ped4_style_3(), _QDF_calEvt::ped, and _QDF_calPedEvt::style.

BFU QDF_calStd1Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the single-range, 0-suppress, CAL events.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The CAL compressed data decoding context
evt The CAL event data to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

References cal_std_unpack_adrs(), cal_std_unpack_phas(), _QDF_calStdEvt::exc, _QDF_calStdEvt::map, QDF__excStatusCompose(), QDF_excDeclare(), QDF_EXCSUBSYSTEM_K_CAL, QDF_EXCTYPE_K_PED, and _QDF_calEvt::std.

BFU QDF_calStd4Decode ( QDF_calCtx ctx,
QDF_calEvt evt,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
)

Decodes 4-range, 0-suppressed CAL events that where encoded prior to the fix to the pha prediction model.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The CAL compressed data decoding context
evt The CAL event data to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer
This version is for format 0 and 1 events, i.e. those prior to the CAL prediction model fix. The call is maintained for backwards compatibility reasons and should be considered obsolete.

References QDF_calAStd4Decode().


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