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.32 by grchrist, Mon Jul 2 12:48:31 2012 UTC vs.
Revision 1.34 by grchrist, Mon Jul 16 10:02:38 2012 UTC

# Line 2 | Line 2 | import sys
2   from colors import *
3   from DatabaseParser import *
4   from termcolor import colored, cprint
5 + import time
6 +
7 +
8   write = sys.stdout.write
9  
10   NHighExpress=0
# Line 9 | Line 12 | NHighStreamA=0
12  
13   def MoreTableInfo(parser,LumiRange,config,isCol=True):
14      print "Monitoring Run %d" % (parser.RunNumber,)
15 +    localtime = time.asctime( time.localtime(time.time()) )
16 +    print "Local current time :", localtime
17      print "len=",len(LumiRange)
18      print "LSRange=", LumiRange
19      if len(LumiRange)>0:
# Line 91 | Line 96 | def MoreTableInfo(parser,LumiRange,confi
96      ## Check if the express stream is too high or low
97      ##########################################
98      global NHighExpress
99 <    badExpress = ((ExpRate/len(LumiRange) > config.MaxExpressRate) or ExpRate/len(LumiRange)<0.1) ## avg express stream rate too high?
99 >    badExpress = ((ExpRate/len(LumiRange) > config.MaxExpressRate) or (ExpRate/len(LumiRange)<0.1 and isCol)) ## avg express stream rate too high?
100      baseText = "\nCurrent Express Stream rate is: %0.1f Hz" % (ExpRate/len(LumiRange),) ## text to display
101      if badExpress:
102          text = colored(baseText,'red',attrs=['reverse'])  ## bad, make the text white on red

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines