GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-4-0
Constituent: qseprint     Tag: linux-gcc
#include "QSE/QSE_map.h"
#include "QSE/QSE_calLog.h"
#include "PBI/Endianness.h"
Include dependency graph for QSE_cal.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _QSE_calTwr |
Structure containing the unpacked CAL data for this tower. More... | |
struct | _QSE_cal |
Structure containing the unpacked CAL data for all towers. More... | |
Defines | |
#define | QSE_CALTWRMAP_0 0x0001 |
The value of a QSE_calTwrMap with TWR 0 set. | |
#define | QSE_CALLYRMAP_0 0x01 |
The value of a QSE_calLyrMap with Layer 0 set. | |
#define | QSE_CALCOLMAP_0 0x0001 |
The value of a QSE_calColMap with Column 0 set. | |
Typedefs | |
typedef unsigned short int | QSE_calTwrMap |
Abstract typedef for a CAL tower map. | |
typedef unsigned short int | QSE_calColMap |
Abstract typedef for a CAL column map. | |
typedef unsigned char | QSE_calLyrMap |
Abstract typedef for a CAL layer map. | |
typedef enum _QSE_CALFLAGS_V | QSE_CALFLAGS_V |
Typedef for enum _QSE_CALFLAGS_V. | |
typedef enum _QSE_CALFLAGS_M | QSE_CALFLAGS_M |
Typedef for enum _QSE_CALFLAGS_M. | |
typedef _QSE_calTwr | QSE_calTwr |
Typedef for struct _QSE_calTwr. | |
typedef _QSE_cal | QSE_cal |
Typedef for struct _QSE_cal. | |
Enumerations | |
enum | _QSE_CALFLAGS_V { QSE_CALFLAGS_V_4RNG = 0, QSE_CALFLAGS_V_NOSUPPRESS = 1 } |
Enumeration/definition of the bit offsets to the 4 range and 0-suppress flags, right justified bit offsets. More... | |
enum | _QSE_CALFLAGS_M { QSE_CALFLAGS_M_4RNG = 1 << QSE_CALFLAGS_V_4RNG, QSE_CALFLAGS_M_NOSUPPRESS = 1 << QSE_CALFLAGS_V_NOSUPPRESS } |
Enumeration/definition of the bit offsets to the 4 range and 0-suppress flags, in place masks. More... | |
Functions | |
static __inline QSE_map | QSE_calTwrMapGet (const QSE_cal *cal) |
Returns a properly justified version of the tower map. | |
static __inline QSE_map | QSE_calLyrMapGet (const QSE_calTwr *twr) |
Returns a properly justified version of a tower's layer map. | |
static __inline QSE_map | QSE_calColMapGet (const QSE_calColMap *map) |
Returns a properly justified version of the tower map. | |
static __inline unsigned int | QSE_calTwrMask (int num) |
Converts the indicated tower number to a mask. | |
static __inline unsigned int | QSE_calLyrMask (int num) |
Converts the indicated layer number to a mask. | |
static __inline unsigned int | QSE_calColMask (int num) |
Converts the indicated layer number to a mask. | |
static __inline QSE_calTwrMap | QSE_calTwrMapInsert (QSE_calTwrMap map, int num) |
Returns the tower map with the new tower number inserted. | |
static __inline QSE_calLyrMap | QSE_calLyrMapInsert (QSE_calLyrMap map, int num) |
Returns the layer map with the new layer number inserted. | |
static __inline QSE_calColMap | QSE_calColMapInsert (QSE_calColMap map, int num) |
Returns the column map with the new column number inserted. | |
static __inline int | QSE_calFlagsIs4Rng (unsigned int flags) |
Returns a non-zero value if the flags indicate the readout mode is 4-range. | |
static __inline int | QSE_calFlagsIsNoSuppress (unsigned int flags) |
Returns a non-zero value if the flags indicate the readout mode is not zero suppression. |
CVS $Id: QSE_cal.h,v 1.3 2005/11/18 01:32:31 russell Exp $
|
The value of a QSE_calColMap with Column 0 set.
|
|
The value of a QSE_calLyrMap with Layer 0 set.
|
|
The value of a QSE_calTwrMap with TWR 0 set.
|
|
Typedef for struct _QSE_cal.
void cal_print (const QSE_cal *cal) { QSE_map twrMap = QSE_calTwrMapGet (cal); const QSE_calTwr *twrs = cal->twrs; / * Loop as long as there are still towers in the tower map * / while (twrMap) { int twrNum; int lyrNum; const QSE_calTwr *twr; const QSE_calLog *logs; / * | Get the next struck layer, | Then eliminate it from the map | Finally locate the relevant CAL tower / twrNum = QSE_mapScanf (twrMap); twrMap = QSE_mapRemove (twrMap, twrNum); twr = twrs + twrNum; lyrCnts = QSE_calLyrCntsGet (twr); logs = twr->logs; for (lyrNum = 0; lyrCnts, lyrNum += 1) { int lyrCnt; lyrCnt = QSE_calLyrCntNext (lyrCnts); lyrCnts = QSE_calLyrCntsEliminate (lyrCnts); while (--lyrCnt >= 0) { printf (" Twr:%1x Lyr:%1x Col:%1x Adc-:%3x Adc+:%3x\n", twrNum, lyrNum, QSE_calLogColGet (log), QSE_calLogAdcNGet (log), QSE_calLogAdcPGet (log)); } } } return; } Alternatively one could use the column maps
void cal_print (const QSE_cal *cal) { QSE_map twrMap = QSE_calTwrMapGet (cal); const QSE_calTwr *twrs = cal->twrs; / * Loop as long as there are still towers in the tower map * / while (twrMap) { int twrNum; const QSE_calTwr *twr; QSE_map lyrMap; const QSE_calLog *logs; const QSE_calColMap *colMaps; / * | Get the next struck layer, | Then eliminate it from the map | Finally locate the relevant CAL tower / twrNum = QSE_mapScanf (twrMap); twrMap = QSE_mapRemove (twrMap, twrNum); twr = twrs + twrNum; / * Get the map of struck layers and the array of hit columns * / lyrMap = QSE_calLyrMapGet (twr); colMaps = twr->colMaps; logs = twr->logs; / * While there are still layers * / while (lyrMap) { int lyrNum = QSE_mapScanf (lyrMap); int lyrCnt = QSE_mapRemove (lyrMap, lyrNum); QSE_map colMap = QSE_calColMapGet (colMaps + lyrNum]); / * While there are still columns * / while (colMaps) { unsigned int colNum = QSE_mapScanf (colMap); unsigned int colMap = QSE_mapEliminate (colMap, colNum); QSE_calLog log = *logs++; printf (" Twr:%1x Lyr:%1x Col:%1x Adc-:%3x Adc+:%3x\n", twrNum, lyrNum, colNum, QSE_calLogAdcNGet (log), QSE_calLogAdcPGet (log)); } } } return; } |
|
Typedef for struct _QSE_calTwr.
|
|
Enumeration/definition of the bit offsets to the 4 range and 0-suppress flags, in place masks.
|
|
Enumeration/definition of the bit offsets to the 4 range and 0-suppress flags, right justified bit offsets.
|
|
Returns a properly justified version of the tower map.
|
|
Returns the column map with the new column number inserted.
|
|
Converts the indicated layer number to a mask.
|
|
Returns a non-zero value if the flags indicate the readout mode is 4-range.
|
|
Returns a non-zero value if the flags indicate the readout mode is not zero suppression.
|
|
Returns a properly justified version of a tower's layer map.
|
|
Returns the layer map with the new layer number inserted.
|
|
Converts the indicated layer number to a mask.
|
|
Returns a properly justified version of the tower map.
|
|
Returns the tower map with the new tower number inserted.
|
|
Converts the indicated tower number to a mask.
|