GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / dev > qse / rhel5-64
#include <QSE/QDF_tkr.h>
#include <QSE/QDF_exc.h>
#include <QSE/QSE_tkr.h>
#include <QDF_tkr_def.h>
#include <QDF_err_def.h>
#include <QDF_esb_def.h>
#include <QDF_exc_def.h>
#include <LDT/BFU.h>
#include <LDT/BWU.h>
#include <LDT/BIT.h>
#include <PBI/FFS.ih>
#include <dprintf.h>
#include <qdf_tkr_std_dbg.h>
Defines | |
#define | _get_strip(_bfu, _src, _pos, _strip, _nbits) |
Gets the next strip from the input stream. | |
Functions | |
static __inline BFU | tkr_std_unpack_twr_maps (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR tower map and the tower class map. | |
static __inline BFU | tkr_std_unpack_lyr_maps (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR layer maps. | |
static __inline BFU | tkr_std_unpack_cnts (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR layer hit count. | |
static __inline BFU | tkr_std_unpack_hits (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR hit strips. | |
static __inline BFU | tkr_std_unpack_cwidths (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR cluster widths. | |
static __inline BFU | tkr_std_unpack_tots (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR TOT values. | |
static __inline BFU | layer_map_unpack (unsigned int *map, const unsigned int *src, unsigned int max, BFU bfu) |
Unpacks the 18-bit X and Y layer maps. | |
static __inline QSE_tkrLyr * | tower_and_layer_init (QDF_tkrTwr *twr, int twrNum, QSE_tkrLyr *lyr) |
Initializes portions of the tower and layer structures mainly concerned with the hit layers. | |
static __inline BFU | layer_unpack_cmaps (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR layer hit count. | |
static __inline BFU | layer_unpack_cnts_serial (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the number of counts in the layers where the count is not derivable from either the tower class or the strip ordering. The counts are represented as a number of consecutive 1s. | |
static __inline BFU | layer_unpack_cnts_field (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the number of counts in the layers where the count is not derivable from either the tower class or the strip ordering. The counts are represented as a bit field. The first 3 bits gives the width of the bit field as a power of 2. | |
static __inline int | establish_split_points (const QDF_tkrSplits *splits, QDF_tkrEvt *tkr) |
Uses the split point array to establish the lo and hi layer maps and count of layer ends, and hence, the number of TOTs. | |
static __inline int | find_split_point (const QDF_tkrCluster *clusters, int nclusters, int hiLo, QDF_tkrSplitsLimit limit, int twr, int lyr, QDF_exc *exc) |
Finds the split point for the given set of clusters. | |
BFU | QDF_tkrStdDecode (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu) |
Decodes the TKR. |
CVS $Id: QDF_tkr_std.c,v 1.7 2011/03/27 01:45:44 russell Exp $
#define _get_strip | ( | _bfu, | |||
_src, | |||||
_pos, | |||||
_strip, | |||||
_nbits | ) |
Value:
( _strip = _bfu_extractBR (_bfu, _src, _pos), \
\
/* If the MSB is set, the next bit most be a 0 */ \
_nbits = 10 - _strip, \
(_strip <<10) | _bfu_extractR (_bfu, _src, _pos, _nbits))
_bfu | The bit stream context | |
_src | The data source, i.e. the bit stream | |
_pos | The current bit position | |
_strip | Returned as the fetched strip number | |
_nbits | The number of bits that were read to get the strip number |
Referenced by tkr_std_unpack_hits().
static __inline int establish_split_points | ( | const QDF_tkrSplits * | splits, | |
QDF_tkrEvt * | evt | |||
) | [static] |
Uses the split point array to establish the lo and hi layer maps and count of layer ends, and hence, the number of TOTs.
splits | The split points | |
evt | The tracker event so far |
References _QSE_tkrLyr::beg, _QDF_tkrEvt::bsa, _QDF_tkrEvt::exc, find_split_point(), _QDF_tkrSplitsLimit::hi, _QSE_tkrLyr::hiLo, _QDF_tkrSplitsTower::layers, _QDF_tkrSplitsLayer::limit, _QDF_tkrSplitsLimit::lo, _QSE_tkrLyr::nsplit, _QSE_tkrLyr::nstrips, _QDF_tkrEvt::ntwrs, _QSE_tkrLyr::num, _QDF_tkrSplits::towers, _QSE_tkrLyr::twr, and _QDF_tkrBsa::twrs.
Referenced by tkr_std_unpack_cwidths(), and tkr_std_unpack_tots().
static __inline int find_split_point | ( | const QDF_tkrCluster * | clusters, | |
int | nclusters, | |||
int | lo, | |||
QDF_tkrSplitsLimit | limit, | |||
int | twr, | |||
int | lyr, | |||
QDF_exc * | exc | |||
) | [static] |
Finds the split point for the given set of clusters.
clusters | The list of clusters | |
nclusters | The number of clusters | |
lo | A status word indicating whether there are LO hits | |
limit | The lo and hi limits for the split points | |
twr | The tower number, used for error reporting | |
lyr | The layer number, used for error reporting | |
exc | Exception handling context |
References _QDF_tkrSplitsLimit::hi, _QDF_tkrSplitsLimit::lo, QDF__excStatusCompose(), QDF_excDeclare(), QDF_EXCSUBSYSTEM_K_TKR_TEM, and QDF_EXCTYPE_K_STD.
Referenced by establish_split_points(), and tkr_std_unpack_cwidths().
static __inline BFU layer_map_unpack | ( | unsigned int * | map, | |
const unsigned int * | src, | |||
unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Unpacks the 18-bit X and Y layer maps.
map | Returned as a right justified bit map of the layers struck (bit 0 = layer 0) | |
src | The data source, i.e. the bit stream | |
max | The maximum bit position | |
bfu | The current bit position and temporary buffer |
After reconstituting these three values, the value of the X and Y layer maps can be recovered by first
Referenced by tkr_std_unpack_lyr_maps().
static __inline BFU layer_unpack_cmaps | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR layer hit count.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, _QDF_tkrEvt::classMap, _QDF_tkrBsa::cmaps, _QDF_tkrEvt::cmapsMap, _QDF_tkrEvt::n23twrs, _QDF_tkrEvt::ncmaps, _QDF_tkrEvt::ncnts, and _QDF_tkrBsa::twrs.
Referenced by tkr_std_unpack_cnts().
static __inline BFU layer_unpack_cnts_field | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the number of counts in the layers where the count is not derivable from either the tower class or the strip ordering. The counts are represented as a bit field. The first 3 bits gives the width of the bit field as a power of 2.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, _QDF_tkrBsa::cmaps, _QDF_tkrBsa::cnts, _QDF_tkrEvt::ncmaps, and _QDF_tkrEvt::ncnts.
Referenced by tkr_std_unpack_cnts().
static __inline BFU layer_unpack_cnts_serial | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the number of counts in the layers where the count is not derivable from either the tower class or the strip ordering. The counts are represented as a number of consecutive 1s.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, _QDF_tkrBsa::cmaps, _QDF_tkrBsa::cnts, _QDF_tkrEvt::ncmaps, and _QDF_tkrEvt::ncnts.
Referenced by tkr_std_unpack_cnts().
BFU QDF_tkrStdDecode | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) |
Decodes the TKR.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_esbEvt::err_ids, _QDF_tkrEvt::errMap, _QDF_tkrEvt::esb, _QDF_tkrEvt::map, QDF_tkrErrDecode(), tkr_std_unpack_cnts(), tkr_std_unpack_cwidths(), tkr_std_unpack_hits(), tkr_std_unpack_lyr_maps(), tkr_std_unpack_tots(), and tkr_std_unpack_twr_maps().
Referenced by QDF_tkrPedDecode().
static __inline BFU tkr_std_unpack_cnts | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR layer hit count.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References layer_unpack_cmaps(), layer_unpack_cnts_field(), layer_unpack_cnts_serial(), _QDF_tkrEvt::ncmaps, and _QDF_tkrEvt::ncnts.
Referenced by QDF_tkrStdDecode().
static __inline BFU tkr_std_unpack_cwidths | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR cluster widths.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, _QDF_tkrEvt::classMap, establish_split_points(), find_split_point(), print_declare, and _QDF_tkrBsa::twrs.
Referenced by QDF_tkrStdDecode().
static __inline BFU tkr_std_unpack_hits | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR hit strips.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _get_strip, add_cluster(), _QSE_tkrLyr::beg, _QDF_tkrEvt::bsa, _QDF_tkrEvt::classMap, _QDF_tkrBsa::clusters, _QDF_tkrBsa::cmaps, _QDF_tkrEvt::cmapsMap, _QDF_tkrBsa::cnts, _QDF_tkrBsa::lyrs, _QSE_tkrLyr::nstrips, _QDF_tkrEvt::ntwrs, _QSE_tkrLyr::num, print_declare, and _QDF_tkrBsa::twrs.
Referenced by QDF_tkrStdDecode().
static __inline BFU tkr_std_unpack_lyr_maps | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR layer maps.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, _QDF_tkrEvt::classMap, layer_map_unpack(), _QDF_tkrBsa::lyrs, _QDF_tkrEvt::map, _QDF_tkrEvt::nlyrs, print_declare, tower_and_layer_init(), _QDF_tkrEvt::twrs, and _QDF_tkrBsa::twrs.
Referenced by QDF_tkrStdDecode().
static __inline BFU tkr_std_unpack_tots | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR TOT values.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::bsa, establish_split_points(), _QDF_tkrEvt::exc, _QSE_tkrLyr::hiLo, _QDF_tkrBsa::lyrs, _QDF_tkrEvt::nlyrs, print_declare, QDF__excStatusCompose(), QDF_excDeclare(), QDF_EXCSUBSYSTEM_K_TKR, QDF_EXCTYPE_K_STD, _QDF_tkrCtx::splits, and _QSE_tkrLyr::tots.
Referenced by QDF_tkrStdDecode().
static __inline BFU tkr_std_unpack_twr_maps | ( | QDF_tkrCtx * | ctx, | |
QDF_tkrEvt * | evt, | |||
const unsigned int * | src, | |||
const unsigned int | max, | |||
BFU | bfu | |||
) | [static] |
Decodes the TKR tower map and the tower class map.
ctx | The TKR compressed data decoding context | |
evt | The TKR 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 |
References _QDF_tkrEvt::classMap, _QDF_tkrEvt::map, _QDF_tkrEvt::n23twrs, and _QDF_tkrEvt::ntwrs.
Referenced by QDF_tkrStdDecode().
static __inline QSE_tkrLyr * tower_and_layer_init | ( | QDF_tkrTwr * | twr, | |
int | twrNum, | |||
QSE_tkrLyr * | lyrs | |||
) | [static] |
Initializes portions of the tower and layer structures mainly concerned with the hit layers.
twr | The parent tower structure | |
twrNum | The parent tower number | |
lyrs | The next layer structure to assign |
References _QDF_tkrEvt::map, _QDF_tkrEvt::nlyrs, _QSE_tkrLyr::num, and _QSE_tkrLyr::twr.
Referenced by tkr_std_unpack_lyr_maps().