GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-0 > efcprint / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

EFC_display.c File Reference

Crude Ascii display of ACD and TKR data. More...

#include <stdio.h>
#include <string.h>
#include <EFC/EFC_display.h>
#include <EDS/EDS_fw.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_ctb.h>
#include <EDS/EBF_gem.h>
#include <EDS/EBF_tkr.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_evt.h>
#include <EDS/EDR_calUnpack.h>
#include <EDS/EDR_tkrUnpack.h>
#include <EDS/EDR_gemPrint.h>
#include <EDS/EDR_calPrint.h>
#include <EDS/EDR_tkrPrint.h>
#include <PBI/FFS.ih>

Functions

static void displayAcd (unsigned char *d, const struct _HitMapAcd *hit, const struct _SymSetAcd *sym, int acd_top, int acd_x, int acd_y)
 Displays the tracker layer hit patterns.
static void fillAcdWideTile (unsigned char *d, const unsigned short int hit[8], char sym)
 Fills in the hits for the ACD wide tiles.
static void displayTkr (unsigned char *d, const struct _HitMapTkr *hit, const struct _SymSetTkr *sym, const unsigned int tkr[16])
 Displays the tracker layer hit patterns.
static void translate (unsigned char *d, const unsigned char *dtemplate, int n, const unsigned char ds[16], const unsigned char ts[16])
 Translate the template of the detector outline using the specified graphics set.
static void printAcdTkr (const unsigned int *tkr, int acd_top, int acd_x, int acd_y)
 Provides a hex display of the raw bit patterns.
static void printAcd (int acd_top, int acd_x, int acd_y)
 Provides a hex display of the raw bit patterns.
void EFC_display (EDS_fwEvt *evt, unsigned int opts)
 Displays the specified event.
void EFC_acdTkrDirDisplay (unsigned int style, const EBF_dir *dir)
 Draws a display of the TKR layer hit mask and the struck ACD tiles using only ASCII characters.
void EFC_acdTkrDisplay (unsigned int style, const unsigned int tkr[16], unsigned int acd_top, unsigned int acd_x, unsigned int acd_y)
 Draws a display of the TKR layer hit mask and the struck ACD tiles using only ASCII characters.


Detailed Description

Crude Ascii display of ACD and TKR data.

Author:
JJRussell - russell@slac.stanford.edu
This file's routines are documented in the header file. It is far to painful to document here. There is a large number of internal #defines's which only have meaning within this file. It would add nothing to publish these internal details.

   CVS $Id: EFC_display.c,v 1.4 2011/03/27 04:55:30 russell Exp $

Function Documentation

static void displayAcd ( unsigned char *  d,
const struct _HitMapAcd *  hit,
const struct _SymSetAcd *  sym,
int  acd_top,
int  acd_x,
int  acd_y 
) [static]

Displays the tracker layer hit patterns.

Parameters:
d The display character for a hit layer
hit A structure indicating where the hits should be placed in the display.
sym A structure defining the hit display symbols
acd_top Bit pattern of the struck tiles in the top face
acd_x Bit pattern of the struck tiles in the x faces
acd_y Bit pattern of the struct tiles in the y faces

References fillAcdWideTile().

Referenced by EFC_acdTkrDisplay().

static void displayTkr ( unsigned char *  d,
const struct _HitMapTkr *  hit,
const struct _SymSetTkr *  sym,
const unsigned int  tkr[16] 
) [static]

Displays the tracker layer hit patterns.

Parameters:
d The display character for a hit layer
hit A structure indicating where the hits should be placed in the display.
sym A structure defining the hit display symbols
tkr The 18 layer hit patterns

Referenced by EFC_acdTkrDisplay().

void EFC_acdTkrDirDisplay ( unsigned int  style,
const EBF_dir *  dir 
)

Draws a display of the TKR layer hit mask and the struck ACD tiles using only ASCII characters.

Parameters:
style Display style, 0 = plain, 1 = fancy
dir The directory of event contributors.
This routine displays the tracker and ACD data using the event data as the source. The tower data for each TKR is taken as the coincidence of the X and Y of the layer end OR of the accept list. The ACD data is from the veto list in the GEM block.

References EFC_acdTkrDisplay().

Referenced by EFC_display().

void EFC_acdTkrDisplay ( unsigned int  style,
const unsigned int  tkr[16],
unsigned int  acd_top,
unsigned int  acd_x,
unsigned int  acd_y 
)

Draws a display of the TKR layer hit mask and the struck ACD tiles using only ASCII characters.

Parameters:
style Display style, 0 = plain, 1 = fancy
tkr An array of the 16 towers layer hit pattern (18 bits)
acd_top A bit mask of the struck 25 top ACD tiles
acd_x A bit mask of the struck X side tiles, upper 16 bits are X+ mask, the lower 16 are the X- mask
acd_y A bit mask of the struck Y side tiles, upper 16 bits are Y+ mask, the lower 16 are the Y- mask

References displayAcd(), displayTkr(), printAcd(), printAcdTkr(), and translate().

Referenced by EFC_acdTkrDirDisplay().

void EFC_display ( EDS_fwEvt *  evt,
unsigned int  opts 
)

Displays the specified event.

Parameters:
evt Pointer to the unpacked event components to be displayed.
opts Bit mask of what to display. This is chosen from EFC_M_SS_xxx.

References EFC_acdTkrDirDisplay().

static void fillAcdWideTile ( unsigned char *  d,
const unsigned short int  hit[8],
char  sym 
) [static]

Fills in the hits for the ACD wide tiles.

Parameters:
d The display to be filled in.
hit Array of the 8 hit positions to fill in.
sym The hit symbol.
There are actually 9 locations to be filled in. This routine only does 8. It is assumed that the previous code has filled in the remaining spot.

Referenced by displayAcd().

static void printAcd ( int  acd_top,
int  acd_x,
int  acd_y 
) [static]

Provides a hex display of the raw bit patterns.

Parameters:
acd_top The ACD top hit map
acd_x The ACD X hit map
acd_y The ACD Y hit map

Referenced by EFC_acdTkrDisplay().

static void printAcdTkr ( const unsigned int *  tkr,
int  acd_top,
int  acd_x,
int  acd_y 
) [static]

Provides a hex display of the raw bit patterns.

Parameters:
tkr The 16 tower trigger patterns
acd_top The ACD top hit map
acd_x The ACD X hit map
acd_y The ACD Y hit map

Referenced by EFC_acdTkrDisplay().

static void translate ( unsigned char *  d,
const unsigned char *  dtemplate,
int  n,
const unsigned char  ds[16],
const unsigned char  ts[16] 
) [static]

Translate the template of the detector outline using the specified graphics set.

Parameters:
d The display to receive the translated outline.
dtemplate The template of the outline.
n The number of characters in the outline, ie how many to translate.
ds The display set to translate to
ts The template set to translate from
The template outline is more or less a logical description of the picture. The 16 or so logical characters that compose the outline must be translated to a set of ASCII characters to render the outline on the screen.

This is not a efficient implementation, but is sufficient for a display routine.

Referenced by EFC_acdTkrDisplay().


Generated on Wed Jan 4 14:13:45 2012 by  doxygen 1.5.8