10 |
|
def MoreTableInfo(parser,LumiRange,config,isCol=True): |
11 |
|
print "Monitoring Run %d" % (parser.RunNumber,) |
12 |
|
[AvInstLumi, AvLiveLumi, AvDeliveredLumi, AvDeadTime,PSCols] = parser.GetAvLumiInfo(LumiRange) |
13 |
+ |
deadtimebeamactive=parser.GetDeadTimeBeamActive(LumiRange) |
14 |
|
try: |
15 |
|
LastPSCol = PSCols[-1] |
16 |
|
except: |
17 |
|
LastPSCol = -1 |
18 |
+ |
if isCol: |
19 |
|
|
20 |
< |
aRates = parser.GetTriggerRatesByLS("AOutput") |
20 |
> |
aRates = parser.GetTriggerRatesByLS("AOutput") |
21 |
> |
else: |
22 |
> |
if len(parser.GetTriggerRatesByLS("AOutput"))>0: |
23 |
> |
aRates = parser.GetTriggerRatesByLS("AOutput") |
24 |
> |
else: |
25 |
> |
aRates = parser.GetTriggerRatesByLS("AForPPOutput") |
26 |
> |
|
27 |
> |
|
28 |
|
expressRates = {} |
29 |
|
if isCol: |
30 |
|
expressRates = parser.GetTriggerRatesByLS("ExpressOutput") |
31 |
|
else: |
32 |
< |
expressRates = parser.GetTriggerRatesByLS("ExpressCosmicsOutput") |
32 |
> |
if len(parser.GetTriggerRatesByLS("ExpressOutput"))>0: |
33 |
> |
expressRates=parser.GetTriggerRatesByLS("ExpressOutput") |
34 |
> |
else: |
35 |
> |
expressRates = parser.GetTriggerRatesByLS("ExpressForCosmicsOutput") |
36 |
|
ExpRate=0 |
37 |
|
PeakRate=0 |
38 |
|
AvgExpRate=0 |
124 |
|
write( colored(line,'red',attrs=['reverse','blink']) ) |
125 |
|
write( colored("*"*cols+"\n",'red',attrs=['reverse','blink']) ) |
126 |
|
|
127 |
< |
if AvDeadTime==0: ## For some reason the dead time in the DB is occasionally broken |
116 |
< |
try: |
117 |
< |
AvDeadTime = AvLiveLumi/AvDeliveredLumi * 100 |
118 |
< |
except: |
119 |
< |
AvDeadTime = 100 |
127 |
> |
|
128 |
|
PrescaleColumnString='' |
129 |
|
PSCols = list(set(PSCols)) |
130 |
|
for c in PSCols: |
138 |
|
write("The live (recorded) lumi of these lumi sections is: ") |
139 |
|
write(str(round(len(LumiRange)*AvLiveLumi,1))+"e30\n\n") |
140 |
|
write("The average deadtime of these lumi sections is: ") |
141 |
< |
if AvDeadTime > 5: |
141 |
> |
if deadtimebeamactive > 5: |
142 |
|
write(bcolors.FAIL) |
143 |
< |
elif AvDeadTime > 10: |
143 |
> |
elif deadtimebeamactive > 10: |
144 |
|
write(bcolors.WARNING) |
145 |
|
else: |
146 |
|
write(bcolors.OKBLUE) |
147 |
< |
write(str(round(AvDeadTime,2))+"%") |
147 |
> |
write(str(round(deadtimebeamactive,2))+"%") |
148 |
|
write(bcolors.ENDC+"\n") |
149 |
|
|
150 |
|
print "Used prescale column(s): "+str(PrescaleColumnString) |
154 |
|
else: |
155 |
|
write("%d - %d\n" % (min(LumiRange),max(LumiRange),)) |
156 |
|
print "\nLast Lumisection of the run is: "+str(parser.GetLastLS()) |
157 |
< |
write( "Last Lumisection good for physics is: "+str(parser.GetLastLS(True)) ) |
157 |
> |
write( "Last Lumisection good where DAQ is active is: "+str(parser.GetLastLS(isCol)) ) |
158 |
> |
##write( "Last Lumisection where DAQ is active is: "+str(parser.GetLastLS(True)) ) |
159 |
|
write("\n\n\n") |
160 |
|
|
161 |
|
if isCol: |