GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-4-0

Constituent: qseprint     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSE_calLog.h File Reference

Layout of a QSE_calLog word. More...

#include "PBI/Endianness.h"

Include dependency graph for QSE_calLog.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _QSE_calLog_bf
 Maps out the 32-bit value of a CAL log data field as bit fields. More...
struct  _QSE_calLog_cf
 Maps out the 32-bit value of a CAL log data field as bit fields. This mapping keeps the RNG and ADC value contigious. More...
union  _QSE_calLog
 Maps out the 32-bit value of a CAL log data field both in bit fields and as an unsigned 32-bit integer. More...

Defines

#define QSE_CALLOGCNT_MASK   0x0f0f0f0f
 Value to be supplied as the second argument in QSE__calLogCntM.

Typedefs

typedef enum _QSE_CALOG_S QSE_CALLOG_S
 Typedef for struct _QSE_CALLOG_S.
typedef enum _QSE_CALLOG_V QSE_CALLOG_V
 Typedef for struct _QSE_CALLOG_V.
typedef enum _QSE_CALLOG_M QSE_CALLOG_M
 Typedef for struct _QSE_CALLOG_M.
typedef _QSE_calLog_bf QSE_calLog_bf
 Typedef for struct _QSE_calLogData_bf.
typedef _QSE_calLog_cf QSE_calLog_cf
 Typedef for struct _QSE_calLog_cf.
typedef _QSE_calLog QSE_calLog
 Typedef for union _QSE_calLog.

Enumerations

enum  _QSE_CALLOG_S {
  QSE_CALLOG_S_COL = 4,
  QSE_CALLOG_S_RNGN = 2,
  QSE_CALLOG_S_VALN = 12,
  QSE_CALLOG_S_RNGP = 2,
  QSE_CALLOG_S_VALP = 12
}
 Maps out the sizes of the bit fields for a CAL log data word. More...
enum  _QSE_CALLOG_V {
  QSE_CALLOG_V_COL = 28,
  QSE_CALLOG_V_RNGN = 26,
  QSE_CALLOG_V_VALN = 14,
  QSE_CALLOG_V_RNGP = 12,
  QSE_CALLOG_V_VALP = 0
}
 Maps out the amount need to right justify the bit fields for a CAL log data word. More...
enum  _QSE_CALLOG_M {
  QSE_CALLOG_M_COL = 0xf0000000,
  QSE_CALLOG_M_RNGN = 0x0c000000,
  QSE_CALLOG_M_VALN = 0x03ffc000,
  QSE_CALLOG_M_RNGP = 0x00003000,
  QSE_CALLOG_M_VALP = 0x00000fff
}
 Maps out the in place mask needed to extract the bit fields of a CAL log data word. More...

Functions

static __inline int QSE_calLogColGet (const QSE_calLog log)
 Returns the column number of this CAL log.
static __inline int QSE_calLogRngNGet (const QSE_calLog log)
 Returns the range for the negative end of this CAL log.
static __inline int QSE_calLogValNGet (const QSE_calLog log)
 Returns the ADC value for the negative end of this CAL log.
static __inline int QSE_calLogRngPGet (const QSE_calLog log)
 Returns the range for the positive end of this CAL log.
static __inline int QSE_calLogValPGet (const QSE_calLog log)
 Returns the ADC value for the positive end of this CAL log.
static __inline int QSE_calLogPhaNGet (const QSE_calLog log)
 Returns the PHA value (range + ADC value) for the negative end of this CAL log.
static __inline int QSE_calLogPhaPGet (const QSE_calLog log)
 Returns the PHA value (range + ADC value) for the positive end of this CAL log.
static __inline unsigned char QSE_calLogCntM (unsigned int layerCnts, unsigned int mask)
 Calculates the total number of logs struck in this contributor's CAL record.
static __inline unsigned char QSE_calLogCnt (unsigned int layerCnts)
 Calculates the total number of logs struck in this contributor's CAL record.

Detailed Description

Layout of a QSE_calLog word.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: QSE_calLog.h,v 1.2 2005/11/18 01:32:31 russell Exp $

Calorimeter Data Word
Data structures and enumerations are defined that map out the Calorimeter data word. This word consists of 2 14-bit ADC values and one 4 bit column identifier. The ADC values are further broken down into a 2 bit range field and a 12 bit value field.
The word breakdown is presented both as a series of enumerations, which map the data word up in terms of shifts and masks, and a bit field structure. The user is free to pick the one most convenient and appropriate for his application.

Define Documentation

#define QSE_CALLOGCNT_MASK   0x0f0f0f0f
 

Value to be supplied as the second argument in QSE__calLogCntM.

Exposing the argument in this fashion allows the compiler to optimize it into a register


Typedef Documentation

QSE_calLog
 

Typedef for union _QSE_calLog.

Mapping the CAL log data in this manner allows the programmer to assign a CAL log data value with a simple assignment statement, but then to access the fields using the bit field structure.


Enumeration Type Documentation

enum _QSE_CALLOG_M
 

Maps out the in place mask needed to extract the bit fields of a CAL log data word.

Enumerator:
QSE_CALLOG_M_COL  In place mask, column number
QSE_CALLOG_M_RNGN  In place mask, ADC - range
QSE_CALLOG_M_VALN  In place mask, ADC - value
QSE_CALLOG_M_RNGP  In place mask, ADC + range
QSE_CALLOG_M_VALP  In place mask, ADC + range

enum _QSE_CALLOG_S
 

Maps out the sizes of the bit fields for a CAL log data word.

Enumerator:
QSE_CALLOG_S_COL  Size of column number bit field
QSE_CALLOG_S_RNGN  Size of the ADC - range bit field
QSE_CALLOG_S_VALN  Size of the ADC - value bit field
QSE_CALLOG_S_RNGP  Size of the ADC + range bit field
QSE_CALLOG_S_VALP  Size of the ADC + value bit field

enum _QSE_CALLOG_V
 

Maps out the amount need to right justify the bit fields for a CAL log data word.

Enumerator:
QSE_CALLOG_V_COL  Shift for the column number bit field
QSE_CALLOG_V_RNGN  Shift for the ADC - range bit field
QSE_CALLOG_V_VALN  Shift for the ADC - value bit field
QSE_CALLOG_V_RNGP  Shift for the ADC + range bit field
QSE_CALLOG_V_VALP  Shift for the ADC + value bit field


Function Documentation

static __inline unsigned char QSE_calLogCnt unsigned int  layerCnts  )  [static]
 

Calculates the total number of logs struck in this contributor's CAL record.

Parameters:
layerCnts 8 nibbles representing the number of counts in each of the 8 CAL layers.
Returns:
The total number of logs struck in all layers

static __inline unsigned char QSE_calLogCntM unsigned int  layerCnts,
unsigned int  mask
[static]
 

Calculates the total number of logs struck in this contributor's CAL record.

Parameters:
layerCnts 8 nibbles representing the number of counts in each of the 8 CAL layers.
mask A bit mask with every other nibble being 0 of 0xf. This is really not a parameter, but including allows the compiler to optimize its placement in a register.
See also:
QSE__CALLOGCNT_MASK.
Returns:
The total number of logs struck in all layers

static __inline int QSE_calLogColGet const QSE_calLog  log  )  [static]
 

Returns the column number of this CAL log.

Returns:
The column number of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogPhaNGet const QSE_calLog  log  )  [static]
 

Returns the PHA value (range + ADC value) for the negative end of this CAL log.

Returns:
The PHA value (range + ADC value) for the negative end of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogPhaPGet const QSE_calLog  log  )  [static]
 

Returns the PHA value (range + ADC value) for the positive end of this CAL log.

Returns:
The PHA value (range + ADC value) for the positive end of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogRngNGet const QSE_calLog  log  )  [static]
 

Returns the range for the negative end of this CAL log.

Returns:
The range for the negative end of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogRngPGet const QSE_calLog  log  )  [static]
 

Returns the range for the positive end of this CAL log.

Returns:
The ADC value for the positive end of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogValNGet const QSE_calLog  log  )  [static]
 

Returns the ADC value for the negative end of this CAL log.

Returns:
The ADC value for the negative end of this CAL log
Parameters:
log The target cal log

static __inline int QSE_calLogValPGet const QSE_calLog  log  )  [static]
 

Returns the ADC value for the positive end of this CAL log.

Returns:
The ADC value for the positive end of this CAL log
Parameters:
log The target cal log


Generated on Thu Sep 14 08:28:25 2006 by  doxygen 1.4.4