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