Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:17

0001 #
0002 # File: validate-o2o-wbm.py (Zongru Wan)
0003 #
0004 
0005 f1 = open("o2o.log", "r")
0006 oTSC = ""
0007 oGT = ""
0008 oGTRUNSETTINGS = ""
0009 while True:
0010     a = f1.readline()
0011     if a[0] == '-':
0012         break
0013     if a.find("Current TSC key = ") != -1:
0014         oTSC = a[18:].strip()
0015     elif a.find("GT ") != -1:
0016         oGT = a[3:].strip()
0017     elif a.find("L1GtPrescaleFactorsAlgoTrigRcd ") != -1:
0018         oGTRUNSETTINGS = a[31:].strip()
0019 f1.close()
0020 
0021 f2 = open("wbm.log", "r")
0022 wTSC = f2.readline().strip()
0023 wGT = f2.readline().strip()
0024 wGTRUNSETTINGS = f2.readline().strip()
0025 f2.close()
0026 
0027 f = open("val.log", "w")
0028 if oTSC == wTSC and oGT == wGT and oGTRUNSETTINGS == wGTRUNSETTINGS:
0029     f.write("successful")
0030 else:
0031     f.write("failed")
0032 f.close()