.. _EventTypes: Payload Types - Events ---------------------- The following payload event types are supported by ``payload-parsing``. Below summarizes the byte format for a given event payload. Please see the docs for the various :ref:`hit and trigger types ` for what may be contained in an event. Additional payload mapping information can be found :wiki:`here `. Type 13 ^^^^^^^ Payload for V2 event, hits can be of type 9 (trigger request payload) or type 11 (composite hit payloads). +---------------+----------+-------------------------------------------------------------+ | Byte Location | Length | Description | +===============+==========+=============================================================+ | 0 | 4 | Payload Length | +---------------+----------+-------------------------------------------------------------+ | 4 | 4 | Payload ID (0x0000000D or 0x00000012) | +---------------+----------+-------------------------------------------------------------+ | 8 | 8 | Payload Event Time | +---------------+----------+-------------------------------------------------------------+ | 16 | 2 | RecordType (magic number identifying the payload internal | | | | record format) | +---------------+----------+-------------------------------------------------------------+ | 18 | 4 | Event ID | +---------------+----------+-------------------------------------------------------------+ | 22 | 4 | Source ID of event builder (7000 decimal) | +---------------+----------+-------------------------------------------------------------+ | 26 | 8 | UTC0 (beginning time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 34 | 8 | UTC1 (end time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 42 | 4 | Event Type | +---------------+----------+-------------------------------------------------------------+ | 46 | 4 | Event Config ID (deprecated) | +---------------+----------+-------------------------------------------------------------+ | 50 | 4 | Run Number | +---------------+----------+-------------------------------------------------------------+ | 54 | 4 | Bytes in the following bundle of payloads | +---------------+----------+-------------------------------------------------------------+ | 58 | 2 | Composite payload type | +---------------+----------+-------------------------------------------------------------+ | 60 | 2 | Number of following payloads | +---------------+----------+-------------------------------------------------------------+ | 62 | Variable | Collection of *N* payloads (one trigger request, and *N*-1 | | | | readout data payloads in the composite tail) | +---------------+----------+-------------------------------------------------------------+ Type 19 ^^^^^^^ Payload for V3 event, hits can be of type 9 (trigger request payload) or type 11 (composite hit payloads). +---------------+----------+-------------------------------------------------------------+ | Byte Location | Length | Description | +===============+==========+=============================================================+ | 0 | 4 | Payload Length | +---------------+----------+-------------------------------------------------------------+ | 4 | 4 | Payload ID (0x0000000D or 0x00000012) | +---------------+----------+-------------------------------------------------------------+ | 8 | 8 | Payload Event Time | +---------------+----------+-------------------------------------------------------------+ | 16 | 2 | RecordType (magic number identifying the payload internal | | | | record format) | +---------------+----------+-------------------------------------------------------------+ | 18 | 4 | Event ID | +---------------+----------+-------------------------------------------------------------+ | 22 | 4 | Source ID of event builder (7000 decimal) | +---------------+----------+-------------------------------------------------------------+ | 26 | 8 | UTC0 (beginning time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 34 | 8 | UTC1 (end time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 42 | 4 | Event Type | +---------------+----------+-------------------------------------------------------------+ | 46 | 4 | Run Number | +---------------+----------+-------------------------------------------------------------+ | 50 | 4 | Subrun Number | +---------------+----------+-------------------------------------------------------------+ | 54 | 4 | Bytes in the following bundle of payloads | +---------------+----------+-------------------------------------------------------------+ | 58 | 2 | Composite payload type | +---------------+----------+-------------------------------------------------------------+ | 60 | 2 | Number of following payloads | +---------------+----------+-------------------------------------------------------------+ | 62 | Variable | *n* composite payload envelopes | +---------------+----------+-------------------------------------------------------------+ Type 20 ^^^^^^^ Payload for V4 event, hits can be of type 9 (trigger request payload) or type 11 (composite hit payloads). +---------------+----------+-------------------------------------------------------------+ | Byte Location | Length | Description | +===============+==========+=============================================================+ | 0 | 4 | Payload Length | +---------------+----------+-------------------------------------------------------------+ | 4 | 4 | Payload ID (0x0000000D or 0x00000012) | +---------------+----------+-------------------------------------------------------------+ | 8 | 8 | Payload Event Time | +---------------+----------+-------------------------------------------------------------+ | 16 | 2 | RecordType (magic number identifying the payload internal | | | | record format) | +---------------+----------+-------------------------------------------------------------+ | 18 | 4 | Event ID | +---------------+----------+-------------------------------------------------------------+ | 22 | 4 | Source ID of event builder (7000 decimal) | +---------------+----------+-------------------------------------------------------------+ | 26 | 8 | UTC0 (beginning time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 34 | 8 | UTC1 (end time of the event readout aperture) | +---------------+----------+-------------------------------------------------------------+ | 42 | 2 | Year of Event | +---------------+----------+-------------------------------------------------------------+ | 44 | 2 | UNUSED | +---------------+----------+-------------------------------------------------------------+ | 46 | 4 | Run Number | +---------------+----------+-------------------------------------------------------------+ | 50 | 4 | Subrun Number | +---------------+----------+-------------------------------------------------------------+ | 54 | 4 | Bytes in the following bundle of payloads | +---------------+----------+-------------------------------------------------------------+ | 58 | 2 | Composite payload type | +---------------+----------+-------------------------------------------------------------+ | 60 | 2 | Number of following payloads | +---------------+----------+-------------------------------------------------------------+ | 62 | Variable | *n* composite payload envelopes | +---------------+----------+-------------------------------------------------------------+ Type 21 ^^^^^^^ Payload for V5 event, hits can be of type 91 (trigger request payload), type 25 (V5 hit record), or type 26 (engineering record of V5 payload). This payload type has been the implemented data type for all data from IC79 and beyond. +---------------+----------+----------------------------------------------------+ | Byte Location | Length | Description | +===============+==========+====================================================+ | 0 | 4 | Payload Length | +---------------+----------+----------------------------------------------------+ | 4 | 4 | Payload ID (0x0000000D or 0x00000012) | +---------------+----------+----------------------------------------------------+ | 8 | 8 | Payload Event Start Time | +---------------+----------+----------------------------------------------------+ | 16 | 4 | Payload Event End Time | +---------------+----------+----------------------------------------------------+ | 20 | 2 | Year of Event | +---------------+----------+----------------------------------------------------+ | 22 | 4 | Event Number | +---------------+----------+----------------------------------------------------+ | 26 | 4 | Run Number | +---------------+----------+----------------------------------------------------+ | 30 | 4 | Subrun Number | +---------------+----------+----------------------------------------------------+ | 34 | 4 | Number or hit records *H* | +---------------+----------+----------------------------------------------------+ | 38 | *R* | *H* hit records | +---------------+----------+----------------------------------------------------+ | 38 + *R* | 4 | Number of Trigger Records | +---------------+----------+----------------------------------------------------+ | 42 + *R* | Variable | Trigger Records | +---------------+----------+----------------------------------------------------+ Type 22 ^^^^^^^ Payload for V6 event, hits can be of type 91 (trigger request payload), type 25 (V5 hit record), or type 26 (engineering record of V5 payload). Only used in a a few debugging runs and abandoned because compression required too much ``evbuilder`` CPU. +---------------+----------+----------------------------------------------------+ | Byte Location | Length | Description | +===============+==========+====================================================+ | 0 | 4 | Payload Length | +---------------+----------+----------------------------------------------------+ | 4 | 4 | Payload ID (0x0000000D or 0x00000012) | +---------------+----------+----------------------------------------------------+ | 8 | 8 | Payload Event Start Time | +---------------+----------+----------------------------------------------------+ | 16 | 4 | Payload Event End Time | +---------------+----------+----------------------------------------------------+ | 20 | 2 | Year of Event | +---------------+----------+----------------------------------------------------+ | 22 | 4 | Event Number | +---------------+----------+----------------------------------------------------+ | 26 | 4 | Run Number | +---------------+----------+----------------------------------------------------+ | 30 | 4 | Subrun Number | +---------------+----------+----------------------------------------------------+ | 34 | 1 | 0 (to indicate that the hit records were not | | | | compressed) | +---------------+----------+----------------------------------------------------+ | 35 | 4 | Number or hit records *H* | +---------------+----------+----------------------------------------------------+ | 39 | *R* | *H* hit reconds | +---------------+----------+----------------------------------------------------+ | 39 + *R* | 4 | Number of Trigger Records | +---------------+----------+----------------------------------------------------+ | 43 + *R* | Variable | Trigger Records | +---------------+----------+----------------------------------------------------+