26 """Fills in the MUCTPi ROB)."""
33 map=[[eformat.helper.SubDetector.TDAQ_MUON_CTP_INTERFACE,0,1]]
34 DaqRobs=[
None]*len(map)
39 if rob.source_id()==eformat.helper.SourceIdentifier(match[0],match[1]):
46 new_event=eformat.write.FullEventFragment()
47 new_event.copy_header(event)
48 if not event.run_no()
in runs:
49 runs.append(event.run_no())
51 new_event.run_no(runno)
52 new_event.lumi_block(lumi)
54 new_event.global_id(id)
58 if rob.source_id()==eformat.helper.SourceIdentifier(match[0],match[2]):
62 newrob=eformat.write.ROBFragment(rob)
63 newrob.rod_lvl1_id(id)
64 newrob.rod_run_no(runno)
65 newrob.checksum_type(0)
66 newrob.rod_lvl1_trigger_type(event.lvl1_trigger_type())
67 if rob.source_id()==eformat.helper.SourceIdentifier(eformat.helper.SubDetector.TDAQ_CTP,1):
68 newrob.rod_detev_type(1<<16|lumi)
69 new_event.append(newrob)
70 for idx
in range(len(map)):
72 rob=eformat.write.ROBFragment(DaqRobs[idx])
73 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
77 rob.rod_lvl1_trigger_type(event.lvl1_trigger_type())
78 if map[idx][0]==eformat.helper.SubDetector.TDAQ_CTP:
79 version=rob.rod_minor_version()&0x1f
81 ctpSkip=(rob.rod_minor_version()>>8)&0x3f
83 ctpSkip=(rob.rod_detev_type()>>16)&0x3f
84 data=[DaqRobs[idx].rod_data()[0],DaqRobs[idx].rod_data()[1]]
86 data+=[DaqRobs[idx].rod_data()[2+ctpSkip*30+ii]]
88 if map[idx][0]==eformat.helper.SubDetector.TDAQ_MUON_CTP_INTERFACE:
90 muctpBC=(DaqRobs[idx].rod_data()[0]>>18)&7
91 for word
in DaqRobs[idx].rod_data()[1:]:
92 if (word>>14)&7==muctpBC
and (word>>26)&1:
93 data+=[(word&0x3fff)|(((word>>17)&0x1ff)<<14)]
95 rob=eformat.write.ROBFragment()
96 rob.copy_header(DaqRobs[idx])
97 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
100 new_event.append(rob)
102 rob=eformat.write.ROBFragment()
103 rob.source_id(eformat.helper.SourceIdentifier(map[idx][0],map[idx][2]))
104 new_event.append(rob)
105 return new_event.readonly()