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