File indexing completed on 2024-11-26 02:34:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 import sys
0014
0015 fileIN = open(sys.argv[1], "r")
0016 line = fileIN.readline()
0017
0018 matchCount = 0
0019
0020 while line:
0021
0022
0023
0024 fileIN2 = open(sys.argv[2], "r")
0025 line2 = fileIN2.readline()
0026 detId = int(line.split()[2].strip(','))
0027 flag = int(line.split()[5])
0028 matching = 0
0029 while line2:
0030 if( detId == int(line2.split()[2].strip(',')) ):
0031 if( flag == int(line2.split()[5]) ):
0032 print("matching:", end=' ')
0033 print("detId1 = ", detId, " detId2 = ", line2.split()[2].strip(','), end=' ')
0034 print("flag1 = ", flag, "flag2 = ", line2.split()[5])
0035 matching = 1
0036 matchCount += 1
0037 break
0038 line2 = fileIN2.readline()
0039 if( matching == 0 ):
0040 print("no match found")
0041
0042
0043 line = fileIN.readline()
0044
0045 print("MatchCount = ", matchCount)