GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > eds / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

EBF_tkr.h File Reference

Describes the TKR data format from the event builder. More...

#include <PBI/Endianness.h>

Classes

struct  _EBF_tkr
 Lays out the format of the TKR data block from the event builder. More...

Defines

#define EBF_TKR_K_ACCEPTS_CNT   3
 The number of words in the TKR layer accept list block.
#define EBF_TKR_ACCEPTS_LEFT_XLO(_a0)   ((unsigned int)_a0 & 0xffffc000)
 Unpacks the accept hit mask for X lo mask. The mask is left justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_LEFT_XHI(_a0, _a1)
 Unpacks the accept hit mask for X hi mask. The mask is left justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_LEFT_YLO(_a1)   (((unsigned int)_a1 & 0x0ffffc00) << 4)
 Unpacks the accept hit mask for Y lo mask. The mask is left justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_LEFT_YHI(_a1, _a2)
 Unpacks the accept hit mask for Y hi mask. The mask is left justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_LEFT_UNPACK(_accepts, _xlo, xhi, _ylo, yhi)
 Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the X and Y masks are returned as 4 separate values. The bit masks are left justified in the 32 bit word.
#define EBF_TKR_ACCEPTS_LEFT_ORED_UNPACK(_accepts, _x, _y)
 Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the masks are OR'd together. The masks are returned left justified in the 32 bit fields.
#define EBF_TKR_LEFT_LAYER_REMAP(_laccept, _layer)   ((((_laccept)>>EBF_TKR_LEFT_BIT_K_L ## _layer)&1)<<(EBF_TKR_K_L ## _layer+14))
 Moves the bit corresponding to the specified layer in a left justified accept mask to the bit position _layer.
