GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-3-1 > qsec_wb / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

expand.c File Reference

Reverse a previous compaction. More...

#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_expansionQSEC_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.


Detailed Description

Reverse a previous compaction.

Author:
James Swain & Owen Saxton
Id
expand.c,v 1.14 2010/08/10 18:49:00 saxton Exp

Function Documentation

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

Parameters:
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
Returns:
Pointer to the location to place the next 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.

Parameters:
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  ) 

QSEC_expansion* QSEC_constructExpansion ( void *  buffer,
unsigned  cap 
)

const unsigned int* QSEC_recoverUser ( QSEC_expansion exp,
const unsigned int *  buf 
)

Unpack the tables against which the events were encoded.

Parameters:
buf Pointer to the buffer where the context is held
exp Pointer to the structure containing the tables (an expansion)
Returns:
Pointer to the next input location to be read or NULL if there was an error during recovery of User data

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 
)

void QSEC_reportExpCtx ( QSEC_expansion exp,
FILE *  fp 
)

Report the contents of the expansion context.

Parameters:
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.

Parameters:
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.

Parameters:
cap Capacity of the decompression, maximum number of events in a single cycle
Returns:
Size of the memory block required to accomodate the expansion structure

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.

Parameters:
buf Pointer to the buffer where the context is held
exp Pointer to the structure containing the tables (an expansion)
Returns:
Pointer to the next input location to read or NULL if there is an error in the unpacking.

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.

Parameters:
buf Pointer to the buffer where the context is held
exp Pointer to the structure containing the tables (an expansion)
Returns:
Pointer to the next input location to read or NULL if there is an error in the unpacking.

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.

Parameters:
buf Pointer to the buffer where the context is held
exp Pointer to the structure containing the tables (an expansion)
Returns:
Pointer to the next input location to read or NULL if there is an error in the unpacking

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.

Parameters:
buf Pointer to the buffer where the context is held
exp Pointer to the structure containing the tables (an expansion)
Returns:
Pointer to the next input location to read or NULL if there is an error in the unpacking.

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().


Generated on Thu Jan 27 12:57:36 2011 by  doxygen 1.5.8