Bank check Qinzeng Peng 2007 Feb 19
Event header & bank header
Midas data sturcture for WFD Other staff WFD Segment 1 WFD Segment 2 …… WFD Segment m Other staff WFD bank 1 WFD bank 2 …… WFD bank n Request Got Status Block 1 Block 2 …… Blcok j Tail Fill 1Fill 2……Fill k 8 Dwords ADC 1 Dword ZERO 1 Dword Timestamp Run SegmentBankBlock Time space collectionmeasurement
Example: mdump look at Run# Event# Event# Evid:0003- Mask:0000- Serial:1- Time:0x435bf82b- Dsize:6176/0x1820 #banks:3 - Bank list:-DMNDMSRDCRNT- Bank:DMND Length: 2048(I*1)/512(I*4)/512(Type) Type:Real*4 (FMT machine dependent) 1-> 0x44d x44d8a000 0x44d4a000 0x x44ce8000 0x x x > 0x44cec000 0x x x x x x x > 0x44d8c000 0x44d x44ce4000 0x44e0e000 0x44e x44cb8000 0x44d7a000 0x > 0x44df8000 0x44da2000 0x44d0e000 0x x44c9a000 0x x x > 0x44dae000 0x44e2a000 0x44cc6000 0x44d x44d x44d x44c7a000 0x > 0x44ce2000 0x44e0e000 0x44e x x44dc0000 0x x x > 0x44d2a000 0x44dee000 0x44ddc000 0x44e x44d x44de6000 0x44f x > 0x44d x44d6c000 0x44e0c000 0x x448b4000 0x448c4000 0x x > 0x449f8000 0x x4491a000 0x44c5c000 0x449e8000 0x448ea000 0x x > 0x44eae000 0x44d x44eb8000 0x x44d x x x > 0x44db8000 0x44dd0000 0x44d4e000 0x44d6a000 0x44e x44d x44ddc000 0x44dd > 0x44e x44d x44d9e000 0x44e8c000 0x44de6000 0x44d x44d x > 0x44caa000 0x44d x44d x44d x44d x x44df2000 0x44cec > 0x44dac000 0x44d x44d x44c6c000 0x44dc0000 0x44d5e000 0x44d x > 0x x44e x44ef6000 0x448b6000 0x449c8000 0x44e x44e0c000 0x44d > 0x44dbc000 0x44e x44dc2000 0x449b8000 0x44aa8000 0x449da000 0x44b x > 0x44e x44e x44cbe000 0x44e2c000 0x44e1a000 0x44dea000 0x44df2000 0x > 0x4499a000 0x448b2000 0x4499a000 0x x44a4e000 0x x x > 0x44a x44a9c000 0x44d9a000 0x44e4a000 0x44d x44dd2000 0x44cc6000 0x44caa > 0x44d x44d x44c7a000 0x44c x44e x44d x44cec000 0x Event header Bank header
Event# Evid:0001- Mask:0000- Serial:1- Time:0x435bf6cb- Dsize: /0x #banks:298 - Bank list:- B1b0B1b1B1b2B1b3B1c0B1c1B1c2B1c3B1d0B1d1B1d2B1d3B1e0B1e1B1e2B1e3B1g0B1g1B1g2B1g3B 1h0B1h1B1h2B1h3B1i0B1i1B1i2B1i3B1j0B1j1B1j2B1j3B1l0B1l1B1l2B1l3B1p0B1p1B1p2B1p3B1q0B1q1B1q2B1q3B1s0B1s1B1 s2B1s3B2b0B2b1B2b2B2b3B2c0B2c1B2c2B2c3B2d0B2d1B2d2B2d3B2g0B2g1B2g2B2g3B2h0B2h1B2h2B2h3B2i0B2i1B2i2B2i3B2 j 0B2j1B2j2B2j3B2l0B2l1B2l2B2l3B2o0B2o1B2o2B2o3B2p0B2p1B2p2B2p3B2q0B2q1B2q2B2q3B2r0B2r1B2r2B2r3B3b0B3b1B3b2 B3b3B3c0B3c1B3c2B3c3B3d0B3d1B3d2B3d3B3e0B3e1B3e2B3e3B3g0B3g1B3g2B3g3B3h0B3h1B3h2B3h3B3i0B3i1B3i2B3i3B3j0 B 3j1B3j2B3j3B3k0B3k1B3k2B3k3B3l0B3l1B3l2B3l3B3p0B3p1B3p2B3p3B3q0B3q1B3q2B3q3B3r0B3r1B3r2B3r3B4b0B4b1B4b2B4 b3B4c0B4c1B4c2B4c3B4d0B4d1B4d2B4d3B4g0B4g1B4g2B4g3B4h0B4h1B4h2B4h3B4i0B4i1B4i2B4i3B4j0B4j1B4j2B4j3B4k0B4k 1B4k2B4k3B4l0B4l1B4l2B4l3B4o0B4o1B4o2B4o3B4p0B4p1B4p2B4p3B4q0B4q1B4q2B4q3B4r0B4r1B4r2B4r3B5b0B5b1B5b2B5b3 B5c0B5c1B5c2B5c3B5d0B5d1B5d2B5d3B5e0B5e1B5e2B5e3B5g0B5g1B5g2B5g3B5h0B5h1B5h2B5h3B5i0B5i1B5i2B5i3B5j0B5j1 B 5j2B5j3B5k0B5k1B5k2B5k3B5p0B5p1B5p2B5p3B5q0B5q1B5q2B5q3B5r0B5r1B5r2B5r3F5r1B6b0B6b1B6b2B6b3B6c0B6c1B6c2B6 c3B6d0B6d1B6d2B6d3B6e0B6e1B6e2B6e3B6g0B6g1B6g2B6g3B6h0B6h1B6h2B6h3B6i0B6i1B6i2B6i3B6j0B6j1B6j2B6j3B6k0B6k 1B6k2B6k3B6p0B6p1B6p2B6p3B6q0B6q1B6q2B6q3B6r0B6r1B6r2B6r3FI01- Bank:B1b0 Length: 10616(I*1)/2654(I*4)/2654(Type) Type:Unsigned Integer*4 1-> 0x00000a5a 0x00000a5a 0x x f 0x5295a367 0x x1c x > 0x x x x x x x1b4a8a9c 0x601c > 0x x x x0f x x x x > 0x7c7d4c14 0x x x x x x x > 0x003f00a0 0x x50a0ce7d 0x2f x1b x x x > 0x x x x e 0x122a6fac 0x914e1000 0x x > 0x x x x x005400b8 0x x1f63b3de 0x > 0x15271d11 0x x x x x x006f0ef8 0x c 65-> 0x51979d58 0x x x x x x x > 0x c 0x x a 0xb78a3f00 0x000f1b19 0x x x > 0x x x c 0x x9a x d 0x1b x > 0x x x x x00a106c8 0x x12184a94 0xbb7c2f00 97-> 0x00131d19 0x x x x x x00b x > 0x2670bec8 0x x141d1814 0x x x x x WFD segment mdump look at Run# 38160, continuing…
Event# Evid:0002- Mask:0000- Serial:1- Time:0x435bf82b- Dsize:216/0xd8 #banks:2 - Bank list:-SCLRACUM- Bank:SCLR Length: 92(I*1)/23(I*4)/23(Type) Type:Unsigned Integer*4 1-> 0x x d 0x x x x x x > 0x x x x x x x x c 17-> 0x x x x x x x Bank:ACUM Length: 92(I*1)/23(I*4)/23(Type) Type:Unsigned Integer*4 1-> 0x x d 0x x x x x x > 0x x x x x x x x c 17-> 0x x x x x x x Event# Evid:0001- Mask:0000- Serial:2- Time:0x435bf6cb- Dsize: /0x433bc8 #banks:298 - Bank list:- B1b0B1b1B1b2B1b3B1c0B1c1B1c2B1c3B1d0B1d1B1d2B1d3B1e0B1e1B1e2B1e3B1g0B1g1B1g2B1g3B 1h0B1h1B1h2B1h3B1i0B1i1B1i2B1i3B1j0B1j1B1j2B1j3B1l0B1l1B1l2B1l3B1p0B1p1B1p2B1p3B1q0B1q1B1q2B1q3B1s0B1s1B1 s2B1s3B2b0B2b1B2b2B2b3B2c0B2c1B2c2B2c3B2d0B2d1B2d2B2d3B2g0B2g1B2g2B2g3B2h0B2h1B2h2B2h3B2i0B2i1B2i2B2i3B2j 0B2j1B2j2B2j3B2l0B2l1B2l2B2l3B2o0B2o1B2o2B2o3B2p0B2p1B2p2B2p3B2q0B2q1B2q2B2q3B2r0B2r1B2r2B2r3B3b0B3b1B3b2 B3b3B3c0B3c1B3c2B3c3B3d0B3d1B3d2B3d3B3e0B3e1B3e2B3e3B3g0B3g1B3g2B3g3B3h0B3h1B3h2B3h3B3i0B3i1B3i2B3i3B3j0B ………………………………………………………………………………. Bank:B1b0 Length: 10136(I*1)/2534(I*4)/2534(Type) Type:Unsigned Integer*4 1-> 0x000009e2 0x000009e2 0x x x x x x > 0x x x x x000068b4 0x x64a1813a 0x00000b20 17-> 0x1e x x x x x x x > 0x3177bfaa 0x5f x1a1c1513 0x x x x x > 0x000305a8 0x11153a84 0xb4893d00 0x000d1c1b 0x x x x > 0x x x x x609e8640 0x03000c19 0x x > 0x14120e0f 0x x x x x x1e54897f 0x mdump look at Run# 38160, continuing…
Event# Evid:005a- Mask:0000- Serial:1- Time:0x435bf6cc- Dsize:56/0x38 #banks:2 - Bank list:-OADCOTMP- Bank:OADC Length: 16(I*1)/4(I*4)/4(Type) Type:Real*4 (FMT machine dependent) 1-> 0x4013aad1 0x4012c1da 0x401306fa 0x409155b0 Bank:OTMP Length: 4(I*1)/1(I*4)/1(Type) Type:Real*4 (FMT machine dependent) 1-> 0x41cc Event# Evid:000a- Mask:0000- Serial:1- Time:0x435bf6cd- Dsize:376/0x178 #banks:1 - Bank list:-DAWN- Bank:DAWN Length: 360(I*1)/90(I*4)/360(Type) Type:8 bit ASCII 1-> 0x01 0x00 0x00 0x00 0xcd 0xf6 0x5b 0x43 0x1f 0x00 0x00 0x00 0x21 0x00 0x00 0x00 17-> 0x1e 0x00 0x00 0x00 0xe7 0x0c 0x00 0x00 0x4b 0x13 0x00 0x00 0xab 0x2e 0x00 0x00 33-> 0xab 0x13 0x00 0x00 0xf0 0x0a 0x00 0x00 0xf0 0x0a 0x00 0x00 0x8c 0x0a 0x00 0x00 49-> 0x28 0x0a 0x00 0x00 0xb8 0x0b 0x00 0x00 0xf0 0x0a 0x00 0x00 0x02 0x00 0x00 0x00 65-> 0xcd 0xf6 0x5b 0x43 0x1d 0x00 0x00 0x00 0x1b 0x00 0x00 0x00 0x1e 0x00 0x00 0x00 81-> 0x10 0x0d 0x00 0x00 0x6e 0x13 0x00 0x00 0x25 0x2f 0x00 0x00 0x0e 0x14 0x00 0x00 97-> 0x28 0x0a 0x00 0x00 0x28 0x0a 0x00 0x00 0x28 0x0a 0x00 0x00 0xc4 0x09 0x00 0x > 0xc4 0x09 0x00 0x00 0xc4 0x09 0x00 0x00 0x03 0x00 0x00 0x00 0xcd 0xf6 0x5b 0x > 0x1e 0x00 0x00 0x00 0x1d 0x00 0x00 0x00 0x1e 0x00 0x00 0x00 0xd0 0x0c 0x00 0x00 After Event# 15 all are WFD events(segments) mdump look at Run# 38160, continuing …
More about Midas File One run contains mainly WFD data and EMC data, identified by different EVID# in different segments. WFD segment is identified by event header information: event_id = 1(Evid:0001) Useful information: serial_number for segment SN(Serial:?), data_size for total data recorded, #banks, bank list. Pheader->event_id == 1 for WFD data Pheader->serial_number for segment# Pheader->data_size for total data size in current event(segment) nBanks = bk_list(pevent, banklist)
Event# Evid:0001- Mask:0000- Serial:2- Time:0x435bacc7- Dsize: /0x41bd88 #banks:298 - Bank list:- B1b0B1b1B1b2B1b3B1c0B1c1B1c2B1c3B1d0B1d1B1d2B1d3B1e0B1e1B1e2B1e3 ····················································································· Bank:B1b0 Length: 9736(I*1)/2434(I*4)/2434(Type) Type:Unsigned Integer*4 1-> 0x e 0x e 0x x x x x x > 0x x x x x0000d504 0x x a 0xe7fa > 0x x x x x x x003108a8 0x > 0x c 0x0d x x x x x x > 0x003801e0 0x x x x x x x > 0x x x004201c4 0x a 0x54a0c077 0x2a00000e 0x x ····················································································· 2393-> 0x0aad01c4 0x e 0x x x x x f 0x > 0x x x0ab208ec 0x d 0x6ca4a66c 0x x1b x > 0x x x x x0acd008c 0x x132a5147 0x1b > 0x x x x x x x0ada011c 0x > 0x x e 0x x x x x x > 0x0b0c05fc 0x000004a6 Data structure for WFDs Each run (file) contains m segments (events) RUN#: Each segment has 2845 Fills Each fill has 5 μs collection time and 22 μs measurement time Pulses hit on different channels will be recorded in corresponding WFD banks
Data structure for WFDs Bank:B1b0 Length: 9736(I*1)/2434(I*4)/2434(Type) Type:Unsigned Integer*4 1-> 0x e 0x e 0x x x x x x > 0x x x x x0000d504 0x x a 0xe7fa > 0x x x x x x x003108a8 0x > 0x c 0x0d x x x x x x > 0x003801e0 0x x x x x x x > 0x x x004201c4 0x a 0x54a0c077 0x2a00000e 0x x ····················································································· 2393-> 0x0aad01c4 0x e 0x x x x x f 0x > 0x x x0ab208ec 0x d 0x6ca4a66c 0x x1b x > 0x x x x x0acd008c 0x x132a5147 0x1b > 0x x x x x x x0ada011c 0x > 0x x e 0x x x x x x > 0x0b0c05fc 0x000004a6 RequestGotBank statusBlock 1Block 2……Block mTail 8 ADC + 1 Zero dword + 1 Timestamp 2430 Bank size = header tail FillTime
Bank Quality Check - step by step bank size == 0 ? bank status 0 ? bank size == 14 ? fill counter > 2845 ? first block Reset ? bank size < 14 ? current time < previous time+32 ? current fill < previous fill ? Got words %10 0 ? NO time > 11000? NO good bank bad bank yes NO
bk_size==0?bk_size < 3 ? Bank not exist, either no WFD or not recorded No bk_status st !=reset?got/%10!=0?status!=0?req!=got?got+4!=size?size<14?size==14? 5&&6 18; 5&&7 19; 5&&8 20; 5&&9 21; 5&&10 22; 5&& &&8->24; 6&&10->25; 8&&10->26 1 good bank level Bk exist? Bk header check Block by Block check Low level Bank Quality Check -- Logic in bkCheck.cpp Vertical is exclusive check Horizontal is inclusive check
#block>2000? No Zeroword? Sick Time ? Sick Fill ? Block by Block check Fill# > 2845 ?Time > ? good bank 16 17
Method to use and some basic got Mdump –f x –x run#####.mid | less Evid:0001, Serial:1(to m), #banks:298(297,299) The first WFD segment(serial=1) always NO Reset Block #banks=298, 297, 299 are supposed to be in good segment #banks=1024 related to truncated segment, resulting in missing banks following checks based on (5/21) Updated 5/22, run: (bkCheck root bkCheck.cpp) Updated 5/23, run: (bkCheck2.cpp)
Comments on bank status Mdump –f x –x *.mid | less Evid:0001, Serial:1(to m), #banks:298(297,299) Usually first segment(serial=1) without Reset Block following checks based on (5/21) Updated 5/22, run: (bkCheck root bkCheck.cpp) Updated 5/23, run: (bkCheck2.cpp)