#define EBF_TKR_LEFT_ACCEPT_REMAP(_accept)
 Remaps a tracker accept pattern word in the even/odd order to the canonical order (layer 0->17 in LSB to MSB.
#define EBF_TKR_ACCEPTS_RIGHT_XLO(_a0)   (((unsigned int)_a0 & 0xffffc000) >> 14)
 Unpacks the accept hit mask for X lo mask. The mask is right justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_RIGHT_XHI(_a0, _a1)
 Unpacks the accept hit mask for X hi mask. The mask is right justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_RIGHT_YLO(_a1)   (((unsigned int)_a1 & 0x0ffffc00) >> 10)
 Unpacks the accept hit mask for Y lo mask. The mask is right justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_RIGHT_YHI(_a1, _a2)
 Unpacks the accept hit mask for Y hi mask. The mask is right justified in the resulting 32 bit word.
#define EBF_TKR_ACCEPTS_RIGHT_UNPACK(_accepts, _xlo, xhi, _ylo, yhi)
 Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the X and Y masks are returned as 4 separate values. The bit masks are right justified in the 32 bit word.
#define EBF_TKR_ACCEPTS_RIGHT_ORED_UNPACK(_accepts, _x, _y)
 Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the masks are OR'd together. The masks are returned right justified in the 32 bit word.
#define EBF_TKR_RIGHT_LAYER_REMAP(_raccept, _layer)   ((( (_raccept)>>EBF_TKR_RIGHT_BIT_K_L ## _layer)&1) << EBF_TKR_K_L ## _layer)
 Moves the bit corresponding to the specified layer in a right justified accept mask to the bit position _layer.
#define EBF_TKR_RIGHT_ACCEPT_REMAP(_accept)
 Remaps a tracker accept pattern word in the even/odd order to the canonical order (layer 0->17 in LSB to MSB.

Typedefs

typedef enum
_EBF_TKR_RIGHT_BIT_K_LX 
EBF_TKR_RIGHT_BIT_K_LX
 Typedef for enum _EBF_TKR_RIGHT_BIT_K_LX.
typedef enum _EBF_TKR_LEFT_BIT_K_LX EBF_TKR_LEFT_BIT_K_LX
 Typedef for enum _EBF_TKR_LEFT_BIT_K_LX.
typedef enum _EBF_TKR_K_LX EBF_TKR_K_LX
 Typedef for enum _EBF_TKR_K_LX.
typedef struct _EBF_tkr EBF_tkr

Enumerations

enum  _EBF_TKR_RIGHT_BIT_K_LX {
  EBF_TKR_RIGHT_BIT_K_L1 = 17,
  EBF_TKR_RIGHT_BIT_K_L3 = 16,
  EBF_TKR_RIGHT_BIT_K_L5 = 15,
  EBF_TKR_RIGHT_BIT_K_L7 = 14,
  EBF_TKR_RIGHT_BIT_K_L9 = 13,
  EBF_TKR_RIGHT_BIT_K_LB = 12,
  EBF_TKR_RIGHT_BIT_K_LD = 11,
  EBF_TKR_RIGHT_BIT_K_LF = 10,
  EBF_TKR_RIGHT_BIT_K_LH = 9,
  EBF_TKR_RIGHT_BIT_K_L0 = 8,
  EBF_TKR_RIGHT_BIT_K_L2 = 7,
  EBF_TKR_RIGHT_BIT_K_L4 = 6,
  EBF_TKR_RIGHT_BIT_K_L6 = 5,
  EBF_TKR_RIGHT_BIT_K_L8 = 4,
  EBF_TKR_RIGHT_BIT_K_LA = 3,
  EBF_TKR_RIGHT_BIT_K_LC = 2,
  EBF_TKR_RIGHT_BIT_K_LE = 1,
  EBF_TKR_RIGHT_BIT_K_LG = 0
}
 Enumeration of the bit number for a particular layer in the 18 bit accept word, when the accept word is right justified. More...
enum  _EBF_TKR_LEFT_BIT_K_LX {
  EBF_TKR_LEFT_BIT_K_L1 = 31,
  EBF_TKR_LEFT_BIT_K_L3 = 30,
  EBF_TKR_LEFT_BIT_K_L5 = 29,
  EBF_TKR_LEFT_BIT_K_L7 = 28,
  EBF_TKR_LEFT_BIT_K_L9 = 27,
  EBF_TKR_LEFT_BIT_K_LB = 26,
  EBF_TKR_LEFT_BIT_K_LD = 25,
  EBF_TKR_LEFT_BIT_K_LF = 24,
  EBF_TKR_LEFT_BIT_K_LH = 23,
  EBF_TKR_LEFT_BIT_K_L0 = 22,
  EBF_TKR_LEFT_BIT_K_L2 = 21,
  EBF_TKR_LEFT_BIT_K_L4 = 20,
  EBF_TKR_LEFT_BIT_K_L6 = 19,
  EBF_TKR_LEFT_BIT_K_L8 = 18,
  EBF_TKR_LEFT_BIT_K_LA = 17,
  EBF_TKR_LEFT_BIT_K_LC = 16,
  EBF_TKR_LEFT_BIT_K_LE = 15,
  EBF_TKR_LEFT_BIT_K_LG = 14
}
 Enumeration of the bit number for a particular layer in the 18 bit accept word, when the accept word is left justified. More...
enum  _EBF_TKR_K_LX {
  EBF_TKR_K_L0 = 0x00,
  EBF_TKR_K_L1 = 0x01,
  EBF_TKR_K_L2 = 0x02,
  EBF_TKR_K_L3 = 0x03,
  EBF_TKR_K_L4 = 0x04,
  EBF_TKR_K_L5 = 0x05,
  EBF_TKR_K_L6 = 0x06,
  EBF_TKR_K_L7 = 0x07,
  EBF_TKR_K_L8 = 0x08,
  EBF_TKR_K_L9 = 0x09,
  EBF_TKR_K_LA = 0x0A,
  EBF_TKR_K_LB = 0x0B,
  EBF_TKR_K_LC = 0x0C,
  EBF_TKR_K_LD = 0x0D,
  EBF_TKR_K_LE = 0x0E,
  EBF_TKR_K_LF = 0x0F,
  EBF_TKR_K_LG = 0x10,
  EBF_TKR_K_LH = 0x11
}
 Enumeration mapping a layer designation, ie 0,1,...A,B,C,D,E,F,G,H to a number. More...

Functions

int EBF_tkrLayerEndCount (const EBF_tkr *tkr)
 Counts the number of layer ends with hit strips.
int EBF_tkrStripCount (const EBF_tkr *tkr, int layerEndCnt, int maxwrds)
 Counts the hit strips.
int EBF_tkrLenCalc (const EBF_tkr *tkr, int maxwrds)
 Calculates the number of bytes, not including any padding, in the EBF_tkr record.
static int __inline EBF__tkrNbytes (int nLayerEnds, int nStrips)
 Calculates the size, in bytes, of the EBF_tkr block.


Detailed Description

Describes the TKR data format from the event builder.

Author:
JJRussell - russell@slac.stanford.edu
  CVS $Id: EBF_tkr.h,v 1.4 2011/03/25 22:16:54 russell Exp $

Define Documentation

#define EBF_TKR_ACCEPTS_LEFT_ORED_UNPACK ( _accepts,
_x,
_y   ) 

Value:

{                                                                          \
   unsigned int a0 = _accepts[0];                                          \
   unsigned int a1 = _accepts[1];                                          \
   unsigned int a2 = _accepts[2];                                          \
                                                                           \
   _x = EBF_TKR_ACCEPTS_LEFT_XLO(a0) | EBF_TKR_ACCEPTS_LEFT_XHI(a0, a1);   \
   _y = EBF_TKR_ACCEPTS_LEFT_YLO(a1) | EBF_TKR_ACCEPTS_LEFT_YHI(a1, a2);   \
                                                                           \
}
Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the masks are OR'd together. The masks are returned left justified in the 32 bit fields.

#define EBF_TKR_ACCEPTS_LEFT_UNPACK ( _accepts,
_xlo,
xhi,
_ylo,
yhi   ) 

