150 likes | 308 Views
Bank check. Qinzeng Peng 2007 Feb 19. Event header & bank header. http://midas.triumf.ca/doc/html/AppendixA.html. Midas data sturcture for WFD. Segment. Bank. Block. Run. space. Time. collection. measurement. Example : mdump look at Run# 38160.
E N D
Bank check Qinzeng Peng 2007 Feb 19
Event header & bank header http://midas.triumf.ca/doc/html/AppendixA.html
Midas data sturcture for WFD Segment Bank Block Run space Time collection measurement
Example: mdump look at Run# 38160 ------------------------ Event# 0 -------------------------------- ------------------------ Event# 1 -------------------------------- 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-> 0x44d30000 0x44d8a000 0x44d4a000 0x00000000 0x44ce8000 0x00000000 0x00000000 0x00000000 9-> 0x44cec000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 17-> 0x44d8c000 0x44d54000 0x44ce4000 0x44e0e000 0x44e50000 0x44cb8000 0x44d7a000 0x00000000 25-> 0x44df8000 0x44da2000 0x44d0e000 0x00000000 0x44c9a000 0x00000000 0x00000000 0x00000000 33-> 0x44dae000 0x44e2a000 0x44cc6000 0x44d82000 0x44d36000 0x44d64000 0x44c7a000 0x00000000 41-> 0x44ce2000 0x44e0e000 0x44e16000 0x00000000 0x44dc0000 0x00000000 0x00000000 0x00000000 49-> 0x44d2a000 0x44dee000 0x44ddc000 0x44e04000 0x44d56000 0x44de6000 0x44f62000 0x00000000 57-> 0x44d96000 0x44d6c000 0x44e0c000 0x00000000 0x448b4000 0x448c4000 0x44936000 0x00000000 65-> 0x449f8000 0x44936000 0x4491a000 0x44c5c000 0x449e8000 0x448ea000 0x44962000 0x00000000 73-> 0x44eae000 0x44d76000 0x44eb8000 0x00000000 0x44d72000 0x00000000 0x00000000 0x00000000 81-> 0x44db8000 0x44dd0000 0x44d4e000 0x44d6a000 0x44e42000 0x44d86000 0x44ddc000 0x44dd2000 89-> 0x44e60000 0x44d34000 0x44d9e000 0x44e8c000 0x44de6000 0x44d12000 0x44d80000 0x00000000 97-> 0x44caa000 0x44d00000 0x44d60000 0x44d84000 0x44d14000 0x00000000 0x44df2000 0x44cec000 105-> 0x44dac000 0x44d34000 0x44d54000 0x44c6c000 0x44dc0000 0x44d5e000 0x44d90000 0x00000000 113-> 0x00000000 0x44e88000 0x44ef6000 0x448b6000 0x449c8000 0x44e34000 0x44e0c000 0x44d24000 121-> 0x44dbc000 0x44e58000 0x44dc2000 0x449b8000 0x44aa8000 0x449da000 0x44b22000 0x00000000 129-> 0x44e54000 0x44e18000 0x44cbe000 0x44e2c000 0x44e1a000 0x44dea000 0x44df2000 0x00000000 137-> 0x4499a000 0x448b2000 0x4499a000 0x00000000 0x44a4e000 0x00000000 0x00000000 0x00000000 145-> 0x44a92000 0x44a9c000 0x44d9a000 0x44e4a000 0x44d34000 0x44dd2000 0x44cc6000 0x44caa000 153-> 0x44d98000 0x44d86000 0x44c7a000 0x44c90000 0x44e20000 0x44d78000 0x44cec000 0x00000000 Event header Bank header
WFD segment mdump look at Run# 38160, continuing… ------------------------ Event# 2 -------------------------------- Evid:0001- Mask:0000- Serial:1- Time:0x435bf6cb- Dsize:4400768/0x432680 #banks:298 - Bank list:-B1b0B1b1B1b2B1b3B1c0B1c1B1c2B1c3B1d0B1d1B1d2B1d3B1e0B1e1B1e2B1e3B1g0B1g1B1g2B1g3B 1h0B1h1B1h2B1h3B1i0B1i1B1i2B1i3B1j0B1j1B1j2B1j3B1l0B1l1B1l2B1l3B1p0B1p1B1p2B1p3B1q0B1q1B1q2B1q3B1s0B1s1B1 s2B1s3B2b0B2b1B2b2B2b3B2c0B2c1B2c2B2c3B2d0B2d1B2d2B2d3B2g0B2g1B2g2B2g3B2h0B2h1B2h2B2h3B2i0B2i1B2i2B2i3B2j 0B2j1B2j2B2j3B2l0B2l1B2l2B2l3B2o0B2o1B2o2B2o3B2p0B2p1B2p2B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161613 0x14151613 0x13131310 0x0f121414 0x12121212 0x00000000 0x00280184 0x12121846 25-> 0x7c7d4c14 0x00051318 0x18171412 0x12121213 0x14151312 0x13161714 0x12111212 0x00000000 33-> 0x003f00a0 0x12121017 0x50a0ce7d 0x2f000012 0x1b181212 0x13131717 0x15131515 0x15141415 41-> 0x16141313 0x00000000 0x00510108 0x1211110e 0x122a6fac 0x914e1000 0x07121715 0x14131517 49-> 0x16121215 0x17161313 0x13121212 0x00000000 0x005400b8 0x11121213 0x1f63b3de 0x86380000 57-> 0x15271d11 0x10111415 0x14121213 0x13131312 0x13131314 0x00000000 0x006f0ef8 0x1212131c 65-> 0x51979d58 0x11000414 0x16161615 0x13151615 0x14121212 0x14141413 0x11121212 0x00000000 73-> 0x0075015c 0x13131212 0x1216377a 0xb78a3f00 0x000f1b19 0x15131417 0x16141312 0x12131413 81-> 0x13121212 0x00000000 0x0098053c 0x13162056 0x9a985712 0x0003151d 0x1b161616 0x16131312 89-> 0x13111415 0x15141312 0x13131211 0x00000000 0x00a106c8 0x11121212 0x12184a94 0xbb7c2f00 97-> 0x00131d19 0x14151617 0x17161310 0x11131413 0x13101011 0x00000000 0x00b10044 0x12121213 105-> 0x2670bec8 0x71230000 0x141d1814 0x16161514 0x15141513 0x12121011 0x14141414 0x00000000
mdump look at Run# 38160, continuing… ------------------------ Event# 3 -------------------------------- 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-> 0x00000024 0x0000001d 0x00000001 0x00000017 0x00000000 0x00000000 0x00000000 0x00000001 9-> 0x00000000 0x00000000 0x00000002 0x00000000 0x00000000 0x00000000 0x00000000 0x0000001c 17-> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Bank:ACUM Length: 92(I*1)/23(I*4)/23(Type) Type:Unsigned Integer*4 1-> 0x00000024 0x0000001d 0x00000001 0x00000017 0x00000000 0x00000000 0x00000000 0x00000001 9-> 0x00000000 0x00000000 0x00000002 0x00000000 0x00000000 0x00000000 0x00000000 0x0000001c 17-> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 ------------------------ Event# 4 -------------------------------- Evid:0001- Mask:0000- Serial:2- Time:0x435bf6cb- Dsize:4406216/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 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 9-> 0x00000000 0x00000000 0x00000000 0x00000000 0x000068b4 0x13121325 0x64a1813a 0x00000b20 17-> 0x1e161113 0x13161815 0x13131315 0x16141211 0x13151816 0x00000000 0x00020174 0x12121214 25-> 0x3177bfaa 0x5f150005 0x1a1c1513 0x12131416 0x15151314 0x14161413 0x12121313 0x00000000 33-> 0x000305a8 0x11153a84 0xb4893d00 0x000d1c1b 0x14131414 0x13121614 0x16141211 0x12121313 41-> 0x13111212 0x00000000 0x00090754 0x12121524 0x609e8640 0x03000c19 0x17121315 0x14131314 49-> 0x14120e0f 0x11121413 0x13131311 0x00000000 0x00110034 0x11131311 0x1e54897f 0x42080009
mdump look at Run# 38160, continuing… ------------------------ Event# 11 -------------------------------- 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-> 0x41cc0000 ------------------------ Event# 14 -------------------------------- 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 0x00 113-> 0xc4 0x09 0x00 0x00 0xc4 0x09 0x00 0x00 0x03 0x00 0x00 0x00 0xcd 0xf6 0x5b 0x43 129-> 0x1e 0x00 0x00 0x00 0x1d 0x00 0x00 0x00 0x1e 0x00 0x00 0x00 0xd0 0x0c 0x00 0x00 After Event# 15 all are WFD events(segments)
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)
Data structure for WFDs • Each run (file) contains m segments (events) RUN#: 38000 • 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 ------------------------ Event# 27 -------------------------------- Evid:0001- Mask:0000- Serial:2- Time:0x435bacc7- Dsize:4308360/0x41bd88 #banks:298 - Bank list:- B1b0B1b1B1b2B1b3B1c0B1c1B1c2B1c3B1d0B1d1B1d2B1d3B1e0B1e1B1e2B1e3 ····················································································· Bank:B1b0 Length: 9736(I*1)/2434(I*4)/2434(Type) Type:Unsigned Integer*4 1-> 0x0000097e 0x0000097e 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 9-> 0x00000000 0x00000000 0x00000000 0x00000000 0x0000d504 0x12111113 0x1317479a 0xe7fa9948 17-> 0x07001627 0x22181713 0x14151513 0x13141514 0x13121412 0x00000000 0x003108a8 0x12121217 25-> 0x2320150c 0x0d111314 0x13121212 0x12121212 0x12121212 0x13141413 0x12111112 0x00000000 33-> 0x003801e0 0x12121319 0x23201610 0x10131212 0x12121213 0x13111211 0x11121213 0x13121212 41-> 0x12121212 0x00000000 0x004201c4 0x1212121a 0x54a0c077 0x2a00000e 0x18161414 0x14141413 ····················································································· 2393-> 0x0aad01c4 0x1212151e 0x54674208 0x00011518 0x15111313 0x13131212 0x1212100f 0x12131313 2401-> 0x13131212 0x00000000 0x0ab208ec 0x1212142d 0x6ca4a66c 0x25000012 0x1b191310 0x13141616 2409-> 0x15141310 0x10111313 0x13131312 0x00000000 0x0acd008c 0x13121111 0x132a5147 0x1b000010 2417-> 0x16161212 0x13121310 0x10121213 0x12121212 0x11121212 0x00000000 0x0ada011c 0x12121322 2425-> 0x55816428 0x0103161e 0x19131414 0x13131515 0x14121414 0x16151413 0x11111212 0x00000000 2433-> 0x0b0c05fc 0x000004a6
Data structure for WFDs Bank size = 2434 2430 2430 Bank:B1b0 Length: 9736(I*1)/2434(I*4)/2434(Type) Type:Unsigned Integer*4 1-> 0x0000097e0x0000097e0x000000000x00000000 0x00000000 0x00000000 0x00000000 0x00000000 9-> 0x00000000 0x00000000 0x00000000 0x00000000 0x0000d5040x12111113 0x1317479a 0xe7fa9948 17-> 0x07001627 0x22181713 0x14151513 0x13141514 0x13121412 0x00000000 0x003108a8 0x12121217 25-> 0x2320150c 0x0d111314 0x13121212 0x12121212 0x12121212 0x13141413 0x12111112 0x00000000 33-> 0x003801e0 0x12121319 0x23201610 0x10131212 0x12121213 0x13111211 0x11121213 0x13121212 41-> 0x12121212 0x00000000 0x004201c4 0x1212121a 0x54a0c077 0x2a00000e 0x18161414 0x14141413 ····················································································· 2393-> 0x0aad01c4 0x1212151e 0x54674208 0x00011518 0x15111313 0x13131212 0x1212100f 0x12131313 2401-> 0x13131212 0x00000000 0x0ab208ec 0x1212142d 0x6ca4a66c 0x25000012 0x1b191310 0x13141616 2409-> 0x15141310 0x10111313 0x13131312 0x00000000 0x0acd008c 0x13121111 0x132a5147 0x1b000010 2417-> 0x16161212 0x13121310 0x10121213 0x12121212 0x11121212 0x00000000 0x0ada011c 0x12121322 2425-> 0x55816428 0x0103161e 0x19131414 0x13131515 0x14121414 0x16151413 0x11111212 0x00000000 2433->0x0b0c05fc0x000004a6 header tail Fill Time 8ADC + 1Zero dword + 1Timestamp
NO NO NO NO NO NO NO NO Bank Quality Check - step by step yes bank size == 0 ? yes current fill < previous fill ? yes bank size < 14 ? current time < previous time+32 ? yes yes bank size == 14 ? yes bank status ≠ 0 ? yes fill counter > 2845 ? yes Got words %10 ≠0 ? yes time > 11000? yes first block ≠ Reset ? NO good bank bad bank
3 4 bk_size==0? bk_size < 3 ? Bank not exist, either no WFD or not recorded No bk_status status!=0? size<14? size==14? got/%10!=0? req!=got? got+4!=size? 1st!=reset? 5&&618; 5&&719; 5&&820; 5&&921; 5&&10 22; 5&&1123 6&&8->24; 6&&10->25; 8&&10->26 Low level Bank Quality Check -- Logic in bkCheck.cpp Bk exist? Bk header check 5 6 7 8 9 10 11 1 good bank level Vertical is exclusive check Horizontal is inclusive check Block by Block check
Block by Block check #block>2000? 12 13 14 15 No Zeroword? Sick Fill ? Sick Time ? Fill# > 2845 ? Time > 11000 ? 16 17 2 good bank
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 37950-38049 (5/21) • Updated 5/22, run:37900-37999 (bkCheck37900-37999.root bkCheck.cpp) • Updated 5/23, run: 37900-38049(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 37950-38049 (5/21) • Updated 5/22, run:37900-37999 (bkCheck37900-37999.root bkCheck.cpp) • Updated 5/23, run: 37900-38049(bkCheck2.cpp)