GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-1-1 > qsec / linux-gcc
#include "expand_p.h"
#include "decode.h"
#include "decompress.h"
#include "raw.h"
#include "QSEC_ctx_p.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EBF_gem.h"
#include "EDS/EBF_tem.h"
#include "EDS/EBF_cal.h"
#include "EDS/EBF_tkr.h"
#include "QSE/QSE_ebf.h"
#include "QSE/QSE_aemRepack.h"
#include "QSE/QSE_aem.h"
#include "PBI/Endianness.h"
#include <string.h>
Classes | |
struct | QSEC_acdRaw |
Private structure holding raw data for an ACD contribution. More... | |
Functions | |
static __inline void | fixupCtbHdr (EBF_ctbHdr *hdr) |
When the ACD is not included in the output stream (as it is now), the final TEM contribution must have its response bit removed. | |
static __inline void * | roundUpPtr (void *ptr, int r) |
Round the specified pointer up to a specified binary boundary. | |
static __inline unsigned int | roundUpInt (unsigned int ui, int r) |
Round the specified integer up to a binary boundary. | |
static unsigned short * | decodeShorts (unsigned short *us, int cnt, QSEC_decompression *dcmp, APD_dtx *dtx) |
Decode the required number of symbols from the compressed stream and stores them as shorts. | |
static unsigned int * | decodeGem (QSEC_expansion *exp, const QSEC_summary *sum, unsigned int *evt) |
Decode the GEM contribution. | |
static unsigned int * | decodeAcd (QSEC_expansion *exp, const QSEC_summary *sum, unsigned int *evt) |
Decode an ACD event. | |
static unsigned int * | decodeCal (QSEC_expansion *exp, const QSEC_summary *sum, unsigned int *evt) |
Decode a CAL event. | |
static unsigned int * | decodeCalV1 (QSEC_expansion *exp, const QSEC_summary *sum, unsigned int *evt) |
Decode a version 1 CAL event. | |
static unsigned int * | decodeTkr (QSEC_expansion *exp, const QSEC_summary *sum, unsigned int *evt) |
Decode a tracker event. | |
static unsigned int * | decodeTkrTots (unsigned char *tot, int ntots, QSEC_decompression *tots, APD_dtx *dtx) |
Decompress the tracker TOTS. | |
static void | expandGem (QSEC_expansion *exp, EBF_gem *gem) |
Populate the data portion of a GEM contribution. | |
void | QSEC_update (QSEC_expansion *exp, EBF_gem *gem, unsigned int *seq, const unsigned int *ievt) |
Decode the GEM contribution and extract the 17 bit event sequence. | |
unsigned int | QSEC_decode (QSEC_expansion *exp, QSE_ebfEvt *oevt, const unsigned int *ievt) |
Decode the event held in the expansion structure into the QSE_evt structure. | |
static __inline void | decodeCalDiag (EBF_temDiag *diag[LSEC_N_TWR], unsigned int map, QSEC_decompression *dcmp, APD_dtx *dtx) |
Decode the CAL portion of the diagnostic block. | |
static __inline unsigned char * | calcTkrTotAdr (unsigned char *ptr, int nstrips) |
Encapsulate the calculation of the TOT storage address. | |
static __inline void | decodeTkrDiag (EBF_temDiag *diag[LSEC_N_TWR], unsigned int map, QSEC_decompression *dcmp, APD_dtx *dtx) |
Decode the tracker portion of the diagnostic block. |
static __inline unsigned char* calcTkrTotAdr | ( | unsigned char * | ptr, | |
int | nstrips | |||
) | [static] |
Encapsulate the calculation of the TOT storage address.
ptr | The address of the end of the last 12-byte block of strips | |
nstrips | The number of strips stored in this 12-byte block |
unsigned int * decodeAcd | ( | QSEC_expansion * | exp, | |
const QSEC_summary * | sum, | |||
unsigned int * | evt | |||
) | [static] |
Decode an ACD event.
exp | Expansion structure | |
sum | Pointer to the collection of contribution headers | |
evt | Pointer to the event to fill |
unsigned int * decodeCal | ( | QSEC_expansion * | exp, | |
const QSEC_summary * | sum, | |||
unsigned int * | evt | |||
) | [static] |
Decode a CAL event.
exp | Expansion structure | |
sum | Pointer to the collection of contribution headers | |
evt | Pointer to the event to fill |
static __inline void decodeCalDiag | ( | EBF_temDiag * | diag[LSEC_N_TWR], | |
unsigned int | map, | |||
QSEC_decompression * | dcmp, | |||
APD_dtx * | dtx | |||
) | [static] |
Decode the CAL portion of the diagnostic block.
diag | An array of pointers to each towers diagnostic block | |
map | The map of struck towers, MSB = Tower 0 | |
dcmp | The decoding tables | |
dtx | The bit stream to be decoded |
unsigned int * decodeCalV1 | ( | QSEC_expansion * | exp, | |
const QSEC_summary * | sum, | |||
unsigned int * | evt | |||
) | [static] |
Decode a version 1 CAL event.
exp | Expansion structure | |
sum | Pointer to the collection of contribution headers | |
evt | Pointer to the event to fill |
unsigned int * decodeGem | ( | QSEC_expansion * | exp, | |
const QSEC_summary * | sum, | |||
unsigned int * | evt | |||
) | [static] |
Decode the GEM contribution.
exp | Expansion structure | |
sum | Pointer to the collection of contribution headers | |
evt | Pointer to the event to fill. |
static unsigned short* decodeShorts | ( | unsigned short * | us, | |
int | cnt, | |||
QSEC_decompression * | dcmp, | |||
APD_dtx * | dtx | |||
) | [static] |
Decode the required number of symbols from the compressed stream and stores them as shorts.
us | The pointer to the unsigned short storeage array | |
cnt | The number of symbols to decode and store as short integer | |
dcmp | The decompression context | |
dtx | The compressed bit stream |
unsigned int * decodeTkr | ( | QSEC_expansion * | exp, | |
const QSEC_summary * | sum, | |||
unsigned int * | evt | |||
) | [static] |
Decode a tracker event.
exp | Expansion structure | |
sum | Pointer to the collection of contribution headers | |
evt | Pointer to the event to be filled. |
static __inline void decodeTkrDiag | ( | EBF_temDiag * | diag[LSEC_N_TWR], | |
unsigned int | map, | |||
QSEC_decompression * | dcmp, | |||
APD_dtx * | dtx | |||
) | [static] |
Decode the tracker portion of the diagnostic block.
diag | An array of pointers to each towers diagnostic block | |
map | The map of struck towers, MSB = Tower 0 | |
dcmp | The decoding tables | |
dtx | The bit stream to be decoded |
unsigned int * decodeTkrTots | ( | unsigned char * | tot, | |
int | ntots, | |||
QSEC_decompression * | tots, | |||
APD_dtx * | dtx | |||
) | [static] |
Decompress the tracker TOTS.
tot | Pointer to where to store the decoded tots | |
ntots | The number of TOTs to decode and fill | |
tots | The decompression context for the TOTs | |
dtx | The compressed bit stream descriptor |
void expandGem | ( | QSEC_expansion * | exp, | |
EBF_gem * | gem | |||
) | [static] |
Populate the data portion of a GEM contribution.
exp | Pointer to the expansion structure | |
gem | Pointer to the GEM structure to populate |
static __inline void fixupCtbHdr | ( | EBF_ctbHdr * | hdr | ) | [static] |
When the ACD is not included in the output stream (as it is now), the final TEM contribution must have its response bit removed.
hdr | The contribution header to patch |
unsigned int QSEC_decode | ( | QSEC_expansion * | exp, | |
QSE_ebfEvt * | oevt, | |||
const unsigned int * | ievt | |||
) |
Decode the event held in the expansion structure into the QSE_evt structure.
exp | Pointer to the expansion structure holding the histograms and encoder context | |
oevt | Pointer to the location to output the decoded event | |
ievt | Pointer to the location to input the encoded event |
void QSEC_update | ( | QSEC_expansion * | exp, | |
EBF_gem * | gem, | |||
unsigned int * | seq, | |||
const unsigned int * | ievt | |||
) |
Decode the GEM contribution and extract the 17 bit event sequence.
exp | Pointer to the expansion structure holding the histograms and encoder context | |
gem | Pointer to the location to place the decoded GEM contribution | |
seq | Pointer to the location to place the 17-bit event sequence number | |
ievt | Pointer to the location to input the encoded event number for use in QSE_ctxUpdateAtEvent |
static __inline unsigned int roundUpInt | ( | unsigned int | ui, | |
int | r | |||
) | [static] |
Round the specified integer up to a binary boundary.
ui | The integer to round | |
r | The boundary to round to. This must be a power of 2, i.e. 1, 2, 4, 8 etc |
static __inline void* roundUpPtr | ( | void * | ptr, | |
int | r | |||
) | [static] |
Round the specified pointer up to a specified binary boundary.
ptr | The pointer to round | |
r | The boundary to round to. This must be a power of 2, i.e. 1, 2, 4, 8 etc |