File indexing completed on 2023-03-17 10:44:28
0001
0002
0003
0004 from __future__ import print_function
0005 import sys
0006
0007 log=open(sys.argv[1])
0008
0009 HVOff=0
0010 LVOff=0
0011 for line in log:
0012 if "start" in line:
0013 print("%s modules with HV off"%HVOff)
0014 print("%s modules with LV off\n"%LVOff)
0015 print(line)
0016 HVOff=0
0017 LVOff=0
0018 else:
0019 try:
0020 (HVStatus,LVStatus)=line.rstrip().split()[1:]
0021 if HVStatus=="OFF":
0022 HVOff=HVOff+1
0023 if LVStatus=="OFF":
0024 LVOff=LVOff+1
0025 except:
0026 print("Line read did not contain the IOV or the Voltage status:\n%s"%line)
0027 if HVOff or LVOff:
0028 print("%s modules with HV off"%HVOff)
0029 print("%s modules with LV off"%LVOff)