GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > edsprint / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

EDR_tkrPrint.c File Reference

Prints an ASCII display of the TKR tracker data. More...

#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.


Detailed Description

Prints an ASCII display of the TKR tracker data.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: EDR_tkrPrint.c,v 1.8 2011/03/25 22:16:56 russell Exp $

Typedef Documentation

typedef int(* Print)(PrintCtx *ctx, int cur, int max)

Routine to do the actual printing.

Returns:
The number of characters output
Parameters:
ctx The current context,
cur The current column number to print in
max The maximum column number to print in

Typedef for struct _PrintCtx.

This structure contains which cluster is currently being processed and, in the case of outputting the cluster as individual strips, controls where in the cluster the printing should commence.


Function Documentation

void EDR_tkrPrint ( const EDR_tkr *  tlr,
unsigned int  options 
)

Prints an ASCII display of all the towers which have been unpacked.

Parameters:
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
  • as clusters (bit 0)
  • apply the ladder gap correction See the EDR_TKRPRINT_OPTS_M for details

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.

Return values:
' ', 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)
Parameters:
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.

Returns:
The last column used
Parameters:
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,
Print  print 
) [static]

Prints an ASCII display of hits strips.

Parameters:
print 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.

Returns:
The last column used
Parameters:
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.

Parameters:
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
Returns:
The number of columns used to print

Referenced by printLayer().

static void printTower ( const EDR_tkrTower *  ttr,
Print  print 
) [static]

Prints an ASCII display of the tracker data from the TKR Tower Record (ttr).

Parameters:
ttr The TKR Tower Record to print.
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.

Returns:
The last column used
Parameters:
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.

Returns:
The last column used
Parameters:
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().


Generated on Wed Nov 21 18:40:25 2012 by  doxygen 1.5.8