GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64
#include <QSE/QSE_ctx.h>
#include <QSE/QDF_gem.h>
#include <QSE/QDF_esb.h>
#include <QDF_gem_def.h>
#include <QDF_esb_def.h>
#include <LSE/CDF_gemdef.h>
#include <LDT/BFU.h>
#include <PBI/FFS.ih>
#include <string.h>
Defines | |
#define | NULL ((void *)(0)) |
Functions | |
static BFU | gem_std_decode (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Decodes the GEM when encoded in the standard fashion. | |
static BFU | gem_ped_decode (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Decodes the GEM when encoded in the pedestal (non-physics) fashion. | |
static __inline BFU | gem_unpack_primitives (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks the GEM trigger primitives. | |
static __inline BFU | gem_unpack_conditions (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the GEM trigger conditions. | |
static __inline BFU | gem_unpack_deadzone (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the deadzone counter. | |
static __inline BFU | gem_unpack_times (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the trigger and livetime counter values. | |
static __inline BFU | gem_unpack_prescaled (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the prescale counter. | |
static __inline BFU | gem_unpack_discarded (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the discard counter. | |
static __inline BFU | gem_unpack_condtimes (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the condition arrival times. | |
static __inline BFU | gem_unpack_dwinevt (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the delta window and trigger events times. | |
static __inline BFU | gem_unpack_acd (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks/restores the list of struck ACD addresses. | |
int | QDF_gemCtxSizeof (unsigned int level, void *prm) |
Returns the size, in bytes of the GEM decoding context needed to support the specified compression level. | |
QDF_gemCtx * | QDF_gemCtxConstruct (QDF_gemCtx *ctx, unsigned int level, void *prm, const QSE_ctx *qse) |
Constructs (initializes) the specified GEM decoding context structure. | |
void | QDF_gemCtxUpdate (QDF_gemCtx *ctx, const QFR_fileCtx *qfr, const CDF_gemBdy *bdy) |
Updates the GEM context. This generally called during the root update phase. | |
int | QDF_gemEvtSizeof (unsigned int level, void *prm) |
Returns the size, in bytes of QDF GEM event needed to support the specified compression level. | |
QDF_gemEvt * | QDF_gemEvtConstruct (QDF_gemEvt *evt, unsigned int level, void *prm, QDF_exc *exc, const QDF_esbEvt *esb) |
Constructs (initializes) the specified GEM event structure. | |
const EBF_gem * | QDF_gemEvtGemGet (const QDF_gemEvt *evt) |
Returns a pointer to the EBF gem structure. | |
BFU | QDF_gemDecode (QDF_gemCtx *qdf, QDF_gemEvt *gem, const unsigned int *src, unsigned int max, BFU bfu) |
Decodes the GEM. |
CVS $Id: QDF_gem.c,v 1.7 2011/03/27 01:45:44 russell Exp $
BFU gem_ped_decode | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the GEM when encoded in the pedestal (non-physics) fashion.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References gem_std_decode(), and gem_unpack_acd().
Referenced by QDF_gemDecode().
BFU gem_std_decode | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the GEM when encoded in the standard fashion.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf, gem_unpack_conditions(), gem_unpack_condtimes(), gem_unpack_deadzone(), gem_unpack_discarded(), gem_unpack_dwinevt(), gem_unpack_prescaled(), gem_unpack_primitives(), and gem_unpack_times().
Referenced by gem_ped_decode(), and QDF_gemDecode().
static __inline BFU gem_unpack_acd | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the list of struck ACD addresses.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf.
Referenced by gem_ped_decode().
static __inline BFU gem_unpack_conditions | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the GEM trigger conditions.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_condtimes | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the condition arrival times.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf, and _QDF_gemEvt::psb.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_deadzone | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the deadzone counter.
gem | The GEM block to fill in | |
qdf | The compressed data decoding context | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
References _QSE_ctx::ctrs, _QSE_ctxCounters::deadzone, _QDF_gemEvt::ebf, and _QDF_gemCtx::qse.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_discarded | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the discard counter.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QSE_ctx::ctrs, _QSE_ctx::dgm, _QSE_ctxCounters::discarded, _QDF_gemEvt::ebf, and _QDF_gemCtx::qse.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_dwinevt | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the delta window and trigger events times.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_prescaled | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the prescale counter.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QSE_ctx::ctrs, _QSE_ctx::dgm, _QDF_gemEvt::ebf, _QSE_ctxCounters::prescaled, and _QDF_gemCtx::qse.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_primitives | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks the GEM trigger primitives.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_gemEvt::ebf, and _QDF_gemEvt::psb.
Referenced by gem_std_decode().
static __inline BFU gem_unpack_times | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks/restores the trigger and livetime counter values.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QDF_esw::bf, _QSE_ctx::ctrs, _QDF_gemEvt::ebf, _QSE_ctxCounters::elapsed, _QDF_gemEvt::esb, _QDF_esbEvt::esw, _QSE_ctxCounters::livetime, _QDF_gemCtx::min_deadtime, _QDF_gemCtx::qse, and _QSE_ctxCounters::sequence.
Referenced by gem_std_decode().
QDF_gemCtx * QDF_gemCtxConstruct | ( | QDF_gemCtx * | ctx, | |
unsigned int | level, | |||
void * | prm, | |||
const QSE_ctx * | qse | |||
) |
Constructs (initializes) the specified GEM decoding context structure.
ctx | The context structure to construct. | |
level | The maximum level of compression that will be supported. | |
prm | Additional configuation parameter, unused as of now | |
qse | Pointer to the public/generic QSE context parameter |
References _QDF_gemCtx::min_deadtime, and _QDF_gemCtx::qse.
int QDF_gemCtxSizeof | ( | unsigned int | level, | |
void * | prm | |||
) |
Returns the size, in bytes of the GEM decoding context needed to support the specified compression level.
level | The maximum level of compression that needs to be supported | |
prm | Additional configuation parameter, unused as of now |
void QDF_gemCtxUpdate | ( | QDF_gemCtx * | ctx, | |
const QFR_fileCtx * | qfr, | |||
const CDF_gemBdy * | bdy | |||
) |
Updates the GEM context. This generally called during the root update phase.
ctx | The context structure to update | |
qfr | The file resolution context, unused by the GEM | |
bdy | The update information |
References _QDF_gemCtx::min_deadtime.
BFU QDF_gemDecode | ( | QDF_gemCtx * | qdf, | |
QDF_gemEvt * | gem, | |||
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) |
Decodes the GEM.
qdf | The compressed data decoding context | |
gem | The GEM 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 |
References _QSE_ctxTime::cur, _QDF_gemEvt::ebf, gem_ped_decode(), gem_std_decode(), _QDF_gemCtx::qse, and _QSE_ctx::tim.
QDF_esbCtx * QDF_gemEvtConstruct | ( | QDF_gemEvt * | evt, | |
unsigned int | level, | |||
void * | prm, | |||
QDF_exc * | exc, | |||
const QDF_esbEvt * | esb | |||
) |
Constructs (initializes) the specified GEM event structure.
evt | The GEM 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 | Reference pointer to the Event Summary Block |
References _QDF_gemEvt::esb, and _QDF_gemEvt::exc.
const EBF_gem * QDF_gemEvtGemGet | ( | const QDF_gemEvt * | evt | ) |
Returns a pointer to the EBF gem structure.
evt |
References _QDF_gemEvt::ebf.
Referenced by QDF_acdEvtConstruct(), QDF_calEvtConstruct(), and QDF_dgnEvtConstruct().
int QDF_gemEvtSizeof | ( | unsigned int | level, | |
void * | prm | |||
) |
Returns the size, in bytes of QDF GEM event needed to support the specified compression level.
level | The maximum level of compression that needs to be supported | |
prm | Additional configuation parameter, unused as of now |