GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-4-0 > qse / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

QDF_dgn.h File Reference

Interface to the DGN (Diagnostic Block) decoding routines. More...

#include <LDT/BFU.h>

Typedefs

typedef struct _QDF_dgnEvt QDF_dgnEvt
typedef struct _QDF_dgnCtx QDF_dgnCtx
typedef struct _CDF_dgnBdy CDF_dgnBdy
typedef struct _QFR_fileCtx QFR_fileCtx
typedef struct _QDF_exc QDF_exc
typedef struct _QSE_ctx QSE_ctx
typedef struct _QDF_esbEvt QDF_esbEvt
typedef struct _QDF_gemEvt QDF_gemEvt
typedef struct _QDF_errEvt QDF_errEvt
typedef struct _QDF_calEvt QDF_calEvt
typedef struct _QDF_tkrEvt QDF_tkrEvt

Functions

int QDF_dgnCtxSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of the DGN decoding context needed to support the specified compression level.
QDF_dgnCtxQDF_dgnCtxConstruct (QDF_dgnCtx *ctx, unsigned int level, void *prm, QSE_ctx const *qse)
 Constructs (initializes) the specified DGN decoding context structure.
int QDF_dgnCtxUpdate (QDF_dgnCtx *ctx, QFR_fileCtx *qfr, CDF_dgnBdy const *bdy)
 Updates the DGN context from the datagram contribution.
int QDF_dgnEvtSizeof (unsigned int level, void *prm)
 Returns the size, in bytes of QDF_dgnEvt needed to support the specified compression level.
QDF_dgnEvtQDF_dgnEvtConstruct (QDF_dgnEvt *evt, unsigned int level, void *prm, QDF_exc *exc, QDF_esbEvt const *esb, QDF_gemEvt const *gem, QDF_errEvt const *err, QDF_calEvt const *cal, QDF_tkrEvt const *tkr)
 Constructs (initializes) the specified DGN event structure.
BFU QDF_dgnStdDecode (QDF_dgnCtx *ctx, QDF_dgnEvt *evt, unsigned int const *src, unsigned int max, BFU bfu)
 Decodes the DGN.
BFU QDF_dgnPedDecode (QDF_dgnCtx *ctx, QDF_dgnEvt *evt, unsigned int const *src, unsigned int max, BFU bfu)
 Decodes the DGN.


Detailed Description

Interface to the DGN (Diagnostic Block) decoding routines.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_dgn.h,v 1.2 2011/03/27 01:45:43 russell Exp $

Function Documentation

QDF_dgnCtx* QDF_dgnCtxConstruct ( QDF_dgnCtx ctx,
unsigned int  level,
void *  prm,
QSE_ctx const *  qse 
)

Constructs (initializes) the specified DGN decoding context structure.

Returns:
Pointer to the context structure to construct
Parameters:
ctx The context structure to construct.
level The maximum level of compression that will be supported.
prm Additional configuation parameter, unused as of now
qse The generic datagram context

References _QDF_dgnCtx::qse.

Referenced by QDF_temCtxConstruct().

int QDF_dgnCtxSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of the DGN decoding context needed to support the specified compression level.

Returns:
The size, in bytes, of the DGN decoding context
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now

Referenced by QDF_temCtxConstruct(), and QDF_temCtxSizeof().

int QDF_dgnCtxUpdate ( QDF_dgnCtx ctx,
QFR_fileCtx *  qfr,
CDF_dgnBdy const *  bdy 
)

Updates the DGN context from the datagram contribution.

Return values:
0,Success 
Parameters:
ctx The context to update
qfr The file translation context
bdy The update information, currently none

QDF_dgnEvt* QDF_dgnEvtConstruct ( QDF_dgnEvt evt,
unsigned int  level,
void *  prm,
QDF_exc exc,
QDF_esbEvt const *  esb,
QDF_gemEvt const *  gem,
QDF_errEvt const *  err,
QDF_calEvt const *  cal,
QDF_tkrEvt const *  tkr 
)

Constructs (initializes) the specified DGN event structure.

Returns:
Pointer to the context structure to construct
Parameters:
evt The DGN event structure to construct.
level The maximum level of compression that will be supported.
prm Additional configuation parameter, unused as of now
exc The exception handling context.
esb Pointer to the ESB data for this event (Event Summmary Block)
gem Pointer to the GEM data for this event
err Pointer to the ERR data for this event
cal Pointer to the CAL data for this event
tkr Pointer to the TKR data for this event