Value:

{                                                                          \
   unsigned int a0 = _accepts[0];                                          \
   unsigned int a1 = _accepts[1];                                          \
   unsigned int a2 = _accepts[2];                                          \
                                                                           \
   _xlo = EBF_TKR_ACCEPTS_LEFT_XLO(a0);                                    \
   _xhi = EBF_TKR_ACCEPTS_LEFT_XHI(a0, a1);                                \
   _ylo = EBF_TKR_ACCEPTS_LEFT_YLO(a1);                                    \
   _yhi = EBF_TKR_ACCEPTS_LEFT_YHI(a1, a2);                                \
                                                                           \
}
Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the X and Y masks are returned as 4 separate values. The bit masks are left justified in the 32 bit word.

#define EBF_TKR_ACCEPTS_LEFT_XHI ( _a0,
_a1   ) 

Value:

((((unsigned int)_a0 & 0x00003fff) << (32-14)) |                       \
    (((unsigned int)_a1 & 0xf0000000) >> 14))
Unpacks the accept hit mask for X hi mask. The mask is left justified in the resulting 32 bit word.

#define EBF_TKR_ACCEPTS_LEFT_YHI ( _a1,
_a2   ) 

Value:

((((unsigned int)_a1 & 0x000003ff) << (32-10)) |                       \
    (((unsigned int)_a2 & 0xff000000) >> 10))
Unpacks the accept hit mask for Y hi mask. The mask is left justified in the resulting 32 bit word.

#define EBF_TKR_ACCEPTS_RIGHT_ORED_UNPACK ( _accepts,
_x,
_y   ) 

Value:

{                                                                          \
   unsigned int a0 = _accepts[0];                                          \
   unsigned int a1 = _accepts[1];                                          \
   unsigned int a2 = _accepts[2];                                          \
                                                                           \
   _x = EBF_TKR_ACCEPTS_RIGHT_XLO(a0) | EBF_TKR_ACCEPTS_RIGHT_XHI(a0, a1); \
   _y = EBF_TKR_ACCEPTS_RIGHT_YLO(a1) | EBF_TKR_ACCEPTS_RIGHT_YHI(a1, a2); \
                                                                           \
}
Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the masks are OR'd together. The masks are returned right justified in the 32 bit word.

#define EBF_TKR_ACCEPTS_RIGHT_UNPACK ( _accepts,
_xlo,
xhi,
_ylo,
yhi   ) 

Value:

{                                                                          \
   unsigned int a0 = _accepts[0];                                          \
   unsigned int a1 = _accepts[1];                                          \
   unsigned int a2 = _accepts[2];                                          \
                                                                           \
   _xlo = EBF_TKR_ACCEPTS_RIGHT_XLO(a0);                                   \
   _xhi = EBF_TKR_ACCEPTS_RIGHT_XHI(a0, a1);                               \
   _ylo = EBF_TKR_ACCEPTS_RIGHT_YLO(a1);                                   \
   _yhi = EBF_TKR_ACCEPTS_RIGHT_YHI(a1, a2);                               \
                                                                           \
}
Unpacks the accepts hit map into bits masks for the X and Y masks. The right and left halves of the X and Y masks are returned as 4 separate values. The bit masks are right justified in the 32 bit word.

#define EBF_TKR_ACCEPTS_RIGHT_XHI ( _a0,
_a1   ) 

Value:

((((unsigned int)_a0 & 0x00003fff) <<  4)  |                            \
    (((unsigned int)_a1 & 0xf0000000) >> 28))
Unpacks the accept hit mask for X hi mask. The mask is right justified in the resulting 32 bit word.

