GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > eds / rad750


Interface   Data Structures   File List   Data Fields   Globals  

EDR_tkr.h File Reference

Defines the structure containing the unpacked the tracker record for all towers. More...

#include <EDS/EDA_tkr.h>
#include <PBI/Endianness.h>

Classes

struct  _EDR_tkrCluster
 Defines a track cluster as consisting of the center of the cluster, its width and the ladder gap correction factor. More...
struct  _EDR_tkrLayer
 Information about the hit strips in one layer. More...
struct  _EDR_tkrTower
 Structure containing the unpacked TKR data for this tower. More...
struct  _EDR_tkr
 Structure containing the unpacked TKR data for all towers. More...

Defines

#define EDR_TKR_K_CLUSTERS_MAX   (EDA_TKR_K_STRIPS_MAX)
 The maximum number of clusters a given event can have.
#define EDR_TKR_K_CLUSTERS_PER_LAYER_MAX   (EDA_TKR_K_STRIPS_PER_LAYER_MAX)
 The maximum number of clusters a given event can have.
#define EDR_TKRCLUSTER_BUILD(_strip, _width, _corr)
 Macro to be a 32-bit word representing an EDR_tkrCluster.
#define EDR_TKR_TWRMAP_INIT   0x80000000
 Value of the tower map for tower 0.
#define EDR_TKR_TWRMAP(_twrNum)   (EDR_TKR_TWRMAP_INIT >> (_twrNum))
 Constructs the appropriate bit mask for the twrMap field in the EDR_tkr structure.

Typedefs

typedef struct _EBF_dir EBF_dir
 Typedef for struct _EBF_directory.
typedef struct _EDR_tkrCluster EDR_tkrCluster
 The internal representation of a cluster of strips.
typedef signed int EDR_tkrStrip
 The internal representation of a strip address.
typedef enum _EDR_TKRCLUSTER_S EDR_TKRCLUSTER_S
 Typedef for enum _EDR_TKRCLUSTER_S.
typedef enum _EDR_TKRCLUSTER_V EDR_TKRCLUSTER_V
 Typedef for enum _EDR_TKRCLUSTER_V.
typedef enum _EDR_TKRCLUSTER_M EDR_TKRCLUSTER_M
 Typedef for enum _EDR_TKRCLUSTER_M.
typedef struct _EDR_tkrLayer EDR_tkrLayer
 Typedef for struct _EDR_tkrLayer.
typedef enum _EDR_TKRLAYER_TOTS_K EDR_TKRLAYER_TOTS_K
 Typedef for EDR_TKRLAYER_TOTS_K.
typedef enum _EDR_TKRLAYER_ERR_M EDR_TKRLAYER_ERR_M
 Typedef for EDR_TKRLAYER_ERR_M.
typedef enum _EDR_TKRLAYER_HILO_M EDR_TKRLAYER_HILO_M
 Typedef for EDR_TKR_LAYER_END_M.
typedef struct _EDR_tkrTower EDR_tkrTower
 Typedef for struct _EDR_tkrTower.
typedef struct _EDR_tkr EDR_tkr
 Typedef for struct _EDR_tkr.
typedef enum _EDR_TKR_M EDR_TKR_M
 Typedef for enum _EDR_TKR_M.

Enumerations

enum  _EDR_TKRCLUSTER_S {
  EDR_TKRCLUSTER_S_STRIP = 16,
  EDR_TKRCLUSTER_S_WIDTH = 8,
  EDR_TKRCLUSTER_S_CORR = 8
}
 Defines the size, in bits, of the fields of an EDR_tkrCluster. More...
enum  _EDR_TKRCLUSTER_V {
  EDR_TKRCLUSTER_V_STRIP = 0,
  EDR_TKRCLUSTER_V_WIDTH = 16,
  EDR_TKRCLUSTER_V_CORR = 24
}
 Defines the right justified bit offset of the fields of an EDR_tkrCluster. More...