References _QDF_dgnPedEvt::cal, _QDF_dgnStdEvt::cal, _QDF_dgnHdrEvt::err, _QDF_dgnHdrEvt::esb, _QDF_dgnHdrEvt::exc, _QDF_dgnPedEvt::gem, _QDF_dgnStdEvt::gem, _QDF_dgnPedEvt::hdr, _QDF_dgnStdEvt::hdr, _QDF_calEvt::ped, _QDF_dgnEvt::ped, QDF_gemEvtGemGet(), _QDF_calEvt::std, _QDF_dgnEvt::std, _QDF_dgnPedEvt::tkr, and _QDF_dgnStdEvt::tkr.

Referenced by QDF_temEvtConstruct().

int QDF_dgnEvtSizeof ( unsigned int  level,
void *  prm 
)

Returns the size, in bytes of QDF_dgnEvt needed to support the specified compression level.

Returns:
The size, in bytes, of the DGN event
Parameters:
level The maximum level of compression that needs to be supported
prm Additional configuation parameter, unused as of now

Referenced by QDF_temEvtConstruct(), and QDF_temEvtSizeof().

BFU QDF_dgnPedDecode ( QDF_dgnCtx ctx,
QDF_dgnEvt evt,
unsigned int const *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the DGN.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The compressed data decoding context
evt The DGN 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
Overview
This routine acts as a driver to decode the diagnostic contributions of pedestal events.
Details
For the purposes of data compression, the diagnostic contribution is viewed as being composed of 3 separate data structures
  • The CAL LO and CAL HI trigger bits from each layer
  • The CAL accept bits from each log end
  • The TKR accept bits from each layer

In addition there is a summary structure yielding 3 bit maps indicating which of the above structures have towers that differ from the /e expected values for that particular data structure. For
  • The CAL LO and CAL HI trigger bits, the map indicates which tower's diagnostic contribution differs from the equivalent map given by the GEM data. This can differ in two ways, either
    • The GEM map indicates that the tower has non-zero diagnostic trigger bits, but the diagnostic data is all zero, or
    • The GEM map indicates that the tower has all zero diagnostic trigger bits, but is in fact non-zero.

  • The CAL accept bits, the map indicates which towers have non-zero diagnostic log accept bits. Note that the CAL data cannot be used to provide a template of the expected log accept bits in the case of pedestal data. This is because all logs are present, independent of whether their ADC value is above threshold or not.

  • The TKR accept map, the map indicates which tower's diagnostic contribution differs from the equivalent map formed from the TKR data accept bits. In this case, each tower's layer accept map can be used as a template for the expected value of the equivalent bits in the TKR's diagnostic data.

References _QDF_dgnTkrDat::accept, _QDF_dgnCalDat::accept, _QDF_dgnPedEvt::cal, _QDF_dgnDat::cal, _QDF_errEvt::cal_map, _QDF_maps::calHiLo, _QDF_maps::ctids, _QDF_dgnEvt::dat, _QDF_esbEvt::dgn_ids, dgn_ped_cal_accept_decode(), _QDF_dgnHdrEvt::err, _QDF_dgnHdrEvt::esb, _QDF_dgnPedEvt::gem, _QDF_dgnPedEvt::hdr, _QDF_dgnStdEvt::hdr, _QDF_tkrEvt::map, _QDF_dgnEvt::ped, QDF_dgn_gen_cal_trg_decode(), QDF_dgn_gen_hdr_decode(), QDF_dgn_gen_tkr_accept_decode(), _QDF_dgnEvt::std, _QDF_dgnDat::tkr, _QDF_dgnStdEvt::tkr, _QDF_errEvt::tkr_map, and _QDF_dgnCalDat::trg.

BFU QDF_dgnStdDecode ( QDF_dgnCtx ctx,
QDF_dgnEvt evt,
unsigned int const *  src,
unsigned int  max,
BFU  bfu 
)

Decodes the DGN.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The compressed data decoding context
evt The DGN 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_dgnTkrDat::accept, _QDF_dgnCalDat::accept, _QDF_dgnDat::cal, _QDF_dgnStdEvt::cal, _QDF_errEvt::cal_map, _QDF_maps::calHiLo, _QDF_maps::ctids, _QDF_dgnEvt::dat, _QDF_esbEvt::dgn_ids, dgn_std_cal_accept_decode(), _QDF_dgnHdrEvt::err, _QDF_dgnHdrEvt::esb, _QDF_dgnStdEvt::gem, _QDF_dgnStdEvt::hdr, _QDF_tkrEvt::map, _QDF_calStdEvt::map, QDF_dgn_gen_cal_trg_decode(), QDF_dgn_gen_hdr_decode(), QDF_dgn_gen_tkr_accept_decode(), _QDF_dgnEvt::std, _QDF_dgnDat::tkr, _QDF_dgnStdEvt::tkr, _QDF_errEvt::tkr_map, and _QDF_dgnCalDat::trg.


Generated on Thu Sep 27 16:44:50 2012 by  doxygen 1.5.8