GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > edsprint / rhel5-64
#include <stdio.h>
#include <EDS/EDR_tkrPrint.h>
#include <EDS/EDR_tkr.h>
#include <PBI/FFS.ih>
Classes | |
struct | _PrintCtx |
A structure controlling the cluster to be printed. More... | |
Typedefs | |
typedef struct _PrintCtx | PrintCtx |
Typedef for struct _PrintCtx. | |
typedef int(* | Print )(PrintCtx *ctx, int cur, int max) |
Routine to do the actual printing. | |
Functions | |
static void | printTower (const EDR_tkrTower *ttr, Print print) |
Prints an ASCII display of the tracker data from the TKR Tower Record (ttr). | |
static void | printLayer (const EDR_tkrLayer *x, const EDR_tkrLayer *y, int layer, Print print) |
Prints an ASCII display of hits strips. | |
static int | printTots (int left, int hiLo, const unsigned char *tots) |
Prints an ASCII display of the TOTs. | |
static int | printClusters (PrintCtx *ctx, int cur, int max) |
Callback routine to print the corrected strips as a cluster. | |
static int | printUClusters (PrintCtx *ctx, int cur, int max) |
Callback routine to print the uncorrected strips as a cluster. | |
static int | printStrips (PrintCtx *ctx, int cur, int max) |
Callback routine to print the corrected strips as individual strips. | |
static int | printUStrips (PrintCtx *ctx, int cur, int max) |
Callback routine to print the uncorrected strips as a cluster. | |
void | EDR_tkrPrint (const EDR_tkr *tlr, unsigned int options) |
Prints an ASCII display of all the towers which have been unpacked. | |
static __inline char | getSeparator (const EDR_tkrCluster *cluster, const EDR_tkrCluster *split, int strip_cur, int strip_prv) |
Returns a character used to separator strip numbers. |
CVS $Id: EDR_tkrPrint.c,v 1.8 2011/03/25 22:16:56 russell Exp $
Routine to do the actual printing.
ctx | The current context, | |
cur | The current column number to print in | |
max | The maximum column number to print in |
Typedef for struct _PrintCtx.
void EDR_tkrPrint | ( | const EDR_tkr * | tlr, | |
unsigned int | options | |||
) |
Prints an ASCII display of all the towers which have been unpacked.
tlr | The tracker LAT record to be displayed. | |
options | A word controlling the print options. The top 16 bits represent a left justified (MSB = Tower 0) of which towers to print. The low 2 bits specify whether you wish the style to be
|
References EDR_TKRPRINT_OPTS_M_TOWERS, printClusters(), printStrips(), printTower(), printUClusters(), and printUStrips().
static __inline char getSeparator | ( | const EDR_tkrCluster * | cluster, | |
const EDR_tkrCluster * | split, | |||
int | strip_cur, | |||
int | strip_prv | |||
) | [static] |
Returns a character used to separator strip numbers.
' | ', a space indicates all is well | |
'.',a | dot indicates the split between the low and high ends | |
'<',a | star indicates < strip ordering problem | |
'=",a | equal indicates = strip ordering problem (duplicate) | |
'!',a | bang indicates both the split point and ordering error | |
'^',a | carat indicates the strip number is too large (>1535) |
cluster | The cluster address of the current cluster | |
split | The cluster address of the splitting cluster | |
strip_cur | The current strip number | |
strip_prv | The previous strip number |
Referenced by printClusters(), printStrips(), printUClusters(), and printUStrips().
static int printClusters | ( | PrintCtx * | ctx, | |
int | col, | |||
int | max | |||
) | [static] |
Callback routine to print the corrected strips as a cluster.
ctx | The cluster context | |
col | The current column number | |
max | The maximum column number |
References _PrintCtx::cluster, _PrintCtx::cnt, getSeparator(), _PrintCtx::prv, and _PrintCtx::split.
Referenced by EDR_tkrPrint().
void printLayer | ( | const EDR_tkrLayer * | x, | |
const EDR_tkrLayer * | y, | |||
int | layer, | |||
) | [static] |
Prints an ASCII display of hits strips.
User provided callback to do the actual printing | ||
layer | The layer of the strips to be displayed. | |
x | The X layer description of the strips (may be NULL if there are none. | |
y | The Y layer description of the strips (may be NULL if there are none. |
References _PrintCtx::cluster, _PrintCtx::cnt, _PrintCtx::instance, printTots(), _PrintCtx::prv, and _PrintCtx::split.
Referenced by printTower().
static int printStrips | ( | PrintCtx * | ctx, | |
int | col, | |||
int | max | |||
) | [static] |
Callback routine to print the corrected strips as individual strips.
ctx | The cluster context | |
col | The current column number | |
max | The maximum column number |
References _PrintCtx::cluster, _PrintCtx::cnt, getSeparator(), _PrintCtx::instance, _PrintCtx::prv, and _PrintCtx::split.
Referenced by EDR_tkrPrint().
static int printTots | ( | int | left, | |
int | hiLo, | |||
const unsigned char * | tots | |||
) | [static] |
Prints an ASCII display of the TOTs.
left | Number of columns before the left margin | |
hiLo | A bit mask indicating which TOT(s) are valid, must 0,1,2,3 | |
tots | The array of (potentially) 2 TOTs |
Referenced by printLayer().
static void printTower | ( | const EDR_tkrTower * | ttr, | |
) | [static] |
Prints an ASCII display of the tracker data from the TKR Tower Record (ttr).
ttr | The TKR Tower Record to print. | |
Routine controlling the printing of individual clusters. |
References printLayer().
Referenced by EDR_tkrPrint().
static int printUClusters | ( | PrintCtx * | ctx, | |
int | col, | |||
int | max | |||
) | [static] |
Callback routine to print the uncorrected strips as a cluster.
ctx | The cluster context | |
col | The current column number | |
max | The maximum column number |
References _PrintCtx::cluster, _PrintCtx::cnt, getSeparator(), _PrintCtx::prv, and _PrintCtx::split.
Referenced by EDR_tkrPrint().
static int printUStrips | ( | PrintCtx * | ctx, | |
int | col, | |||
int | max | |||
) | [static] |
Callback routine to print the uncorrected strips as a cluster.
ctx | The cluster context | |
col | The current column number | |
max | The maximum column number |
References _PrintCtx::cluster, _PrintCtx::cnt, getSeparator(), _PrintCtx::instance, _PrintCtx::prv, and _PrintCtx::split.
Referenced by EDR_tkrPrint().