Wiki

Clone wiki

dsproto_daq / DataFormat

Data Format

Data is stored as midas events. The overall structure of a midas event is documented on the midas wiki. The first and last events of each file are "special" and contain the ODB content (as either XML or JSON, depending on when the data was taken).

MIDAS Event

The "interesting" events have an "event ID" of 1, and each event contains 5 banks of data: ZMQ0, W200, W201, W202, W203. ZMQ0 contains information from the chronobox; the others contain information from the V1725 digitizers.

Midas' mdump utility can be used to dump events to screen, and a lightly annotated version is shown below:

mdump -m r

      <        Midas Event Header      >  <  Bank Header  > <     Bank
      tmsk/ID    Evt#   TimeStamp evtsze    size     Flag   bk_name  bk_type  
 0->: 00020001 00020cba 5c9e1168 0061a8ac 0061a8a4 00000011 30514d5a 00000006
             > < ZMQ0 data ...     ...      ...      ...      ...      ...
      bk size  
 8->: 00000028 01159cca 00020cbb 00015a4d ec78d234 00000040 00010002 ffffffff
        ...      ...      ...  > <  W200 data ...  
16->: 00000000 ffffffff 00000000 30303257 00000006 00186a10 a0061a84 000040ff
24->: ff020cba ec78da03 00000000 00000000 00000000 00000000 00000000 00000000
32->: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

mdump -i 1 // Event ID=1 composed of 5 banks

                    ChronoBox bank
                    |  
                    v  <  4 x V1725   >  
banks:5 Bank list:-ZMQ0W200W201W202W203-

ChronoBox Bank

This bank contains 10 unsigned integers related to the chronobox.

Bank:ZMQ0 Length: 40(I*1)/10(I*4)/10(Type) Type:Unsigned Integer*4
    <Trigger#> <cTrg_acc> <cTrg_drp> <TimeStamp[LSW/MSW] > <Type/Rea> <enChMsk > <Trg patt>
1-> 0x0114dcbf 0x00014cb0 0x0000db78 0x2a72d896 0x00000029 0x00010002 0xffffffff 0x00000000
    <ChAssign> <   ???  >
9-> 0xffffffff 0x00000000

V1725 Bank

These bank contain 4 header values, then the samples from each channel. Full documentation is available on page 34 of the V1725 user manual.

Word 0:

  • Bits 31-28: 0xA
  • Bits 27-0: Event size in 32-bit words

Word 1:

  • Bits 31-27: Board ID
  • Bit 26: Indicates board failure if set
  • Bit 25: Reserved
  • Bit 24: 0
  • Bits 23-8: Trigger information
  • Bits 7-0: Channel mask (channels 7-0) - which channels were read out

Word 2:

  • Bits 31-24: Channel mask (channels 15-8) - which channels were read out
  • Bits 23-0: Event counter

Word 3:

  • Bits 31-0: Trigger time tag

Remaining words: Data for each enabled channel, in order of increasing channel number. Two samples per 32-bit word:

  • Bits 29-16: Sample 2N+1
  • Bits 14-0: Sample 2N

Annotated dump:

     Name         1.6MBytes -> 800Ksamples(2bytes,16ch) -> 50Ksamples/ch -> 200us/ch
Bank:W201 Length: 1600016(I*1)/400004(I*4)/400004(Type) Type:Unsigned Integer*4
       <evtSze>     <t >chmsk >evt# > timestamp> samp1samp0 samp3samp2 samp5samp4 samp7samp6
 1-> 0xa0061a84 0x00000bff 0xff005d69 0x8f89a325 0x3ad53ad5 0x3ad73ad1 0x3ad73ad2 0x3ada3ad4
       ...          ...
 9-> 0x3ad53ad6 0x3ad63ad5 0x3ad43ad4 0x3ad73ad3 0x3ad63ad5 0x3ad43ad7 0x3ad33ad8 0x3ad63ad6
17-> 0x3ad43ad3 0x3ad63ad2 0x3ad63ad3 0x3ad43adb 0x3ad53ad6 0x3ad83ad5 0x3ad63ad6 0x3ad33ad4
25-> 0x3ad73ad3 0x3ad73ad2 0x3ad53ad4 0x3ad43ad3 0x3ad43ad2 0x3ad43ad3 0x3ad63ad2 0x3ad53ad3
33-> 0x3ad53ad5 0x3ad73ad6 0x3ad03ad7 0x3ad33ad6 0x3ad63ad9 0x3ad53ad2 0x3ad23ad3 0x3ad13ad3

Updated