Skip to content
asteencern edited this page Aug 2, 2017 · 10 revisions

RPI format (8 bit)

For the beam test on 8-15 May 2017, we used RPI based DAQ, hence the data was in the format of 8-bit packing used by Tomasso/Sandro.

  • First byte of the data is always FF (all ones)
  • For the rest of the data, first 4 bits are 1000, and the last for encode the data of four SkiRoc chips.
  • The size of one event is 30787 bytes.
  • There was no header

Within euDAQ the data is converted to 32-bit packing in order to have the same format as in anticipated IPbus read-out. (This means just adding 24 zeros to every byte). A script to do this conversion can be found at producers/cmshgcal/scripts/Convert8bitTo32bit.py

IPbus format (32 bit)

The data format from ORM/SkiRocs during July test beam was based on RPI format of 32 bit words. Each bit is encoding one SkiRoc. The length of the array is 1924*16 (skiroc data) + 1 (or 2, for mask or something else). Below are various versions of this format used during data-taking

Version 1.0 (IPbus)

This is 32 bit format that was used during July test beam when the data was taken via RPIs (runs 1241-EOF).

  • Global Header (changed with respect Version 0.2). It contains 3 (three) 32 bits words:

    1. Date of StartRun,
    2. Number of readout boards (8 bits) and the run number (24 bits)
    3. Format Version: 1
  • Event data (changed with respect Version 0.2):

Var type bytes Description
SkiMask uint32 4 Bits with data should be set to 1, no data = 0.
data[] array of uint32 123136 Raw data from 4 skiroc chips, 1924*16 of 32bit words
Trailer array of uint32 8 Trailer added by the firmware: 2*32 bit words equal to 0xaaaaaaaa
Trailer uint32 4 First 8 bits: ORM ID number; last 24 bits: trigger (event) number
Trailer uint32 4 Trigger timestamp part 1
Trailer uint32 4 Trigger timestamp part 2
  • Global trailer (added to the end of the output file): contains the date of the StopRun command.

Version 0.2 (IPbus)

This is 32 bit format that was used during July test beam when the data was taken via RPIs (runs 1100-1237).

  • Global Header (added in the beginning of the raw output file). It contains 2 (two) 32 bits words:

    1. Date of StartRun,
    2. Number of readout boards (8 bits) and the run number (24 bits)
  • Event data (same as in Version 0.1):

Var type bytes Description
SkiMask uint32 4 Bits with data should be set to 1, no data = 0.
data[] array of uint32 123136 Raw data from 4 skiroc chips, 1924*16 of 32bit words
Trailer array of uint32 8 Trailer added by the firmware: 2*32 bit words equal to 0xaaaaaaaa
Trailer uint32 4 First 8 bits: ORM ID number; last 24 bits: trigger (event) number
  • Global trailer (added to the end of the output file): contains the date of the StopRun command.

Version 0.1 (RPI)

This is 32 bit format that was used during July test beam when the data was taken via RPIs (runs 900-1099).

Var type bytes Description
SkiMask uint32 4 Bits with data should be set to 1, no data = 0.
data[] array of uint32 123136 Raw data from 4 skiroc chips, 1924*16 of 32bit words
Trailer array of uint32 8 2*32 bit words with same information as in the SkiMask
Trailer uint32 4 The last word added to check endiennes: 0x0a0b0c0d

Proposed format (never used)

  • Header
Var type bytes Description
Version unsigned char 1 A small number to indicate the version of the dataformat being used.
This is to account for the possible change between different beam tests.
Char (=0) unsigned char 1 Just another char reserved for some other ID (just so have total number of bytes dividable by 4)
Board ID unsigned short 2 ReadOut board ID or ORM ID or HexaBoard ID (depending on how data packets are split)
Event number unsigned int 4 Event number since the begin of RUN
Trigger ID unsigned int 4 Triggers since the begin of RUN.
Not clear if that would be possible. However it would be nice if ORM could count all incoming triggers and for each event tell the trigger count. This would help to synchronize the data between HexaBoards and wire-chambers.
Timestamp unsigned long long 8 If possible we would like to have a timestamp with nanosecond precision (maybe even picoseconds?). This could be an absolute value or the time since the begin of RUN.
Total 20 This is 5 words of 32-bits (used by IPbus transmission)
  • Data
Var type bytes Description
SkiMask uint32 4 Bits with data should be set to 1, no data = 0.
data[] array of uint32 123136 Raw data from 4 skiroc chips, 1924*16 of 32bit words
Closing uint32 4 The last byte which may or may not be added to the data.