#define EBF_TKR_ACCEPTS_RIGHT_YHI ( _a1,
_a2   ) 

Value:

((((unsigned int)_a1 & 0x000003ff) <<  8) |                             \
    (((unsigned int)_a2 & 0xff000000) >> 24))
Unpacks the accept hit mask for Y hi mask. The mask is right justified in the resulting 32 bit word.

#define EBF_TKR_K_ACCEPTS_CNT   3

The number of words in the TKR layer accept list block.

The TKR data structure consists of 3 major blocks. The first block, the layer accept list hit map is fixed length. The next two blocks are a variable lengths.
The first of the variable length blocks contains the strip addresses. Each strip address is 12 bits in length and they are densely packed. Actual strip addresses occupy only 11 bits. The bit 11 is set for the last strip address for each layer end (i.e. a reaout controller). The layer ends are laid out in accordance with the layer accept list hit map. The strip addresses belonging to one layer end are delimited from the current position in the strip address array to the next strip address with bit 12 set. There must be as many strip address sets as there are bits set in the layer accept hit map. For example, if bits 0 and 2 of the hit map are set, then the first set of strip addresses are associated with layer end 0 and the second set with layer end 2.
       Accept Hit Map  8 9 bit vectors, one for each of the readout controllers
       Strip Addresses The list of strip addresses, 12 bits/per address
       TOT values      The TOT values, one 8 bit value for each accept hit.
   

The hardware readout controllers are numbered as follows.


         3            2           In  Reads Out       Out
        +--------------+           0: Yeven Left  (lo)  6: Xodd  Lo
      4 |              | 1         1: Yeven Right (hi)  3: Xeven Lo
        |              |           2: Xeven Left  (hi)  7: Xodd  Hi
        |              |           3: Xeven Right (lo)  2: Xeven Hi
        |              |           4: Yodd  Left  (hi)  5: Yodd  Lo
        |              |           5: Yodd  Right (lo)  0: Yeven Lo
      5 |              | 0         6: Xodd  Left  (lo)  4: Yodd  Hi
        +--------------+           7: Xodd  Right (hi)  1: Yeven Hi
         6            7


  

The terms Lo & Hi refer to low and high strip addresses. The term Xrefers to readout controllers that service strips that measure the X coordinate. The term Y refers to readout controllers that service strips that measure the Y coordinate. This is somewhat confusing since strips the measure the X coordinate physically have their readout controllers parallel the Y axis and strips that measure the Y coordinate physically have their readout controllers parallel to the X axis.
The term left refers to readout controllers that service the lower strip addresses. The term right refers to readout controllers that service the higher strip addresses
This scheme has the advantage of viewing the resulting vector as 4 x 18 bit words
               X odd  lo   | X even lo
               X odd  hi   | X even hi
               Y odd  lo   | Y even lo
               Y odd  hi   | Y even hi
  

This allows the resulting block to be decoded as 4 18 bit vectors. For many applications the next step would be to OR the X's and the Y's then do logical operations on the resulting 2 18 bit vectors.
Accept Hit Map
The Accept Hit Map is packed densely into 3 32 bit words. Picturally the block looks like this
        11111111 11111111
        fedcba98 76543210 fedcba98 76543210
       +--------+--------+--------+--------+
     0 |66666666 63333333 33777777 77722222|
     1 |22225555 55555222 22222244 44444441|
     2 |11111111                           |
       +--------+--------+--------+--------+
  

Where the numbers represent the 8 9 bit hit masks. The mapping is
       6 = X odd  lo  (0)     5 = Y odd  lo    (4)
       3 = X even lo  (1)     0 = Y even lo    (5)
       7 = X odd  hi  (2)     4 = Y odd  hi    (6)
       2 = X even hi  (3)     1 = Y even hi    (7)
  

The numbers in parenthesis represents the order the accept blocks are placed into the output stream. The convention is MSB = first layer to be readout (this is the layer closest to the cable controller). The strip address block begins immediately on the next byte.
The TOT block is an array of bytes representing the TOT values of each active layer end. There is one value for each set bit in the accept block. The order is one-to-one with the accept block. That is the first set bit gives the layer end address of the first TOT value. Each 24 bit word is formatted as follows. This block starts on the first even byte boundary following the strip addresses.

#define EBF_TKR_LEFT_ACCEPT_REMAP ( _accept   ) 

Value:

