Orion
high-rate readout
Classes | Typedefs | Enumerations | Functions | Variables
fragheader.hpp File Reference

Fragment headers. More...

#include <cassert>
#include <vector>
#include <span>
Include dependency graph for fragheader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  itk::fragment::FelixPacket
 Felix Packet structure. More...
 
struct  itk::fragment::FelixID
 
struct  itk::fragment::FLX::Header
 
struct  itk::fragment::SWROD::Header
 
struct  itk::fragment::ROD::Header
 
struct  itk::fragment::ROD::Trailer
 
struct  itk::fragment::ROB::BaseHeader
 
struct  itk::fragment::ROB::Header< n >
 

Typedefs

using itk::fragment::uint = uint32_t
 

Enumerations

enum  itk::fragment::ROB::checksum_t { itk::fragment::ROB::CHECKSUM_NONE = 0x0 , itk::fragment::ROB::CHECKSUM_CRC16 = 0x1 , itk::fragment::ROB::CHECKSUM_ADLER32 = 0x2 }
 Checksum type. More...
 

Functions

struct itk::fragment::FelixID itk::fragment::__attribute__ ((packed, aligned(4)))
 
struct itk::fragment::FLX::Header itk::fragment::FLX::__attribute__ ((packed, aligned(4)))
 
struct itk::fragment::SWROD::Header itk::fragment::SWROD::__attribute__ ((packed, aligned(4)))
 
struct itk::fragment::ROD::Header itk::fragment::ROD::__attribute__ ((packed, aligned(4)))
 
template<int n>
struct itk::fragment::ROB::Header itk::fragment::ROB::__attribute__ ((packed, aligned(4)))
 

Variables

union {
   uint64_t   felix_id
 
   struct {
      uint   stream_id: 8
 
      union {
         struct {
            uint   transport_id: 14
 
            uint   link_id: 14
 
         } 
 
         struct {
            uint   proto_id: 7
 
            uint   direction: 1
 
            uint   elink_id: 19
 
            uint   virtlink: 1
 
         } 
 
      } 
 
      uint   connector_id: 16
 
      uint   detector_id: 8
 
      uint   version_id: 4
 
   } 
 
}; 
 
uint32_t fragment_size = 0
 header marker More...
 
uint8_t padding_bytes
 size of fragment in words
 
uint8_t felix_status = 0
 bytes added to align to word More...
 
uint8_t format_type
 Virtual[1].ElinkID[19].
 
uint8_t swrod_status = 0
 format type More...
 
uint32_t timestamp = 0
 SWROD status. More...
 
uint16_t size = 0
 
constexpr uint32_t itk::fragment::SWROD::HEADER_SIZE = sizeof(Header)/4
 SWROD header size.
 
constexpr uint32_t itk::fragment::ROD::HEADER_MARKER = 0xee1234ee
 ROD Header marker.
 
constexpr uint32_t itk::fragment::ROD::HEADER_SIZE = 9
 ROD Header fragment size.
 
uint32_t header_marker = HEADER_MARKER
 
uint32_t header_size = HEADER_SIZE
 header marker, for ROD = 0xee1234ee More...
 
uint32_t format_version
 header size in words
 
uint32_t source_id = 0
 format version major[16].minor[16]
 
uint32_t run_number
 origin of the fragment : optional[8].sub-detector[8].ROL[16]
 
uint32_t ext_l1id
 run number
 
uint32_t bcid
 extended Level1 ID : ecr[8].l1id[24]
 
uint32_t trigger_type
 bunch crossing ID : bcid[12]
 
uint32_t event_type
 Leve1 ID trigger type.
 
uint32_t status_size = 0
 origin of the fragment [sub-detector id, module id]
 
uint32_t data_size = 0
 number of status elements
 
uint32_t status_pos = 1
 number of data elements
 
enum itk::fragment::ROB::checksum_t itk::fragment::ROB::__attribute__
 
constexpr uint32_t itk::fragment::ROB::HEADER_MARKER = 0xdd1234dd
 ROB Header marker.
 
uint32_t status [n]
 number of status elements
 
uint32_t checksum_type = 0
 status elements
 
uint32_t felix_device = 0xF
 Timestamp for ROB in bunch crossing.
 

Detailed Description

Fragment headers.

Author
Orion

Enumeration Type Documentation

◆ checksum_t

Checksum type.

Enumerator
CHECKSUM_NONE 

No checksum.

CHECKSUM_CRC16 

CRC-16/CCITT checksum.

CHECKSUM_ADLER32 

Adler-32 checksum.

Variable Documentation

◆ felix_status

uint8_t felix_status = 0

bytes added to align to word

size of fragment including header in 4 byte words

◆ fragment_size

uint32_t fragment_size = 0

header marker

32 24 16 8 0 ╭──────╮╭──────╮╭──────╮╭──────╮ [status][][...fragment_size....] [.type.][.... packet_size......] ..link...][.transport..][stream] [........timestamp.........][... ╰──────╯╰──────╯╰──────╯╰──────╯

◆ header_size

uint32_t header_size = HEADER_SIZE

header marker, for ROD = 0xee1234ee

size of fragment in words

◆ size

uint16_t size = 0

32 24 16 8 0 ╭──────╮╭──────╮╭──────╮╭──────╮ [swrod.][status][.....size.....] [............link_id...........] ╰──────╯╰──────╯╰──────╯╰──────╯

◆ swrod_status

uint8_t swrod_status = 0

format type

felix status

◆ timestamp

uint64_t timestamp = 0

SWROD status.

check sum type, after status elements

Detector Specific Header ╭──────╮╭──────╮╭──────╮╭──────╮ ...........timestamp...........] [..........timestamp............ -—[V.][.Det..][..Connector...] ╰──────╯╰──────╯╰──────╯╰──────╯