GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V6-1-0 > lsec / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

compact.h File Reference

Definitions for the compaction implementation. More...

#include "EDS/EBF_dir.h"

Typedefs

typedef struct
LSEC_compaction_ 
LSEC_compaction
 Declaration of the opaque compaction structure.

Functions

void LSEC_calculateCalMeans (LSEC_compaction *cpc)
 Calculate the mean value for each CAL log end.
unsigned LSEC_checkCompaction (LSEC_compaction *cpc)
 Check the substructures for errors.
void LSEC_clearCompaction (LSEC_compaction *cpc)
 Clear away any context from a previous cycle.
unsigned int * LSEC_consignEvt (LSEC_compaction *cpc, unsigned int *buf)
 Copy a single encoded event into the datagram.
unsigned int * LSEC_consignUser (LSEC_compaction *cpc, unsigned int *buf)
 Pack the tables against which the events will be encoded into the buffer.
void LSEC_deleteCompaction (LSEC_compaction *cpc)
 Free memory previously allocated with a call to LSEC_newCompaction.
unsigned LSEC_encode (LSEC_compaction *cpc, EBF_dir *dir)
 Encode the next event from the collection.
void LSEC_getTimes (LSEC_compaction *cpc, int clear, long long *clr_time, long long *hcm_time, long long *hst_time, long long *enc_time, long long *csu_time, long long *cns_time)
 Get the processing times for the various compaction stages.
void LSEC_histogramAcd (LSEC_compaction *cpc, EBF_dir *dir)
 Perform histogramming for ACD calibration.
void LSEC_histogramCal (LSEC_compaction *cpc, EBF_dir *dir)
 Perform histogramming for CAL calibration.
void LSEC_histogramCalMeans (LSEC_compaction *cpc, EBF_dir *dir)
 Obtain the means of the CAL log values.
void LSEC_histogramTkr (LSEC_compaction *cpc, EBF_dir *dir)
 Perform histogramming for TKR calibration.
unsigned LSEC_monitorCompaction (LSEC_compaction *cpc, unsigned mon)
 Set the monitoring level for the compaction.
LSEC_compactionLSEC_newCompaction (unsigned cap)
 Allocate memory for an LSEC_compaction structure and all the substructures.
unsigned LSEC_processAcd (LSEC_compaction *cpc)
 Process ACD compaction data.
unsigned LSEC_processCal (LSEC_compaction *cpc)
 Process the CAL compression structures.
unsigned LSEC_processTkr (LSEC_compaction *cpc)
 Process the TKR compression structures.
void LSEC_setFourRange (LSEC_compaction *cpc, unsigned range)
 Set the four-range value.
void LSEC_setMode (LSEC_compaction *cpc, unsigned mode)
 Set the calibration mode.
unsigned LSEC_sizeofUser32 (LSEC_compaction *cpc)
 Calculate the number of 32-bit words required to hold tables against which the events will be encoded.


Detailed Description

Definitions for the compaction implementation.

Author:
James Swain & Owen Saxton
Id

Function Documentation

void LSEC_calculateCalMeans ( LSEC_compaction cpc  ) 

Calculate the mean value for each CAL log end.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_checkCompaction ( LSEC_compaction cpc  ) 

Check the substructures for errors.

Parameters:
cpc Pointer to a compaction object
Returns:
The last error from the first substrcture to be found in error or LSEC_SUCCESS if there are no errors.

void LSEC_clearCompaction ( LSEC_compaction cpc  ) 

Clear away any context from a previous cycle.

Parameters:
cpc Pointer to a compaction object

unsigned int* LSEC_consignEvt ( LSEC_compaction cpc,
unsigned int *  buf 
)

Copy a single encoded event into the datagram.

Parameters:
cpc Pointer to the compaction structure holding the encoded event
buf Pointer to the location to place the encoded event
Returns:
Pointer to the next output location

unsigned int* LSEC_consignUser ( LSEC_compaction cpc,
unsigned int *  buf 
)

Pack the tables against which the events will be encoded into the buffer.

Parameters:
buf Pointer to the buffer where the context should be placed.
cpc Pointer to the structure containing the tables (a compaction)
Returns:
Pointer to the next output location to be filled.

void LSEC_deleteCompaction ( LSEC_compaction cpc  ) 

Free memory previously allocated with a call to LSEC_newCompaction.

Parameters:
cpc Pointer to a compaction structure previously created by a call to LSEC_newCompaction

unsigned LSEC_encode ( LSEC_compaction cpc,
EBF_dir *  dir 
)

Encode the next event from the collection.

Parameters:
cpc Pointer to an LSEC_compaction structure
dir Pointer to the event to encode
Returns:
Size of the compressed event, or 0 if there is an error

void LSEC_getTimes ( LSEC_compaction cpc,
int  clear,
long long *  clr_time,
long long *  hcm_time,
long long *  hst_time,
long long *  enc_time,
long long *  csu_time,
long long *  cns_time 
)

Get the processing times for the various compaction stages.

This routine returns eight different processing times associated with the compaction of the event data. If any of these times is not needed, its receiving address may be specified as NULL.

Parameters:
cpc Pointer to an initialised compaction
clear TRUE if the times are to be cleared after being copied.
clr_time The address of a variable to receive the accumulated time taken to clear compaction data.
hcm_time The address of a variable to receive the accumulated time taken to process CAL means histograms.
hst_time The address of a variable to receive the accumulated time taken to process data histograms.
enc_time The address of a variable to receive the accumulated time taken to encode the data.
csu_time The address of a variable to receive the accumulated time taken to consign the user context data.
cns_time The address of a variable to receive the accumulated time taken to consign the event data.
Returns:
The previous monitoring level.

void LSEC_histogramAcd ( LSEC_compaction cpc,
EBF_dir *  dir 
)

Perform histogramming for ACD calibration.

Parameters:
cpc Compaction structure
dir Pointer to a directory of the event

void LSEC_histogramCal ( LSEC_compaction cpc,
EBF_dir *  dir 
)

Perform histogramming for CAL calibration.

Parameters:
cpc Compaction structure
dir Pointer to a directory of the event

void LSEC_histogramCalMeans ( LSEC_compaction cpc,
EBF_dir *  dir 
)

Obtain the means of the CAL log values.

Parameters:
cpc Compaction structure
dir Pointer to the event to analyse

void LSEC_histogramTkr ( LSEC_compaction cpc,
EBF_dir *  dir 
)

Perform histogramming for TKR calibration.

Parameters:
cpc Compaction structure
dir Pointer to a directory of the event

unsigned LSEC_monitorCompaction ( LSEC_compaction cpc,
unsigned  mon 
)

Set the monitoring level for the compaction.

Parameters:
cpc Pointer to an initialised compaction
mon Monitoring level to set
Returns:
The previous monitoring level.

LSEC_compaction* LSEC_newCompaction ( unsigned  cap  ) 

Allocate memory for an LSEC_compaction structure and all the substructures.

Parameters:
cap Capacity of the calibration task, the maximum number of events that can be collected each cycle
Returns:
Pointer to an allocated, initialise, LSEC_compaction structure

unsigned LSEC_processAcd ( LSEC_compaction cpc  ) 

Process ACD compaction data.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_processCal ( LSEC_compaction cpc  ) 

Process the CAL compression structures.

Parameters:
cpc Pointer to an LSEC_compaction structure

unsigned LSEC_processTkr ( LSEC_compaction cpc  ) 

Process the TKR compression structures.

Parameters:
cpc Pointer to an LSEC_compaction structure

void LSEC_setFourRange ( LSEC_compaction cpc,
unsigned  range 
)

Set the four-range value.

Parameters:
cpc Pointer to a compaction structure
range Flag indicating 4-range or auto-range

void LSEC_setMode ( LSEC_compaction cpc,
unsigned  mode 
)

Set the calibration mode.

Parameters:
cpc Pointer to a compaction structure
mode The calibration mode

unsigned LSEC_sizeofUser32 ( LSEC_compaction cpc  ) 

Calculate the number of 32-bit words required to hold tables against which the events will be encoded.

Parameters:
cpc Pointer to the compaction structure
Returns:
Number of 32-bit words required to hold the context information


Generated on Thu Aug 20 14:34:11 2009 by  doxygen 1.5.3