(EBF_TKR_LEFT_LAYER_REMAP(_accept, 0)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 1)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 2)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 3)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 4)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 5)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 6)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 7)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 8)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, 9)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, A)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, B)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, C)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, D)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, E)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, F)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, G)                                \
   |  EBF_TKR_LEFT_LAYER_REMAP(_accept, H))
Remaps a tracker accept pattern word in the even/odd order to the canonical order (layer 0->17 in LSB to MSB.

#define EBF_TKR_LEFT_LAYER_REMAP ( _laccept,
_layer   )     ((((_laccept)>>EBF_TKR_LEFT_BIT_K_L ## _layer)&1)<<(EBF_TKR_K_L ## _layer+14))

Moves the bit corresponding to the specified layer in a left justified accept mask to the bit position _layer.

Moves the bit corresponding to the specified layer in a left justified accept mask to the bit position _layer. This is done by first right shifting the bit down to bit position 0, then left shifting the bit into the designated spot. In this form layer 0 corresponds to the LSB, ie bit 14.
The layer must be designated by 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H. The letters must be upper case.

#define EBF_TKR_RIGHT_ACCEPT_REMAP ( _accept   ) 

Value:

(EBF_TKR_RIGHT_LAYER_REMAP(_accept, 0)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 1)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 2)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 3)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 4)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 5)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 6)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 7)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 8)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, 9)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, A)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, B)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, C)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, D)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, E)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, F)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, G)                               \
   |  EBF_TKR_RIGHT_LAYER_REMAP(_accept, H))
