11 event = array.array(
'I')
13 if event[0]!=0x1234cccc:
19 event.read(file, event[3]/4)
23 newEvent=array.array(
'I')
27 newEvent.fromlist(event.tolist()[0:robIdx])
29 while robIdx<len(event):
30 rob=event[robIdx:robIdx+event[robIdx+1]]
33 if (id >= badList[0])
and (id<=badList[1]):
34 print(
'Found rob to be truncated: %08x - org length %d' % (id,len(rob)))
36 newrob=array.array(
'I',rob[0:len(rob)-20])
46 print(
'good rob %08x' % id)
49 robIdx+=event[robIdx+1]
50 newEvent[3]-=4*reducedWords
51 newEvent[5]-=reducedWords
55output_file=sys.argv[2]
57inFile = open(input_file, mode=
'rb')
58outFile= open(output_file, mode=
'wb')
63 binvalues = array.array(
'I')
64 binvalues.fromfile(inFile, 1)
65 if binvalues[-1]==0x1234cccc:
68 binvalues.tofile(outFile)
78 corrupt.tofile(outFile)
81binvalues = array.array(
'I')
82binvalues.fromfile(inFile, 10)
83binvalues.tofile(outFile)
void print(char *figname, TCanvas *c1)
corruptEvent(event, badList)