GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-3-1 > qsec_wb / linux-gcc
#include "expand_p.h"
#include "expand.h"
#include "decompress.h"
#include "LDT/APD.h"
#include "LSEC/enums.h"
#include <string.h>
Functions | |
static unsigned char * | addDcm (QSEC_decompression **pdcm, unsigned char *next, unsigned int nbits, const char *name) |
Construct a decompression structure. | |
static const unsigned int * | recoverUserGem (QSEC_expansion *exp, const unsigned int *buf) |
Unpack the tables against which the GEM data were encoded. | |
static const unsigned int * | recoverUserAcd (QSEC_expansion *exp, const unsigned int *buf) |
Unpack the tables against which the ACD contributions were encoded. | |
static const unsigned int * | recoverUserCal (QSEC_expansion *exp, const unsigned int *buf) |
Unpack the tables against which the CAL contributions were encoded. | |
static const unsigned int * | recoverUserTkr (QSEC_expansion *exp, const unsigned int *buf) |
Unpack the tables against which the TKR contributions were encoded. | |
size_t | QSEC_sizeofExpansion (unsigned cap) |
Calculate the size of the memory block required to accomodate the expansion structure. | |
QSEC_expansion * | QSEC_constructExpansion (void *buffer, unsigned cap) |
Construct a QSEC_expansion structure in a buffer. | |
void | QSEC_clearExpansion (QSEC_expansion *exp) |
Clear away any context from a previous cycle. | |
void | QSEC_reportExpansion (QSEC_expansion *exp, FILE *fp) |
Report the contents of an expansion. | |
void | QSEC_reportExpCtx (QSEC_expansion *exp, FILE *fp) |
Report the contents of the expansion context. | |
void | QSEC_setMode (QSEC_expansion *exp, unsigned mode) |
Set the calibration mode of an expansion. | |
const unsigned int * | QSEC_recoverUser (QSEC_expansion *exp, const unsigned int *buf) |
Unpack the tables against which the events were encoded. | |
const unsigned int * | decodeCalMeans (QSEC_expansion *exp, const unsigned int *buf) |
Decompress the calorimeter log mean values. |
unsigned char * addDcm | ( | QSEC_decompression ** | pdcm, | |
unsigned char * | next, | |||
unsigned int | nbits, | |||
const char * | name | |||
) | [inline, static] |
Construct a decompression structure.
Constructs a decompression structure within the memory allocated for the expansion structure and returns a pointer to the location to place the next decompression
pdcm | Pointer to the location to place the pointer to the decompression structure | |
next | Pointer to the start of the memory to use for this decompression structure | |
nbits | Number of bits in the symbols handled by this decompression structure | |
name | String identifying the decompression structure |
References QSEC_constructDecompression(), and QSEC_sizeofDecompression().
Referenced by QSEC_constructExpansion().
const unsigned int* decodeCalMeans | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) |
Decompress the calorimeter log mean values.
exp | Pointer to the expansion structure | |
buf | Pointer to the compressed data |
References QSEC_expansion_::cal, QSEC_expansion_::dtx, QSEC_calDecompress::mean, QSEC_calDecompress::means, and QSEC_decompress().
Referenced by recoverUserCal().
void QSEC_clearExpansion | ( | QSEC_expansion * | exp | ) |
Clear away any context from a previous cycle.
exp | Pointer to a expansion object |
References QSEC_calDecompress::accepts, QSEC_expansion_::acd, QSEC_acdDecompress::cables, QSEC_expansion_::cal, QSEC_acdDecompress::chns, QSEC_gemDecompress::cno, QSEC_calDecompress::columns, QSEC_gemDecompress::cond, QSEC_tkrDecompress::diags, QSEC_calDecompress::diags, QSEC_expansion_::dtx, QSEC_expansion_::gem, QSEC_gemDecompress::high, QSEC_calDecompress::layCnts, QSEC_tkrDecompress::layers, QSEC_calDecompress::logs, QSEC_gemDecompress::low, QSEC_calDecompress::mean, QSEC_calDecompress::means, QSEC_acdDecompress::phas, QSEC_acdDecompress::pvahs, QSEC_clearDecompression(), QSEC_calDecompress::ranges, QSEC_gemDecompress::rbn, QSEC_tkrDecompress::requests, QSEC_gemDecompress::roi, QSEC_tkrDecompress::strips, QSEC_expansion_::tkr, QSEC_gemDecompress::tkr, QSEC_tkrDecompress::tots, QSEC_tkrDecompress::towers, QSEC_calDecompress::towers, QSEC_gemDecompress::xy0, QSEC_gemDecompress::xy1, QSEC_gemDecompress::xzm, QSEC_gemDecompress::xzp, QSEC_gemDecompress::yzm, and QSEC_gemDecompress::yzp.
QSEC_expansion* QSEC_constructExpansion | ( | void * | buffer, | |
unsigned | cap | |||
) |
Construct a QSEC_expansion structure in a buffer.
cap | Capacity of the decompression, maximum number of events in a single cycle | |
buffer | Uninitialised memory large enough to hold the expansion structure |
References QSEC_calDecompress::accepts, QSEC_expansion_::acd, addDcm(), QSEC_acdDecompress::cables, QSEC_expansion_::cal, QSEC_acdDecompress::chns, QSEC_gemDecompress::cno, QSEC_calDecompress::columns, QSEC_gemDecompress::cond, QSEC_tkrDecompress::diags, QSEC_calDecompress::diags, QSEC_expansion_::gem, QSEC_gemDecompress::high, QSEC_calDecompress::layCnts, QSEC_tkrDecompress::layers, QSEC_calDecompress::logs, QSEC_gemDecompress::low, QSEC_calDecompress::means, QSEC_acdDecompress::phas, QSEC_acdDecompress::pvahs, QSEC_CURRENT_VERSION, QSEC_calDecompress::ranges, QSEC_gemDecompress::rbn, QSEC_tkrDecompress::requests, QSEC_gemDecompress::roi, QSEC_tkrDecompress::strips, QSEC_expansion_::tkr, QSEC_gemDecompress::tkr, QSEC_tkrDecompress::tots, QSEC_tkrDecompress::towers, QSEC_calDecompress::towers, QSEC_expansion_::ver, QSEC_gemDecompress::xy0, QSEC_gemDecompress::xy1, QSEC_gemDecompress::xzm, QSEC_gemDecompress::xzp, QSEC_gemDecompress::yzm, and QSEC_gemDecompress::yzp.
Referenced by QSEC_construct().
const unsigned int* QSEC_recoverUser | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) |
Unpack the tables against which the events were encoded.
buf | Pointer to the buffer where the context is held | |
exp | Pointer to the structure containing the tables (an expansion) |
References QSEC_expansion_::mode, QSEC_CURRENT_VERSION, QSEC_VERS_ALL_RAW, recoverUserAcd(), recoverUserCal(), recoverUserTkr(), and QSEC_expansion_::ver.
Referenced by QSEC_updateAtContribution().
void QSEC_reportExpansion | ( | QSEC_expansion * | exp, | |
FILE * | fp | |||
) |
Report the contents of an expansion.
exp | Pointer to a expansion object | |
fp | Pointer to the destination file |
References QSEC_calDecompress::accepts, QSEC_expansion_::acd, QSEC_acdDecompress::cables, QSEC_expansion_::cal, QSEC_acdDecompress::chns, QSEC_gemDecompress::cno, QSEC_calDecompress::columns, QSEC_gemDecompress::cond, QSEC_tkrDecompress::diags, QSEC_calDecompress::diags, QSEC_expansion_::gem, QSEC_gemDecompress::high, QSEC_calDecompress::layCnts, QSEC_tkrDecompress::layers, QSEC_calDecompress::logs, QSEC_gemDecompress::low, QSEC_calDecompress::means, QSEC_acdDecompress::phas, QSEC_acdDecompress::pvahs, QSEC_reportDecompression(), QSEC_calDecompress::ranges, QSEC_gemDecompress::rbn, QSEC_tkrDecompress::requests, QSEC_gemDecompress::roi, QSEC_tkrDecompress::strips, QSEC_expansion_::tkr, QSEC_gemDecompress::tkr, QSEC_tkrDecompress::tots, QSEC_tkrDecompress::towers, QSEC_calDecompress::towers, QSEC_gemDecompress::xy0, QSEC_gemDecompress::xy1, QSEC_gemDecompress::xzm, QSEC_gemDecompress::xzp, QSEC_gemDecompress::yzm, and QSEC_gemDecompress::yzp.
Referenced by QSEC_reportExpand().
void QSEC_reportExpCtx | ( | QSEC_expansion * | exp, | |
FILE * | fp | |||
) |
Report the contents of the expansion context.
exp | Pointer to a expansion object | |
fp | Pointer to the destination file |
References QSEC_CURRENT_VERSION, QSEC_VERS_ALL_RAW, QSEC_VERS_FIXED_CAL, QSEC_VERS_NEW_SCHEME, QSEC_VERS_NEWER, QSEC_VERS_ORIGINAL, and QSEC_expansion_::ver.
Referenced by QSEC_reportExp().
void QSEC_setMode | ( | QSEC_expansion * | exp, | |
unsigned | mode | |||
) |
Set the calibration mode of an expansion.
exp | Pointer to a expansion structure | |
mode | Type of calibration |
References QSEC_expansion_::mode.
Referenced by QSEC_updateAtContribution().
size_t QSEC_sizeofExpansion | ( | unsigned | cap | ) |
Calculate the size of the memory block required to accomodate the expansion structure.
cap | Capacity of the decompression, maximum number of events in a single cycle |
References QSEC_sizeofDecompression().
Referenced by QSEC_sizeof().
const unsigned int * recoverUserAcd | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) | [inline, static] |
Unpack the tables against which the ACD contributions were encoded.
buf | Pointer to the buffer where the context is held | |
exp | Pointer to the structure containing the tables (an expansion) |
References QSEC_expansion_::acd, QSEC_acdDecompress::cables, QSEC_acdDecompress::chns, QSEC_acdDecompress::phas, QSEC_acdDecompress::pvahs, QSEC_unpack(), QSEC_VERS_NEW_SCHEME, recoverUserGem(), and QSEC_expansion_::ver.
Referenced by QSEC_recoverUser().
const unsigned int * recoverUserCal | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) | [inline, static] |
Unpack the tables against which the CAL contributions were encoded.
buf | Pointer to the buffer where the context is held | |
exp | Pointer to the structure containing the tables (an expansion) |
References QSEC_calDecompress::accepts, QSEC_expansion_::cal, QSEC_calDecompress::columns, decodeCalMeans(), QSEC_calDecompress::diags, QSEC_calDecompress::layCnts, QSEC_calDecompress::logs, QSEC_calDecompress::means, QSEC_unpack(), QSEC_unpackH(), QSEC_VERS_NEW_SCHEME, QSEC_VERS_NEWER, QSEC_calDecompress::range, QSEC_calDecompress::ranges, recoverUserGem(), QSEC_calDecompress::towers, and QSEC_expansion_::ver.
Referenced by QSEC_recoverUser().
const unsigned int * recoverUserGem | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) | [inline, static] |
Unpack the tables against which the GEM data were encoded.
buf | Pointer to the buffer where the context is held | |
exp | Pointer to the structure containing the tables (an expansion) |
References QSEC_gemDecompress::cno, QSEC_gemDecompress::cond, QSEC_expansion_::gem, QSEC_gemDecompress::high, QSEC_gemDecompress::low, QSEC_unpack(), QSEC_VERS_NEW_SCHEME, QSEC_gemDecompress::rbn, QSEC_gemDecompress::roi, QSEC_gemDecompress::tkr, QSEC_expansion_::ver, QSEC_gemDecompress::xy0, QSEC_gemDecompress::xy1, QSEC_gemDecompress::xzm, QSEC_gemDecompress::xzp, QSEC_gemDecompress::yzm, and QSEC_gemDecompress::yzp.
Referenced by recoverUserAcd(), recoverUserCal(), and recoverUserTkr().
const unsigned int * recoverUserTkr | ( | QSEC_expansion * | exp, | |
const unsigned int * | buf | |||
) | [inline, static] |
Unpack the tables against which the TKR contributions were encoded.
buf | Pointer to the buffer where the context is held | |
exp | Pointer to the structure containing the tables (an expansion) |
References QSEC_tkrDecompress::chan, QSEC_tkrDecompress::diags, QSEC_tkrDecompress::layers, QSEC_unpack(), QSEC_VERS_NEW_SCHEME, recoverUserGem(), QSEC_tkrDecompress::requests, QSEC_tkrDecompress::strips, QSEC_expansion_::tkr, QSEC_tkrDecompress::tots, QSEC_tkrDecompress::towers, and QSEC_expansion_::ver.
Referenced by QSEC_recoverUser().