enum  _EDR_TKRCLUSTER_M {
  EDR_TKRCLUSTER_M_STRIP = (1 << EDR_TKRCLUSTER_S_STRIP) - 1,
  EDR_TKRCLUSTER_M_WIDTH = (1 << EDR_TKRCLUSTER_S_WIDTH) - 1,
  EDR_TKRCLUSTER_M_CORR = (1 << EDR_TKRCLUSTER_S_CORR ) - 1
}
 Defines the in place masks of the fields of an EDR_tkrCluster. More...
enum  _EDR_TKRLAYER_TOTS_K {
  EDR_TKRLAYER_TOTS_K_LO = 0x0,
  EDR_TKRLAYER_TOTS_K_HI = 0x1
}
 Enumeration of the value used to index the tots field of EDR_tkrLayer structure.
enum  _EDR_TKRLAYER_ERR_M {
  EDR_TKRLAYER_ERR_M_ORDER = 0x1,
  EDR_TKRLAYER_ERR_M_INVALID = 0x2
}
 Enumeration of the bits in the err field of EDR_tkrLayer structure.
enum  _EDR_TKRLAYER_HILO_M {
  EDR_TKRLAYER_HILO_M_LO = 0x1,
  EDR_TKRLAYER_HILO_M_HI = 0x2,
  EDR_TKRLAYER_HILO_M_BOTH = 0x3
}
 Enumeration of the masks used to test the hiLo field member of the EDR_tkrLayer structure for the present of the lo, hi or both layer ends.
enum  _EDR_TKR_M {
  EDR_TKR_M_STRIPS_ALL = 0xffff0000,
  EDR_TKR_M_TOTS_ALL = 0x0000ffff,
  EDR_TKR_M_ALL = 0xffffffff
}
 Convenience symbols for determining which towers had their strips/TOTs unpacked. More...

Functions

static __inline int EDR__tkrTowerNstrips (const EDR_tkrTower *twr)
 Get the number of strips hit in this tower.
static __inline unsigned int EDR__tkrTwrMapStrips (unsigned int twrMap)
 Returns the left justified map of towers that with hit strips.
static __inline unsigned int EDR__tkrTwrMapTots (unsigned int twrMap)
 Returns the left justified map of towers that with hit strips.


Detailed Description

Defines the structure containing the unpacked the tracker record for all towers.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: EDR_tkr.h,v 1.8 2011/03/25 22:16:55 russell Exp $

Define Documentation

#define EDR_TKR_TWRMAP ( _twrNum   )     (EDR_TKR_TWRMAP_INIT >> (_twrNum))

Constructs the appropriate bit mask for the twrMap field in the EDR_tkr structure.

Returns:
The bit mask the specified _twrNum
Parameters:
_twrNum The tower number
This macro is used when constructing the twrMap field in the EDR_tkr structure. Use of the parameter will avoid mistakes caused by incorrectly assuming how the tower map is constructed.

#define EDR_TKR_TWRMAP_INIT   0x80000000

Value of the tower map for tower 0.

Warning:
This parameter is not for general consumption, but must be placed in the public interface since it is used by other public objects. See EDR_TKR_TWRMAP.

#define EDR_TKRCLUSTER_BUILD ( _strip,
_width,
_corr   ) 

Value:

((_strip << EDR_TKRCLUSTER_V_STRIP) |         \
        (_width << EDR_TKRCLUSTER_V_WIDTH) |         \
        (_corr  << EDR_TKRCLUSTER_V_CORR ))
Macro to be a 32-bit word representing an EDR_tkrCluster.

Returns:
A 32-bit representation of the specified cluster
Parameters:
_strip The strip number
_width The width of the cluster, (technically the width - 1)
_corr The ladder gap correction


Typedef Documentation

Typedef for struct _EDR_tkr.

