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.15 by grchrist, Mon Mar 19 16:13:02 2012 UTC vs.
Revision 1.16 by grchrist, Mon Mar 19 16:43:03 2012 UTC

# Line 5 | Line 5 | from termcolor import colored, cprint
5   write = sys.stdout.write
6  
7   NHighExpress=0
8 + NHighStreamA=0
9  
10   def MoreTableInfo(parser,LumiRange,config,isCol=True):
11      print "Monitoring Run %d" % (parser.RunNumber,)
# Line 53 | Line 54 | def MoreTableInfo(parser,LumiRange,confi
54      ##########################################
55      global NHighExpress
56      badExpress = ExpRate/len(LumiRange) > config.MaxExpressRate ## avg express stream rate too high?
57 <    baseText = "Current Express Stream rate is: %0.1f Hz" % (ExpRate/len(LumiRange),) ## text to display
57 >    baseText = "\nCurrent Express Stream rate is: %0.1f Hz" % (ExpRate/len(LumiRange),) ## text to display
58      if badExpress:
59          text = colored(baseText,'red',attrs=['reverse'])  ## bad, make the text white on red
60          NHighExpress+=1  ## increment the bad express counter
# Line 83 | Line 84 | def MoreTableInfo(parser,LumiRange,confi
84      badStreamA =ARate/len(LumiRange) > config.MaxStreamARate ##Cosmics Express Rate 300 Hz max
85      baseTextA= "\nCurrent Steam A Rate is: %0.1f Hz" % (ARate/len(LumiRange),)
86      if badStreamA:
87 <        textA=colored(baseText,'red',attrs=['reverse'])  ## bad, make the text white on red
87 >        textA=colored(baseTextA,'red',attrs=['reverse'])  ## bad, make the text white on red
88          NHighStreamA+=1
89      else:
90          textA=baseTextA
# Line 95 | Line 96 | def MoreTableInfo(parser,LumiRange,confi
96              write("  <<  This appears to be due to a 1 lumisection spike, please monitor\n")
97          else:
98              if NHighStreamA >1: ##Call HLT doc!
99 <                write(colored("  <<  WARNING: Current Express rate is too high!",'red',attrs=['reverse']) )
99 >                write(colored("  <<  WARNING: Current Stream A rate is too high!",'red',attrs=['reverse']) )
100                  Warn = True
101      write("\n\n")
102              

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines