GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSE / V2-1-0 > lsew / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

CDF_acd.c File Reference

Implementation to produce Compressed Data Format for the ACD contributor and the ACD portion of the GEM. More...

#include <LSE/CDF_acd.h>
#include <LSE/CDF_acddef.h>
#include <LSE/LFR_key.h>
#include <LSE/LFR_refdef.h>
#include <LSE/LSE_cdm.h>
#include <CDF_acd_def.h>
#include <EDS/ACD_map.h>
#include <EDS/ECR_acd.h>
#include <EDS/EDA_acd.h>
#include <LDT/HDE.h>
#include <CAL_DB/ACD_DB_schema_pedestals.h>
#include <CDM/CDM_pubdefs.h>
#include <PBI/Fletcher.h>
#include <string.h>
#include <dprintf.h>

Defines

#define acd_pedestals_print(_peds)

Functions

static __inline unsigned int fill_acd_peds (ECR_acd *aem, CDF_acd_pedestals *acd, const ACD_DB_schema_pedestals *peds)
 Fills the ACD pedestals in the GEM defined order.
int CDF_acdCfg_sizeof (int level)
 Returns the size, in bytes of the ACD compression configuration needed to support the specified level.
int CDF_acdCfg_construct (CDF_acdCfg *cfg, int level, void **mem)
 Constructs the CDF_acdCfg compression configuration.
int CDF_acd_sizeof (int level, const CDF_acdCfg *cfg)
 Returns the size, in bytes of the GEM/ACD compression structure needed to support the specified level.
int CDF_acd_construct (CDF_acd *cdf, int level, const CDF_acdCfg *cfg, const LSEW_dgmFw *dgmFw, void **mem)
 Constructs the CDF_acd compression context.
void CDF_acd_begin (CDF_acd *cdf, CDF_acdBdy *bdy)
 Fills int the ACD portion of the datagram contribution used in when decoding an ACD event.


Detailed Description

Implementation to produce Compressed Data Format for the ACD contributor and the ACD portion of the GEM.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: CDF_acd.c,v 1.3 2011/03/26 17:35:23 russell Exp $

The packing of the GEM information is divided into two categories, for physics and non-physiscs event. Each starts with a set of flags

PHYSICS NONPHYSICS 0 PPS is the same as last time PPS is the same as last time 1 Conditions follow primitives Conditions follow primitives 2 No other conditions present 00 = Exception,Periodic,Solicited,Ext 3 CNO == 0 tkrThr = 0 4 calHi == 0 condsumCno = 0 5 calLo == 0 acd = 0, else use list 6 roi == 0 calHiLo == 0 7 tkr == 0

Conditions follow primitive means all the following are true If TKR 3-a-row == 0,non0 then TKR cond == 0,non0 CalHi == 0,non0,then CalHi cond == 0,non0 CalLo == 0,non0,then CalLo cond == 0,non0 CNO == 0,non0,then CNO cond == 0,non0 ROI == 0,non0,then ACD list = all 0, present TKR & ROI == 0,non0,the Thr condition =0, non0


Function Documentation

void CDF_acd_begin ( CDF_acd cdf,
CDF_acdBdy bdy 
)

Fills int the ACD portion of the datagram contribution used in when decoding an ACD event.

Parameters:
cdf The CDF_acd compress context structure
bdy The CDF_acdBdy structure to fill

References _CDF_acd_refs::peds, _CDF_acdBdy::peds, and _CDF_acd::refs.

int CDF_acd_construct ( CDF_acd cdf,
int  level,
const CDF_acdCfg *  cfg,
const LSEW_dgmFw dgmFw,
void **  mem 
)

Constructs the CDF_acd compression context.

Return values:
Status 
Parameters:
cdf The CDF_acd compress context structure to fill
level The maximum compression level that needs to be supported
cfg Target specific configuration parameter
dgmFw The datagram framework handle
mem Pointer to free memory pointer, return as the the updated pointer. If cdf is equal to the current contents of mem, then mem will be advanced by the size of CDF_acd, else this routine will believe that the only the variable allocation of cdf needs to be allocated.

References _CDF_acd::calib, _LFR_ref::cs, _CDF_acd::evt, fill_acd_peds(), _CDF_acd::hde, _CDF_acd_ped_data::hist, _LFR_ref::key, LFR_keyGet(), LSE_cdmFind(), _CDF_acd::peds, _CDF_acd_refs::peds, and _CDF_acd::refs.

int CDF_acd_sizeof ( int  level,
const CDF_acdCfg *  cfg 
)

Returns the size, in bytes of the GEM/ACD compression structure needed to support the specified level.

Parameters:
level The maximum compression level to support
cfg Target specific configuration

int CDF_acdCfg_construct ( CDF_acdCfg *  cfg,
int  level,
void **  mem 
)

Constructs the CDF_acdCfg compression configuration.

Return values:
Status 
Parameters:
cfg Target specific configuration
level The maximum compression level that needs to be supported
mem Pointer to free memory pointer, return as the the updated pointer. If cfg is equal to the current contents of mem, then mem will be advanced by the size of CDF_acdCfg, else this routine will believe that the only the variable allocation of cdf needs to be allocated.

int CDF_acdCfg_sizeof ( int  level  ) 

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

Parameters:
level The maximum compression level to support

static __inline unsigned int fill_acd_peds ( ECR_acd *  aem,
CDF_acd_pedestals acd,
const ACD_DB_schema_pedestals *  peds 
) [static]

Fills the ACD pedestals in the GEM defined order.

Parameters:
aem The ACD pedestals to fill in AEM order
acd The ACD pedestals to fill in GEM order
peds The ACD pedestal schema

References _CDF_acd_pedestals::chns.

Referenced by CDF_acd_construct().


Generated on Thu Aug 4 13:00:07 2011 by  doxygen 1.5.8