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 |
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: |
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 |