Remaps a tracker accept pattern word in the even/odd order to the canonical order (layer 0->17 in LSB to MSB.

#define EBF_TKR_RIGHT_LAYER_REMAP ( _raccept,
_layer   )     ((( (_raccept)>>EBF_TKR_RIGHT_BIT_K_L ## _layer)&1) << EBF_TKR_K_L ## _layer)

Moves the bit corresponding to the specified layer in a right justified accept mask to the bit position _layer.

Moves the bit corresponding to the specified layer in a right justified accept mask to the bit position _layer. This is done by first right shifting the bit down to bit position 0, then left shifting the bit into the designated spot. In this form layer 0 corresponds to the LSB, ie bit 0.
The layer must be designated by 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H. The letters must be upper case.


Enumeration Type Documentation

Enumeration mapping a layer designation, ie 0,1,...A,B,C,D,E,F,G,H to a number.

A first this seems a little silly. If there had been 16 or less layers this would have not been necessary, one could have just used the hex representation. Unfortunately there are 18 layers. In some sense, this just invents some symbols for a base 18 representation, allowing a uniform naming convention through the code.
Enumerator:
EBF_TKR_K_L0  Numeric for layer 0 ( 0)
EBF_TKR_K_L1  Numeric for layer 1 ( 1)
EBF_TKR_K_L2  Numeric for layer 2 ( 2)
EBF_TKR_K_L3  Numeric for layer 3 ( 3)
EBF_TKR_K_L4  Numeric for layer 4 ( 4)
EBF_TKR_K_L5  Numeric for layer 5 ( 5)
EBF_TKR_K_L6  Numeric for layer 6 ( 6)
EBF_TKR_K_L7  Numeric for layer 7 ( 7)
EBF_TKR_K_L8  Numeric for layer 8 ( 8)
EBF_TKR_K_L9  Numeric for layer 9 ( 9)
EBF_TKR_K_LA  Numeric for layer A (10)
EBF_TKR_K_LB  Numeric for layer B (11)
EBF_TKR_K_LC  Numeric for layer C (12)
EBF_TKR_K_LD  Numeric for layer D (13)
EBF_TKR_K_LE  Numeric for layer E (14)
EBF_TKR_K_LF  Numeric for layer F (15)
EBF_TKR_K_LG  Numeric for layer G (16)
EBF_TKR_K_LH  Numeric for layer H (17)

Enumeration of the bit number for a particular layer in the 18 bit accept word, when the accept word is left justified.

Enumerator:
EBF_TKR_LEFT_BIT_K_L1  Left justified accept bit # for L1
EBF_TKR_LEFT_BIT_K_L3  Left justified accept bit # for L3
EBF_TKR_LEFT_BIT_K_L5  Left justified accept bit # for L5
EBF_TKR_LEFT_BIT_K_L7  Left justified accept bit # for L7
EBF_TKR_LEFT_BIT_K_L9  Left justified accept bit # for L9
EBF_TKR_LEFT_BIT_K_LB  Left justified accept bit # for LB
EBF_TKR_LEFT_BIT_K_LD  Left justified accept bit # for LD
EBF_TKR_LEFT_BIT_K_LF  Left justified accept bit # for LF
EBF_TKR_LEFT_BIT_K_LH  Left justified accept bit # for LH
EBF_TKR_LEFT_BIT_K_L0  Left justified accept bit # for L0
EBF_TKR_LEFT_BIT_K_L2  Left justified accept bit # for L2
EBF_TKR_LEFT_BIT_K_L4  Left justified accept bit # for L4
EBF_TKR_LEFT_BIT_K_L6  Left justified accept bit # for L6
EBF_TKR_LEFT_BIT_K_L8  Left justified accept bit # for L8
EBF_TKR_LEFT_BIT_K_LA  Left justified accept bit # for LA
EBF_TKR_LEFT_BIT_K_LC  Left justified accept bit # for LC
EBF_TKR_LEFT_BIT_K_LE  Left justified accept bit # for LE
EBF_TKR_LEFT_BIT_K_LG  Left justified accept bit # for LG

Enumeration of the bit number for a particular layer in the 18 bit accept word, when the accept word is right justified.

Enumerator:
EBF_TKR_RIGHT_BIT_K_L1  Right justified accept bit # for L1
EBF_TKR_RIGHT_BIT_K_L3  Right justified accept bit # for L3
EBF_TKR_RIGHT_BIT_K_L5  Right justified accept bit # for L5
EBF_TKR_RIGHT_BIT_K_L7  Right justified accept bit # for L7
EBF_TKR_RIGHT_BIT_K_L9  Right justified accept bit # for L9
EBF_TKR_RIGHT_BIT_K_LB  Right justified accept bit # for LB
EBF_TKR_RIGHT_BIT_K_LD  Right justified accept bit # for LD
EBF_TKR_RIGHT_BIT_K_LF  Right justified accept bit # for LF
EBF_TKR_RIGHT_BIT_K_LH  Right justified accept bit # for LH
EBF_TKR_RIGHT_BIT_K_L0  Right justified accept bit # for L0
EBF_TKR_RIGHT_BIT_K_L2  Right justified accept bit # for L2
EBF_TKR_RIGHT_BIT_K_L4  Right justified accept bit # for L4
EBF_TKR_RIGHT_BIT_K_L6  Right justified accept bit # for L6
EBF_TKR_RIGHT_BIT_K_L8  Right justified accept bit # for L8
EBF_TKR_RIGHT_BIT_K_LA  Right justified accept bit # for LA
EBF_TKR_RIGHT_BIT_K_LC  Right justified accept bit # for LC
EBF_TKR_RIGHT_BIT_K_LE  Right justified accept bit # for LE
EBF_TKR_RIGHT_BIT_K_LG  Right justified accept bit # for LG


Function Documentation

static int __inline EBF__tkrNbytes ( int  nLayerEnds,
int  nStrips 
) [static]

Calculates the size, in bytes, of the EBF_tkr block.

Returns:
The size, in bytes, of the EBF_tkr block.
Parameters:
nLayerEnds The number of layer ends with active strips.
nStrips The number of active strips

int EBF_tkrLayerEndCount ( const EBF_tkr tkr  ) 

Counts the number of layer ends with hit strips.

Returns:
The number of layer ends with hit strips
Parameters:
tkr Pointer to the tracker data

References _EBF_tkr::accepts, and countLayerEnds().

int EBF_tkrLenCalc ( const EBF_tkr tkr,
int  maxwrds 
)

Calculates the number of bytes, not including any padding, in the EBF_tkr record.

Returns:
The byte length of the active information in the EBF_tkr record
Parameters:
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.
This function must serially parse the entire TKR record for a given tower and, is, therefore, is not cheap, particularly in the case of large EBF_tkr records. If one needs both the number of layers hit, the strip count and the length of the record, it is better to use EBF_tkrLayerEndCnt and EBF_tkrStripCnt and compute the length from these values. Note that if the diagnostic block and/or the error block is present, the lengths of these blocks need to be added in.

References _EBF_tkr::accepts, countLayerEnds(), and EBF_tkrStripCount().

Referenced by EBF_dirAuxFill().

int EBF_tkrStripCount ( const EBF_tkr tkr,
int  layerEndCnt,
int  maxwrds 
)

Counts the hit strips.

Returns:
The number hit strips
Parameters:
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.

References _EBF_tkr::accepts.

Referenced by EBF_tkrLenCalc().


Generated on Thu Sep 27 13:52:20 2012 by  doxygen 1.5.8