MPD Raw Data Format

Data file constructed with following TLV-like block.

TLV block

Block Header

word #

byte offset

description

0

0

Sync word (32-bit integer)

1

4

Block payload length: N bytes (32-bit integer)

Block Payload

2

8

Block payload

...

...

N+1

4(N+1)

Sync words can be one of these:

Previously there were blocks that doesn't suit TLV-format:

Regular event block

Event payload

32-bit word #

description

0

Event number

Devices Payload

Device Event Block #1

1

Device Block from a device (S1 bytes)

...

1+(S1/4-1)

Device Event Block #2

1+S1/4

Device Block from a device (S2 bytes)

...

1+S1/4+(S2/4-1)

...

Till the last block

...

In this case Regular event block payload length should be equated to the sum of the event number field and all blocks length: (4 + S1 + S2 + ...) bytes.

Device Event Block

Device Event Header

word #

byte offset

bits

description

0

0

31:0

Device Serial Number

1

4

31:24

Device ID

23:0

Device Event Payload Length: 4*N bytes

Device Event Payload

2

8

Block payload

...

...

N+1

4(N+1)

Some devices splits their payload onto MStream Block. In this case Device Event Payload will be foloving:

Device Event Payload

MStream Block #1

32-bit word #

description

0

MStream Block (S1 32-bit words)

...

S1-1

MStream Block #2

S1

MStream Block (S2 32-bit words)

...

S1+(S2-1)

...

In this case Device Event Payload Length should be equaled to: 4*N = 4*(S1+S2+...) bytes.

MStream Block

MStream Header

0

0

31:24

Subtype-defined bits

23:2

MStream Payload Length: S 32-bit words

1:0

MStream Subtype

MStream payload

1

4

31:0

MStream payload

...

S

4*S

31:0

Statistic block

Statistic payload

32-bit word #

description

0

Reserved 32-bit field

Devices Payload

Device Event Block #1

1

Device Block from a device (S1 bytes)

...

1+(S1/4-1)

Device Event Block #2

1+S1/4

Device Block from a device (S2 bytes)

...

1+S1/4+(S2/4-1)

...

Till the last block

...

Statistic block is a successor of End-of-burst block (old format) Instead of the event number field, there will be a reserved 32-bit field. The remainder is a sequence of Device Event Blocks (same as in Regular event block)

Complex TLV Block (Start/Stop of Run/File)

Start/Stop Header

32-bit word #

description

0

Sync word:
0x72617453 - run start
0x706F7453 - run stop
0x67654246 - file begin
0x646E4546 - file end

1

Payload length: (S1+S2+...) bytes

Start/Stop Payload

TLV Record #1

2

TLV Record (S1 bytes)

...

2+(S1/4-1)

TLV Record #2

2+S1/4

TLV Record (S2 bytes)

...

2+S1/4+(S2/4-1)

...

At this moment Start/Stop Run payload can contains:

File begin/end contains following payloads:

Run Number Record

Run Number Record

32-bit word #

description

0

Sync word 0x236E7552

1

Block length: 4 bytes

2

Run number

Run Index Record

Run Index Record

32-bit word #

description

0

Sync word 0x78646E49

1

Block length: index length in bytes (N-2)*4

2

Run index (in Latin1)

...

N-1

Event order Record

Run Number Record

32-bit word #

description

0

Sync word 0x71655345

1

Block length: 4 bytes

2

Event number order

This field defines what event numbers will be stored in current file.

Only those that meet the following condition will be saved:

EvNum % EvNumShift == EvNumOrder

File Id Record

Run Number Record

32-bit word #

description

0

Sync word 0x64496946

1

Block length: 4 bytes

2

File id

'File id' is sequential number of file since Star Run (0 - for 1st file).

JSON block

This type reserved for future usage such as:

Non-TLV blocks

Block Header

word #

byte offset

description

0

0

Sync word (32-bit integer)

1

4

Block payload length: N bytes (32-bit integer)

2

8

Event number (32-bit integer)

Block Payload

3

12

Block payload

...

...

N+1

4(N+1)

This blocks has sync-word 0x2A502A50 (Regular event) or 0x4A624A62 (EOB). The difference between Regular event block and old format block (sync:0x2A502A50) is including of event number field into block payload. This type of block is deprecated. Since Run of 2022, they will be excluded.

Virtual devices

List of virtual deices:

Data Samples

Some real data captures: MpdDaqSampleData


MPD MStream RawData

MpdDeviceRawDataFormat (last edited 2022-12-16 15:07:55 by filippov)