First effort on raw data tape simulation

From GlueXWiki
Jump to: navigation, search

Output from mc2coda for an empty crate (simulating block mode readout with block size = 1, pulse integral mode readout of FADC's). Each of 16 empty slots generates 4 words (block header, event header, trigger time, block trailer):


 <bank content="bank" data_type="0x10" tag="7" num="1" nchildren="1">
     <bank content="uint32" data_type="0x1" tag="0" num="1" nwords="64">
            0x808c0801     0x90800001     0x98000064     0x88000004     0x80cc0801     
            0x90c00001     0x98000064     0x88000004     0x810c0801     0x91000001     
            0x98000064     0x88000004     0x814c0801     0x91400001     0x98000064     
            0x88000004     0x818c0801     0x91800001     0x98000064     0x88000004     
            0x81cc0801     0x91c00001     0x98000064     0x88000004     0x820c0801     
            0x92000001     0x98000064     0x88000004     0x824c0801     0x92400001     
            0x98000064     0x88000004     0x834c0801     0x93400001     0x98000064     
            0x88000004     0x838c0801     0x93800001     0x98000064     0x88000004     
            0x83cc0801     0x93c00001     0x98000064     0x88000004     0x840c0801     
            0x94000001     0x98000064     0x88000004     0x844c0801     0x94400001     
            0x98000064     0x88000004     0x848c0801     0x94800001     0x98000064     
            0x88000004     0x84cc0801     0x94c00001     0x98000064     0x88000004     
            0x850c0801     0x95000001     0x98000064     0x88000004     
     </bank>


Proposed compressed mode eliminates empty slots and crates, compresses 4 slot words down to a single slot header word, and eliminates some intermediate banks. This is the first few banks of a compressed event. New slot header word includes slot number and number of hit words to follow:


<bank content="bank" data_type="0x10" tag="65361" num="2" nchildren="40">
  <bank content="segment" data_type="0x20" tag="65313" num="63" nchildren="2">
     <segment content="uint64" data_type="0xa" tag="1" nwords="2">
                                     0x1                             0x64     
     </segment>
     <segment content="uint16" data_type="0x5" tag="1" nwords="2">
                 0          0     
     </segment>
  </bank>
  <bank content="uint32" data_type="0x1" tag="1" num="2" nwords="141">
         0xe0900010     0xb8203138     0xc0203138     0xb8403138     0xc0403138     
         0xb9003138     0xc1003138     0xb9203138     0xc1203138     0xbac03138     
         0xc2c03138     0xbae03138     0xc2e03138     0xbba03138     0xc3a03138     
         0xbbb03138     0xc3b03138     0xe0d0000a     0xb8f03138     0xc0f03138     
         0xb9103138     0xc1103138     0xba103138     0xc2103138     0xba203138     
         0xc2203138     0xbc703138     0xc4703138     0xe110000a     0xb8e03138     
         0xc0e03138     0xb9003138     0xc1003138     0xbb403138     0xc3403138     
         0xbb603138     0xc3603138     0xbc503138     0xc4503138     0xe1500008     
         0xb8203138     0xc0203138     0xbae03138     0xc2e03138     0xbb003138     
         0xc3003138     0xbc303138     0xc4303138     0xe1900008     0xbaa03138     
         0xc2a03138     0xbac03138     0xc2c03138     0xbbe03138     0xc3e03138     
         0xbc303138     0xc4303138     0xe1d00006     0xbb203138     0xc3203138     
         0xbb303138     0xc3303138     0xbc503138     0xc4503138     0xe210000a     
         0xb8203138     0xc0203138     0xb8603138     0xc0603138     0xb8643138     
         0xc0643138     0xbba03138     0xc3a03138     0xbc103138     0xc4103138     
         0xe2500006     0xb9103138     0xc1103138     0xb9203138     0xc1203138     
         0xb9243138     0xc1243138     0xe350000a     0xb8703138     0xc0703138     
         0xb8e03138     0xc0e03138     0xba603138     0xc2603138     0xba643138     
         0xc2643138     0xba683138     0xc2683138     0xe390000a     0xb9f03138     
         0xc1f03138     0xba603138     0xc2603138     0xbc003138     0xc4003138     
         0xbc043138     0xc4043138     0xbc103138     0xc4103138     0xe3d00002     
         0xbc103138     0xc4103138     0xe4100006     0xb9903138     0xc1903138     
         0xb9943138     0xc1943138     0xb9a03138     0xc1a03138     0xe4500008     
         0xb9f03138     0xc1f03138     0xba303138     0xc2303138     0xbbc03138     
         0xc3c03138     0xbbf03138     0xc3f03138     0xe4d0000c     0xb8a03138     
         0xc0a03138     0xb8b03138     0xc0b03138     0xb8e03138     0xc0e03138     
         0xba603138     0xc2603138     0xba803138     0xc2803138     0xba903138     
         0xc2903138     0xe5100004     0xbc003138     0xc4003138     0xbc403138     
         0xc4403138     
  </bank>


Average mc2coda event size using MC sample from Dave L is 6300 words, compression average is factor of 3:

Compress in out.png

Ratio of event sizes and number of real hits/event:

Compress r hits.png

In vs Out size:

Compress in vs out.png

In and Out size vs nhits:

Compress size nhits.png