GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSE / V2-0-2 > lsew / rad750
#include "LDT/RLE.h"
#include "LDT/BFP.h"
Classes | |
struct | _CDF_dgn_maps_s |
union | _CDF_dgn_maps |
struct | _CDF_dgn_gen_tkr |
struct | _CDF_dgn_gen_tkr_cfg |
struct | _CDF_dgn_std_cal_cfg |
struct | _CDF_dgn_std_cal_twr |
struct | _CDF_dgn_std_cal |
struct | _CDF_dgn_std_tkr_cfg |
struct | _CDF_dgn_std_tkr |
struct | _CDF_dgn_std_cfg |
struct | _CDF_dgn_std |
All the stuff about statistics used for doing DGN compresssion. More... | |
struct | _CDF_dgn_ped_cal_cfg |
Structure to hold any configuration information needed by the diagnostic compress for the CAL pedestals. This is currently just a placeholder. More... | |
struct | _CDF_dgn_ped_cal_twr |
struct | _CDF_dgn_ped_cal |
struct | _CDF_dgn_ped_tkr_cfg |
struct | _CDF_dgn_ped_tkr |
struct | _CDF_dgn_ped_cfg |
struct | _CDF_dgn_ped |
DGN compresssion pedestal compression context. More... | |
struct | _CDF_dgnCfg |
struct | _CDF_dgn |
Binds the diangostic contexts together. More... | |
Defines | |
#define | PACK_CALDGNMAP(_dgnsp0, _dgnsp1, _dgnsp2,_dgnsn0, _dgnsn1, _dgnsn2,_trgs,_dgns) |
Packs the 192 accept bits, 96 from each log end, and the 32 trigger bits, 16 CAL LO and 16 CAL HI, in the 12 CAL diagnostic words into
| |
Typedefs | |
typedef struct _EBF_dir | EBF_dir |
typedef struct _EBF_dirCtbDsc | EBF_dirCtbDsc |
typedef struct _EBF_dirAuxDsc | EBF_dirAuxDsc |
typedef union _CDF_dgn_maps | CDF_dgn_maps |
typedef struct _CDF_dgn_gen_tkr | CDF_dgn_gen_tkr |
typedef struct _CDF_dgn_gen_tkr_cfg | CDF_dgn_gen_tkr_cfg |
typedef struct _CDF_dgn_std_cal_cfg | CDF_dgn_std_cal_cfg |
typedef struct _CDF_dgn_std_cal_twr | CDF_dgn_std_cal_twr |
typedef struct _CDF_dgn_std_cal | CDF_dgn_std_cal |
typedef struct _CDF_dgn_std_tkr_cfg | CDF_dgn_std_tkr_cfg |
typedef struct _CDF_dgn_std_tkr | CDF_dgn_std_tkr |
typedef struct _CDF_dgn_std_cfg | CDF_dgn_std_cfg |
typedef struct _CDF_dgn_std | CDF_dgn_std |
typedef struct _CDF_dgn_ped_cal_cfg | CDF_dgn_ped_cal_cfg |
Typedef for struct _CDF_dgn_ped_cal_cfg. | |
typedef struct _CDF_dgn_ped_cal_twr | CDF_dgn_ped_cal_twr |
typedef struct _CDF_dgn_ped_cal | CDF_dgn_ped_cal |
typedef struct _CDF_dgn_ped_tkr_cfg | CDF_dgn_ped_tkr_cfg |
typedef struct _CDF_dgn_ped_tkr | CDF_dgn_ped_tkr |
typedef struct _CDF_dgn_ped_cfg | CDF_dgn_ped_cfg |
typedef struct _CDF_dgn_ped | CDF_dgn_ped |
Typedef for struct _CDF_dgn_ped. | |
typedef struct _CDF_dgnCfg | CDF_dgnCfg |
typedef struct _CDF_dgn | CDF_dgn |
Typedef for struct _CDF_dgn. | |
Functions | |
unsigned long long int | CDF_dgn_cal_tkr_nonempty_find (const unsigned int **dgns_p, unsigned int map, const EBF_dirCtbDsc *dscs, const EBF_dirAuxDsc *auxs) |
Compose a list of non-empty CAL and TKR diagnostic blocks. | |
unsigned int | CDF_dgn_gen_header_compress (unsigned int *buf, unsigned int pos, unsigned int xCalHiLo, unsigned int xCtids) |
Encodes the tower summary indicating which
| |
unsigned int | CDF_dgn_gen_trg_compress (unsigned int *buf, unsigned int pos, const unsigned int *trgs, int cnt) |
Encodes the CAL log trigger diagnostic trigger data for all towers. This is a generic routine that can be used for both standard physics and pedestal evetns. | |
unsigned int | CDF_dgn_gen_tkr_compress (CDF_dgn_gen_tkr *cdf, unsigned int *buf, unsigned int pos, unsigned int const **dgns, const EBF_dir *dir, unsigned int map, unsigned int err_ids) |
unsigned int | CDF_dgn_ped_cal_prepare (CDF_dgn_ped_cal *cdf, unsigned int map, unsigned int amap, unsigned int emap, const unsigned **dgns, const EBF_dirCtbDsc *dscs) |
Prepares the cal diagnostic data for compression. | |
unsigned int | CDF_dgn_std_cal_prepare (CDF_dgn_std_cal *cdf, unsigned int map, unsigned int amap, unsigned int emap, const unsigned **dgns, const EBF_dirCtbDsc *dscs) |
Prepares the cal diagnostic data for compression. | |
static __inline unsigned int | rearrangeCalTriggers (unsigned int trgs) |
static __inline unsigned int | dgn_cal_trg_extract (const unsigned int *dgns) |
static __inline unsigned int | rle_encode32 (unsigned int *buf, unsigned int pos, unsigned int word) |
static __inline unsigned int | rle_encode16 (unsigned int *buf, unsigned int pos, unsigned short int word) |
static __inline int | CDF_dgn_gen_tkr_construct (CDF_dgn_gen_tkr *cdf, int level, const CDF_dgn_gen_tkr_cfg *cfg, const LSEW_dgmFw *dgmFw, void **mem) |
Constructs the TKR generic diagnostic compression context. |
CVS $Id: CDF_dgn_def.h,v 1.2 2009/04/30 18:24:39 russell Exp $
#define PACK_CALDGNMAP | ( | _dgnsp0, | |||
_dgnsp1, | |||||
_dgnsp2, | |||||
_dgnsn0, | |||||
_dgnsn1, | |||||
_dgnsn2, | |||||
_trgs, | |||||
_dgns | ) |
Packs the 192 accept bits, 96 from each log end, and the 32 trigger bits, 16 CAL LO and 16 CAL HI, in the 12 CAL diagnostic words into
_dgnsp0 | The first 32 accept bits from the positive log end | |
_dgnsp1 | The second 32 accept bits from the positive log end | |
_dgnsp2 | The third 32 accept bits from the positive log end | |
_dgnsn0 | The first 32 accept bits from the negative log end | |
_dgnsn1 | The second 32 accept bits from the negative log end | |
_dgnsn2 | The third 32 accept bits from the negative log end | |
_trgs | The CAL HI trigger bits in the upper 16 bits and the CAL LO trigger bits in the lower 16 bits. | |
_dgns | The 12 CAL diagnostic 32-bit words |
unsigned int CDF_dgn_gen_header_compress | ( | unsigned int * | buf, | |
unsigned int | pos, | |||
unsigned int | xCalHiLo, | |||
unsigned int | xCtids | |||
) |
Encodes the tower summary indicating which
buf | The output buffer | |
pos | The bit index | |
xCalHiLo | Bit mask of the non-matching CAL HI and CAL LO towers | |
xCtids | Bit mask of the non-matching CAL and TKR towers |
The number of the mismatches depends on the quantity
The encoding attempts to take advantage of these statistics. It treats the incoming data as three values
0 - all zero 10 - CAL ids zero, xCaLHiLo zero, TKR ids non-zero 110 - CAL ids zero, xCalHiLo nonzero, TKR_ids zero 1110 - CAL ids zero, xCalHiLo nonzero, TKR_ids nonzero 1111xx - CAL ids nonzero, xx gives non zero status
int CDF_dgn_gen_tkr_construct | ( | CDF_dgn_gen_tkr * | cdf, | |
int | level, | |||
const CDF_dgn_gen_tkr_cfg * | cfg, | |||
const LSEW_dgmFw * | dgmFw, | |||
void ** | mem | |||
) | [static] |
Constructs the TKR generic diagnostic compression context.
cdf | The TKR generic diagnostic compression context to construct | |
level | The compression level | |
cfg | The TKR generic diagnostic compression configuration information. Currently this is unused, but is provided for future usage if necessary. | |
dgmFw | The datagram framework. This would be used if the compression of the TKR generic diagnostic data needed to store any context information in the datagram header. | |
mem | A pointer to the memory to allocate any variable length structures the CDF_dgn_gen_tkr context may need. Currently there are none. If this pointer is the same as cdf, the memory pointer is advanced by the size of the CDF_dgn_gen_tkr structure before allocating any new memory. This routine updates the memory pointer to the next available address. |
unsigned int CDF_dgn_gen_trg_compress | ( | unsigned int * | buf, | |
unsigned int | pos, | |||
const unsigned int * | trgs, | |||
int | cnt | |||
) |
Encodes the CAL log trigger diagnostic trigger data for all towers. This is a generic routine that can be used for both standard physics and pedestal evetns.
buf | The output bit buffer | |
pos | The output bit index | |
trgs | The array of prepared trigger data for the list of towers with non-empty trigger data. | |
cnt | The count of dgn |
unsigned int CDF_dgn_ped_cal_prepare | ( | CDF_dgn_ped_cal * | cdf, | |
unsigned int | map, | |||
unsigned int | amap, | |||
unsigned int | emap, | |||
const unsigned ** | dgns, | |||
const EBF_dirCtbDsc * | dscs | |||
) |
Prepares the cal diagnostic data for compression.
cdf | The context for CAL standard diagnostics | |
map | A left justified map indicating which towers have a CAL contribution. | |
amap | A left justified map indicating which towers have only an accept contribution. | |
emap | A left justified map of towers with errors | |
dgns | An array of pointers, indexed by tower number, giving the address of that tower's diagnostic block. | |
dscs | The array of pointers to the tower contribution descriptors. |
unsigned int CDF_dgn_std_cal_prepare | ( | CDF_dgn_std_cal * | cdf, | |
unsigned int | map, | |||
unsigned int | amap, | |||
unsigned int | emap, | |||
const unsigned ** | dgns, | |||
const EBF_dirCtbDsc * | dscs | |||
) |
Prepares the cal diagnostic data for compression.
cdf | The context for CAL standard diagnostics | |
map | A left justified map indicating which towers have a CAL diagnostic contribution, either TRG or ACCEPT | |
amap | A left justified map indicating which towers have a non-empty accept contribution. | |
emap | A left justified map of towers with errors | |
dgns | An array of pointers, indexed by tower number, giving the address of that tower's diagnostic block. | |
dscs | The array of pointers to the tower contribution descriptors. |