1 |
import sys
|
2 |
from colors import *
|
3 |
from DatabaseParser import *
|
4 |
write = sys.stdout.write
|
5 |
|
6 |
def MoreTableInfo(parser,LumiRange):
|
7 |
[AvInstLumi, AvLiveLumi, AvDeliveredLumi, AvDeadTime,PSCols] = parser.GetAvLumiInfo(LumiRange)
|
8 |
|
9 |
if AvDeadTime==0: ## For some reason the dead time in the DB is occasionally broken
|
10 |
try:
|
11 |
AvDeadTime = AvLiveLumi/AvDeliveredLumi * 100
|
12 |
except:
|
13 |
AvDeadTime = 100
|
14 |
PrescaleColumnString=''
|
15 |
for c in PSCols:
|
16 |
PrescaleColumnString = PrescaleColumnString + str(c) + ","
|
17 |
|
18 |
write("The average instantaneous lumi of these lumisections is: ")
|
19 |
write(str(round(AvInstLumi,1))+"e30\n")
|
20 |
write("The delivered lumi of these lumi sections is: ")
|
21 |
write(str(round(1000*AvDeliveredLumi,1))+"e30"+"\n")
|
22 |
write("The live (recorded) lumi of these lumi sections is: ")
|
23 |
write(str(round(1000*AvLiveLumi,1))+"e30\n\n")
|
24 |
write("The average deadtime of these lumi sections is: ")
|
25 |
if AvDeadTime > 5:
|
26 |
write(bcolors.FAIL)
|
27 |
elif AvDeadTime > 10:
|
28 |
write(bcolors.WARNING)
|
29 |
else:
|
30 |
write(bcolors.OKBLUE)
|
31 |
write(str(round(AvDeadTime,1))+"%")
|
32 |
write(bcolors.ENDC+"\n")
|
33 |
|
34 |
print "Used prescale column(s): "+str(PrescaleColumnString)
|
35 |
print "Lumisections: "+str(LumiRange)
|