20 """Fills in the MUCTPi ROB)."""
22 map=[[eformat.helper.SubDetector.TDAQ_MUON_CTP_INTERFACE,0,1]]
24 DaqRobs=[
None]*len(map)
29 if rob.source_id()==eformat.helper.SourceIdentifier(match[0],match[1]):
36 new_event=eformat.write.FullEventFragment()
37 new_event.copy_header(event)
41 if rob.source_id()==eformat.helper.SourceIdentifier(match[0],match[2]):
45 new_event.append_unchecked(rob)
46 for idx
in range(len(map)):
48 rob=eformat.write.ROBFragment(DaqRobs[idx])
49 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
50 if map[idx][0]==eformat.helper.SubDetector.TDAQ_CTP:
51 version=rob.rod_minor_version()&0x1f
53 ctpSkip=(rob.rod_minor_version()>>8)&0x3f
55 ctpSkip=(rob.rod_detev_type()>>16)&0x3f
56 data=[DaqRobs[idx].rod_data()[0],DaqRobs[idx].rod_data()[1]]
58 data+=[DaqRobs[idx].rod_data()[2+ctpSkip*30+ii]]
60 if map[idx][0]==eformat.helper.SubDetector.TDAQ_MUON_CTP_INTERFACE:
62 if len(DaqRobs[idx].rod_data()):
63 muctpBC=(DaqRobs[idx].rod_data()[0]>>18)&7
64 for word
in DaqRobs[idx].rod_data()[1:]:
65 if (word>>14)&7==muctpBC
and (word>>26)&1:
66 data+=[(word&0x3fff)|(((word>>17)&0x1ff)<<14)]
68 rob=eformat.write.ROBFragment()
69 rob.copy_header(DaqRobs[idx])
70 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
75 rob=eformat.write.ROBFragment()
76 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
78 return new_event.readonly()