SIU Archive Files BFEM IVTE Files
How Does it Work?
For each event packet - ROOTWriter uses the known offsets of the subpackets to
find the subsystem data. Once found, the data is then read into an
intermediate structure - each type of subpacket has its own structure - used
internally by ROOTWriter. This is a storage place for the data until we
are ready to convert the data into our Root objects.
ACD
Here is the ACD event packet for the 1999
GLAST testbeam.
The 24 PHA values for the ACD for each event are extracted from the ACD
subpacket starting at the ACDE_C0A0 offset, and stored in an intermediate
structure to be used during conversion into Root, in the routine ROOTWriter::addACDData.
CAL
Here is the CAL event packet for the 1999 GLAST
Testbeam.
In this format CAL data is separated into 4 subpackets - when in 4 range
mode...each subpacket corresponds to one range. ROOTWriter handles this by
reading in each of the 4 subpackets and storing them in a single buffer for use
during the conversion to ROOT.
The gain is obtained by reading the CALE_SEQNUM, where the gains are arranged as
follows:
Gain | CALE_SEQNUM |
LEX4 | 0 |
LE | 1 |
HEX8 | 2 |
HE | 3 |
The CAL data is located at CALE_FIFO within the subpacket.
The format of the data from the FIFO is defined the CAL's
ICD document, Table 14 ADC Readout Order in TEM 84 Word Event Message.
ROOTWriter will store the FIFO for each of the gains in one buffer that is then
accessed later to obtain the data to convert into ROOT. During that
conversion, performed within ROOTWriter::addCalData, the ADC values are accessed
from the raw data buffer (which now contains all gain ranges) via the row and
column identifiers to offset into the appropriate location with the buffer to
extract the ADC values.
It does not appear that the dead time or dead time cause was extracted from the
CAL subpacket.
TKR
Here is the TKR event packet for the 1999
GLAST Testbeam.
All of the trigger data is obtained from the TKR subpacket. The TKR FIFO
data is located at the TKRE_DATA offset. Processing of the TKR FIFO data
continues until the EOF bits are located (0xbffebfff). Each 16 bit word is
extracted from the data buffer and processed. These 16 bit words may be
one of 6 types, as described in James Wallace's document (10-21-99) "L1T
and Tracker FIFO Data Formats (TEM TKR VME2)":
Controller/Number-of-Hits Value
Error-Flag/Time Over Threshold Value
Hit Address Value
CRC Value (optional)
Dummy-Odd Value
End-Of-File-Odd/Even Value
The 16 bit word is processed according to its type and stored in
an intermediate structure for use later during the conversion to Root objects in
the routine ROOTWriter::addTkrData.