GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EDS / V2-10-0
Constituent: eds     Tag: mv2304
Typedefs | |
typedef enum _EDR_TKRUNPACK_M | EDR_TKRUNPACK_M |
Typedef for enum _EDR_TKRUNPACK_M. | |
Enumerations | |
enum | _EDR_TKRUNPACK_M { EDR_TKRUNPACK_M_STRIPS_ALL = 0xffff0000, EDR_TKRUNPACK_M_TOTS_ALL = 0x0000ffff, EDR_TKRUNPACK_M_ALL = 0xffffffff } |
Convenience symbols for unpacking all strip, TOT or both from all towers with data. More... | |
Functions | |
static unsigned int __inline | EDR__tkrUnpackTowerBitStrips (int tower) |
Constructs the bit mask indicating to unpack the strip data for the specified tower number. | |
static unsigned int __inline | EDR__tkrUnpackTowerBitTots (int tower) |
Constructs the bit mask indicating to unpack the TOT data for the specified tower number. | |
int | EDR_tkrUnpack (EDR_tkr *tlr, const EBF_dir *dir, unsigned int stripsTots) |
Driver routine to unpack the specified TKR towers. | |
int | EDR_tkrUnpackInit (EDR_tkr *tlr) |
Performs one time initialization of a Track LAT record. | |
int | EDR_tkrUnpackSizeof (void) |
Returns the size, in bytes, of a EDR_tkr. | |
void | EDR_tkrUnpackReset (EDR_tkr *tlr) |
Resets the tlr record, preparing it to receive another unpacked event. |
CVS $Id: EDR_tkrUnpack.h,v 1.4 2005/10/13 22:00:55 russell Exp $
int nbytes = EDR_tkrUnpackSizeof (); EDR_tkr *tkr = (EDR_tkr *)malloc (nbytes); // Initialize the data structure EDR_tkrUnpackInit (tkr); for_each_event { EBF_dirCompose (dir, evt); EDR_tkrUnpackReset (tkr); // .. assuming tower 1 looks interesting EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackStripsTowerBit(1)); // .. maybe towers 6 & 7 look interesting EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackStripsTowerBit(6) |EDR__tkrUnpackStripsTowerBit(7)); // .. perhaps one has a routine that looks for interesting towers towers = look_for_something_interest (...); EDR_tkrUnpack (tkr, dir, towers); } // At some time latter, one may wish to grab the TOTs EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackTotsTowerBit (6)); // ..or may wish every tower that has data to be completely unpacked EDR_tkrUnpack (tkr, dir, -1);
enum _EDR_TKRUNPACK_M |
Convenience symbols for unpacking all strip, TOT or both from all towers with data.
static unsigned int __inline EDR__tkrUnpackTowerBitStrips | ( | int | tower | ) | [static] |
Constructs the bit mask indicating to unpack the strip data for the specified tower number.
tower | The tower number to construct the bit mask for |
static unsigned int __inline EDR__tkrUnpackTowerBitTots | ( | int | tower | ) | [static] |
Constructs the bit mask indicating to unpack the TOT data for the specified tower number.
tower | The tower number to construct the bit mask for |
Driver routine to unpack the specified TKR towers.
tlr | The TKR LAT record structure to receive the unpacked data | |
dir | The standard directory structure allowing the routine to traverse the LAT event record. | |
stripsTots | A 32-bit word composed of two 16-bit masks. The upper 16-bit mask represents towers to unpack the strip data, the lower towers to unpack the TOT data. In both cases the MSB of the mask = Tower 0. |
status = EDR_tkrUnpack (tlr, tkr, -1);
Will completely unpack both the strip data and the TOT data from all towers that have data. Also note that when examining the structure field member, twrMap, that it will always be a proper subset of those towers that have data.
int EDR_tkrUnpackInit | ( | EDR_tkr * | tlr | ) |
Performs one time initialization of a Track LAT record.
tlr | Pointer to the structure to initialize |
void EDR_tkrUnpackReset | ( | EDR_tkr * | tlr | ) |
Resets the tlr record, preparing it to receive another unpacked event.
tlr | Pointer to the structure to reset. |
EDR_tkrUnpackReset (tkr); EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackTowerNum(1)); EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackTowerNum(4)); EDR_tkrUnpack (tkr, dir, EDR__tkrUnpackTowerNum(8) | EDR__tkrUnpackTowerNum(9));
int EDR_tkrUnpackSizeof | ( | void | ) |
Returns the size, in bytes, of a EDR_tkr.
After allocating an EDR_tkr structure, the structure should be initialized using EDR_tkrUnpackInit().