ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/AddTableInfo_db.py
(Generate patch)

Comparing UserCode/RateMonShiftTool_dev/AddTableInfo_db.py (file contents):
Revision 1.4 by amott, Wed Feb 15 12:16:37 2012 UTC vs.
Revision 1.9 by amott, Wed Mar 7 08:09:27 2012 UTC

# Line 3 | Line 3 | 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)
6 > def MoreTableInfo(parser,LumiRange,config):
7 >    [AvInstLumi, AvLiveLumi, AvDeliveredLumi, AvDeadTime,PSCols,LastPSCol] = parser.GetAvLumiInfo(LumiRange)
8 >    ##[AvInstLumi, AvLiveLumi, AvDeliveredLumi, AvDeadTime,PSCols] = parser.GetAvLumiInfo(LumiRange)
9  
10      if AvDeadTime==0:  ## For some reason the dead time in the DB is occasionally broken
11          try:
# Line 42 | Line 43 | def MoreTableInfo(parser,LumiRange):
43      if parser.GetLastLS(True)!=max(LumiRange):
44          write(bcolors.WARNING)
45          write("  << This exceeds the last lumisection parsed")
46 <    write(bcolors.ENDC+"\n")
46 >    write(bcolors.ENDC+"\n\n\n")
47 >
48 >    L1RatePredictions = config.GetExpectedL1Rates(AvInstLumi)
49 >    if len(L1RatePredictions):
50 >        print "Expected Level 1 Rates:"
51 >    for key,val in L1RatePredictions.iteritems():
52 >        write("Prescale Column "+str(key)+":  "+str(round(val/1000,1))+" kHz")
53 >        if key == LastPSCol:
54 >            write(' << We Are here!')
55 >        write('\n')
56 >        
57 >    
58  
59   def isSequential(t):
60      try:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines