GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEC / V3-2-0 > qsec / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSEC_ctx.h File Reference

Context data for charge injection calibration events. More...

#include "PBI/Endianness.h"
#include "LSF/LSF.h"
#include "LSF/LSF_ids.h"
#include <stdio.h>

Classes

struct  _QSEC_channel
 Channel masking used to collect these events. More...
struct  _QSEC_acd
 ACD specific context. More...
struct  _QSEC_cal
 Calorimeter specific context. More...
struct  _QSEC_tkr
 Tracker specific context. More...
union  _QSEC_specific
 Union of the context specific to each calibration mode. More...
struct  _QSEC_global
 Context of the calibration common to all modes. More...
struct  _QSEC_ctx
 Structure defining the complete calibration context. More...
struct  _QSEC_acd_v0
 ACD specific context. More...
struct  _QSEC_cal_v0
 Calorimeter specific context. More...
struct  _QSEC_tkr_v0
 Tracker specific context. More...
union  _QSEC_specific_v0
 Union of the context specific to each calibration mode. More...
struct  _QSEC_global_v0
 Context of the calibration common to all modes. More...
struct  _QSEC_ctx_v0
 Structure defining the complete calibration context. More...

Defines

#define QSEC_ID(_id)   (LSF_ID_K_LSEC | (_id))
 Macro applying the QSEC offset to an ID.

Typedefs

typedef struct
_QSEC_channel 
QSEC_channel
 Channel masking used to collect these events.
typedef struct _QSEC_acd QSEC_acd
 ACD specific context.
typedef struct _QSEC_cal QSEC_cal
 Calorimeter specific context.
typedef struct _QSEC_tkr QSEC_tkr
 Tracker specific context.
typedef union
_QSEC_specific 
QSEC_specific
 Union of the context specific to each calibration mode.
typedef struct
_QSEC_global 
QSEC_global
 Context of the calibration common to all modes.
typedef struct _QSEC_ctx QSEC_ctx
 Structure defining the complete calibration context.
typedef struct
_QSEC_acd_v0 
QSEC_acd_v0
 ACD specific context.
typedef struct
_QSEC_cal_v0 
QSEC_cal_v0
 Calorimeter specific context.
typedef struct
_QSEC_tkr_v0 
QSEC_tkr_v0
 Tracker specific context.
typedef union
_QSEC_specific_v0 
QSEC_specific_v0
 Union of the context specific to each calibration mode.
typedef struct
_QSEC_global_v0 
QSEC_global_v0
 Context of the calibration common to all modes.
typedef struct
_QSEC_ctx_v0 
QSEC_ctx_v0
 Structure defining the complete calibration context.

Enumerations

enum  { QSEC_CTX_VERSION = 1 }
 Current context version.
enum  {
  QSEC_ID_ETX_FULL = QSEC_ID (1),
  QSEC_ID_ETX_ABBREVIATED = QSEC_ID (2),
  QSEC_ID_TIM_FULL = QSEC_ID (3),
  QSEC_ID_TIM_ABBREVIATED = QSEC_ID (4),
  QSEC_ID_CALIB_ACD = QSEC_ID (8),
  QSEC_ID_CALIB_ACD_CTX = QSEC_ID (9),
  QSEC_ID_CALIB_CAL = QSEC_ID (11),
  QSEC_ID_CALIB_CAL_CTX = QSEC_ID (12),
  QSEC_ID_CALIB_TKR = QSEC_ID (14),
  QSEC_ID_CALIB_TKR_CTX = QSEC_ID (15),
  QSEC_ID_CALIB_TKR_EVT = 0,
  QSEC_ID_CALIB_RAW_EVT = 1,
  QSEC_ID_CALIB_CMP_EVT = 2,
  QSEC_ID_CALIB_ACD_EVT = 10,
  QSEC_ID_CALIB_CAL_EVT = 13
}
 Contribution ID definitions. More...
enum  {
  QSEC_MODE_NONE = 0,
  QSEC_MODE_ACD = 1,
  QSEC_MODE_CAL = 2,
  QSEC_MODE_TKR = 3
}
 Possible calibration modes.
enum  {
  QSEC_CHANNEL_SINGLE = 0,
  QSEC_CHANNEL_ALL = 1,
  QSEC_CHANNEL_PER_FE = 2,
  QSEC_CHANNEL_LATC = 3
}
 Flags indicating the meaning of the associated channel number.
enum  {
  QSEC_N_TWR = 16,
  QSEC_N_CAL_RNG = 4,
  QSEC_N_CAL_LAY = 8,
  QSEC_N_CAL_COL = 12,
  QSEC_N_CAL_END = 2
}
 Enumerations used in the layout of the structures that follow.

Functions

size_t QSEC_sizeofCtx (void)
 Return the size of the QSEC context structure.
QSEC_ctxQSEC_constructCtx (void *buffer)
 Construct a QSEC_ctx structure in the memory provided.
QSEC_ctxQSEC_allocCtx (void)
 Allocate memory for a QSEC_ctx structure and construct it as such.
void QSEC_destructCtx (QSEC_ctx *ctx)
 Release resources associated with the QSEC_ctx structure.
void QSEC_reportCtx (const QSEC_ctx *ctx, FILE *fp)
 Write a formatted ASCII description of the contents of the context to the file fp.
const unsigned int * QSEC_recoverCtx (QSEC_ctx *ctx, const unsigned int *buf)
 Copy the context information from the buffer.


Detailed Description

Context data for charge injection calibration events.

Author:
James Swain & Owen Saxton
Id

Enumeration Type Documentation

anonymous enum

Contribution ID definitions.

Enumerator:
QSEC_ID_ETX_FULL  ID for LSEP full event context contribution, ie a LSE_etxFull.
QSEC_ID_ETX_ABBREVIATED  ID for LSEP abbreviated event context contribution, ie an LSF_etxAbbreviated contribution.
QSEC_ID_TIM_FULL  ID for LSEP full time contribution, ie a LSE_timFull.
QSEC_ID_TIM_ABBREVIATED  ID for LSEP abbreviated time contribution, ie a LSE_timAbbreviated.
QSEC_ID_CALIB_ACD  ID for ACD calibration event 0 contributions.
QSEC_ID_CALIB_ACD_CTX  ID for ACD calibration context contributions.
QSEC_ID_CALIB_CAL  ID for CAL calibration event 0 contributions.
QSEC_ID_CALIB_CAL_CTX  ID for CAL calibration context contributions.
QSEC_ID_CALIB_TKR  ID for TKR calibration event 0 contributions.
QSEC_ID_CALIB_TKR_CTX  ID for TKR calibration context contributions.
QSEC_ID_CALIB_TKR_EVT  ID for old-style TKR event.
QSEC_ID_CALIB_RAW_EVT  ID for raw event.
QSEC_ID_CALIB_CMP_EVT  ID for compressed event.
QSEC_ID_CALIB_ACD_EVT  ID for old-style ACD event.
QSEC_ID_CALIB_CAL_EVT  ID for old-style CAL event.


Function Documentation

QSEC_ctx* QSEC_allocCtx ( void   ) 

Allocate memory for a QSEC_ctx structure and construct it as such.

Returns:
Allocated QSEC_ctx structure

QSEC_ctx* QSEC_constructCtx ( void *  buffer  ) 

Construct a QSEC_ctx structure in the memory provided.

Parameters:
buffer block of memory to use for the QSEC_ctx structure
Returns:
Pointer to an initialised QSEC_ctx structure

void QSEC_destructCtx ( QSEC_ctx ctx  ) 

Release resources associated with the QSEC_ctx structure.

Parameters:
ctx Pointer to a QSEC_ctx structure created using QSEC_allocCtx()

const unsigned int* QSEC_recoverCtx ( QSEC_ctx ctx,
const unsigned int *  buf 
)

Copy the context information from the buffer.

This routine must be able to deal with previous versions of the context information and fill in any new fields appropriately.

Parameters:
ctx Pointer to a context structure
buf Pointer to the context data
Returns:
Pointer to the next word in the contribution, or NULL if the context version or mode is unrecognized

void QSEC_reportCtx ( const QSEC_ctx ctx,
FILE *  fp 
)

Write a formatted ASCII description of the contents of the context to the file fp.

Parameters:
ctx Pointer to a context structure
fp Pointer to the output file

size_t QSEC_sizeofCtx ( void   ) 

Return the size of the QSEC context structure.

Returns:
Size of memory block required to accomodate the QSEC_ctx structure


Generated on Thu May 27 13:59:21 2010 by  doxygen 1.5.3