Warning:
Since this record includes enough storage to accommodate a maximally sized record, this record is rather hefty, at 300Kbytes. The bulk of this comes from holding the maximal number of clusters that can be produced. That would be 64 strips/layer end * 72 layer ends/tower * 16 towers = 73,728 clusters * 4 bytes per cluster = 294,912 bytes. Because no more than 128 hits can be read from a cable controller, this is way overkill. However, there was single pass unpacking algorithm that could make use of this feature. Since, if there is one thing the RAD750 has, its memory, it was decided to use some of it to support this large data structure. In all likelihood, only one of these will ever be needed at a time. If the data needs to be more persistent, it should be transferred to a more compact representation.

Typedef for struct _EDR_tkrLayer.

This structure captures information about the hit strips in a layer. In a concession to efficiency, the map (actually a bit list) represents the list of unused hits. Technically, one should not mix up the information about the hits in a layer, which really should be read-only after it is initially filled, with the dynamics of pattern recognition.

Note also that this structure is laid out to occupy 4 32 words. This allows one to randomly access the layers in a tower using a shift instead of a multiple.

Typedef for struct _EDR_tkrTower.

This record contains information needed to access the tracker information for this tower. Some of this information refers back to the original EBF_tkr record, namely totOffset and len, This record was meant to be as lean as possible, but storing these values here is fairly cheap both in terms of storage and extra computation and allows the code to locate the TOTs and any subsequent error or diagnostic block without serially decoding the record.
Strip Count
While the strip count is an interesting statistical number, it plays little to no role in the analysis of a track tower. Since it can be derived from the totOffset field, no storage was allocated for it. Rather an inline access function EDR__tkrTowerNstrips was provided to calculate this value.
Treatment of possible Diagnostic and Error Blocks
In the case where one or the other of these blocks is present, they can be located in the raw EBF_tkr record using the totOffset and the lecnt. The totOffset locates the beginning of the TOT block and, adding on the lecnt, which also represents the TOT count, advances one to the next block. Both blocks are present, the diagnostic is first, and since it is a fixed size, allows one to then advance to the error block.


Enumeration Type Documentation

enum _EDR_TKR_M

Convenience symbols for determining which towers had their strips/TOTs unpacked.

Enumerator:
EDR_TKR_M_STRIPS_ALL  Unpack the strip data on all towers with data
EDR_TKR_M_TOTS_ALL  Unpack the TOT data on all towers with data
EDR_TKR_M_ALL  Unpack both the strip and TOT data on all towers with data

Defines the in place masks of the fields of an EDR_tkrCluster.

Enumerator:
EDR_TKRCLUSTER_M_STRIP  In place mask of the strip field
EDR_TKRCLUSTER_M_WIDTH  In place mask of the width field
EDR_TKRCLUSTER_M_CORR  In place mask of the correction field

Defines the size, in bits, of the fields of an EDR_tkrCluster.

Enumerator:
EDR_TKRCLUSTER_S_STRIP  Size, in bits, of the strip field
EDR_TKRCLUSTER_S_WIDTH  Size, in bits, of the width field
EDR_TKRCLUSTER_S_CORR  Size, in bits, of the correction field

Defines the right justified bit offset of the fields of an EDR_tkrCluster.

Enumerator:
EDR_TKRCLUSTER_V_STRIP  Right offset of the strip field
EDR_TKRCLUSTER_V_WIDTH  Right offset of the width field
EDR_TKRCLUSTER_V_CORR  Right offset of the correction field


Function Documentation

static __inline int EDR__tkrTowerNstrips ( const EDR_tkrTower twr  )  [static]

Get the number of strips hit in this tower.

Returns:
The number of strips hit in this tower
Parameters:
twr The target tower

References _EDR_tkrTower::totOffset.

static __inline unsigned int EDR__tkrTwrMapStrips ( unsigned int  twrMap  )  [static]

Returns the left justified map of towers that with hit strips.

Returns:
The left-justified mask

References EDR_TKR_M_STRIPS_ALL.

static __inline unsigned int EDR__tkrTwrMapTots ( unsigned int  twrMap  )  [static]

Returns the left justified map of towers that with hit strips.

Returns:
The left-justified mask


Generated on Fri Dec 9 16:52:11 2011 by  doxygen 1.5.8