GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc
#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 "EDS/FFS.h"
#include "LDT/BFU.h"
#include "LDT/BWU.h"
#include "LDT/BIT.h"
#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.6 2009/05/01 01:21:38 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 |
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 |
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 |
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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |