GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qseprint / linux-gcc
#include <stdio.h>
#include "QSE/QSE_dirPrint.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_evt.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EBF_tem.h"
#include "EDS/EBF_tkr.h"
#include "EDS/EBF_err.h"
Defines | |
#define | BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) |
Computes the number of bits set (1) in 32-bit argument. | |
#define | BX_(x) |
Replaces each 4-bit sequence in arg by the number of bits in sequence. | |
Functions | |
static void | printData (const char *name, const unsigned int *dat, int cnt) |
Simple print routine. | |
static int | tkrLayerEndCount (const EBF_tkr *tkr) |
Counts the number of layer ends with hit strips. | |
static int | tkrStripCount (const EBF_tkr *tkr, int layerEndCnt, int maxwrds) |
Counts the hit strips. | |
static int | tkrLenCalc (const EBF_tkr *tkr, int maxwrds) |
Calculates the number of bytes, not including any padding, in the EBF_tkr record. | |
static __inline int | err_pad_count (const EBF_dirCtbDsc *tem, const unsigned int **err_ptr, int *pad_cnt) |
Calculate the size of the error contribution. | |
void | QSE_dirPrint (const EBF_dir *dir) |
Provides a formatted print out of the contributors in dir. | |
void | QSE_dirCtbAcdPrint (const EBF_dirCtbDsc *acd) |
Provides a formatted print out of the contents of the ACD contribution. | |
void | QSE_dirCtbCalPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a CAL TEM contribution. | |
void | QSE_dirCtbTkrPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a TKR TEM contribution. | |
void | QSE_dirCtbGemPrint (const EBF_dirCtbDsc *gem) |
Provides a formatted print out of the contents of the GEM contribution. | |
void | QSE_dirCtbTemPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a TEM contribution. | |
void | QSE_dirCtbDgnPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a TEM's diagnostic contribution. | |
void | QSE_dirCtbErrPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a TEM's error contribution. | |
void | QSE_dirCtbPadPrint (const EBF_dirCtbDsc *tem) |
Provides a formatted print out of the contents of a TEM's pad contribution. | |
static __inline int | countLayerEnds (const unsigned int accepts[3]) |
Counts the number of layer ends with data in the accept block. |
CVS $Id: QSE_dirPrint.c,v 1.5 2009/10/26 17:22:57 russell Exp $
#define BITCOUNT | ( | x | ) | (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) |
Computes the number of bits set (1) in 32-bit argument.
#define BX_ | ( | x | ) |
Value:
((x) - (((x)>>1)&0x77777777) \ - (((x)>>2)&0x33333333) \ - (((x)>>3)&0x11111111))
int countLayerEnds | ( | const unsigned int | accepts[3] | ) | [static] |
Counts the number of layer ends with data in the accept block.
accepts | The array of the 3 accept words (only 72 bits active) |
static __inline int err_pad_count | ( | const EBF_dirCtbDsc * | tem, | |
const unsigned int ** | err_ptr, | |||
int * | pad_cnt | |||
) | [static] |
Calculate the size of the error contribution.
tem | The TEM contribution descriptor | |
err_ptr | Returned as the pointer to the error contribution | |
pad_cnt | The number of 32-bit words in the pad block
|
void printData | ( | const char * | name, | |
const unsigned int * | dat, | |||
int | cnt | |||
) | [static] |
Simple print routine.
name | The contributor's name | |
dat | The contributor's data | |
cnt | The length of the data section in words |
void QSE_dirCtbAcdPrint | ( | const EBF_dirCtbDsc * | acd | ) |
Provides a formatted print out of the contents of the ACD contribution.
acd | Pointer to the ACD contributor descriptor |
void QSE_dirCtbCalPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a CAL TEM contribution.
tem | Pointer to the TEM contributor descriptor containing the CAL record to be printed |
void QSE_dirCtbDgnPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a TEM's diagnostic contribution.
tem | Pointer to the TEM contributor descriptor containing the diagnostic data to be printed. |
void QSE_dirCtbErrPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a TEM's error contribution.
tem | Pointer to the TEM contributor descriptor containing the error data to be printed. |
void QSE_dirCtbGemPrint | ( | const EBF_dirCtbDsc * | gem | ) |
Provides a formatted print out of the contents of the GEM contribution.
gem | A pointer to the trigger contributor descriptor. |
void QSE_dirCtbPadPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a TEM's pad contribution.
tem | Pointer to the TEM contributor descriptor containing the pad data to be printed. |
void QSE_dirCtbTemPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a TEM contribution.
tem | Pointer to the TEM contributor descriptor to be printed |
void QSE_dirCtbTkrPrint | ( | const EBF_dirCtbDsc * | tem | ) |
Provides a formatted print out of the contents of a TKR TEM contribution.
tem | Pointer to the TEM contributor descriptor containing the TKR data to be printed |
void QSE_dirPrint | ( | const EBF_dir * | dir | ) |
Provides a formatted print out of the contributors in dir.
dir | The directory for this event |
static int tkrLayerEndCount | ( | const EBF_tkr * | tkr | ) | [static] |
Counts the number of layer ends with hit strips.
tkr | Pointer to the tracker data |
static int tkrLenCalc | ( | const EBF_tkr * | tkr, | |
int | maxwrds | |||
) | [static] |
Calculates the number of bytes, not including any padding, in the EBF_tkr record.
tkr | Pointer to the tracker data | |
maxwrds | The maximum number of words that can possibly be in the EBF_tkr record. This serves as a sanity check in case the serial decode of the record goes haywire. |
static int tkrStripCount | ( | const EBF_tkr * | tkr, | |
int | layerEndCnt, | |||
int | maxwrds | |||
) | [static] |
Counts the hit strips.
tkr | Pointer to the tracker data | |
layerEndCnt | Count of the number hit layer end ends. This is most easily acquired from EBF_tkrLayerEndCount. | |
maxwrds | The maximum number of words in the TKR record. This value is currently not used, but may be used in the future as an integrity check. |