ATLAS Offline Software
Loading...
Searching...
No Matches
python.DetStatusLib Namespace Reference

Classes

class  DetStatusNames
class  DetStatusReq
class  StatusList
class  StatusObj

Functions

 folderName (runLumi=True)
 colour (code)
 colourVal (sval)

Function Documentation

◆ colour()

python.DetStatusLib.colour ( code)

Definition at line 14 of file DetStatusLib.py.

14def colour(code):
15 if (code==-1):
16 return "BLACK"
17 rcode=code % 4
18 if (rcode==1):
19 return "RED"
20 elif (rcode==2):
21 return "YELLOW"
22 elif (rcode==3):
23 return "GREEN"
24 return "UNKNOWN"
25

◆ colourVal()

python.DetStatusLib.colourVal ( sval)

Definition at line 26 of file DetStatusLib.py.

26def colourVal(sval):
27 "Translate traffic light string (numerical literal or letter) to number"
28 status=0
29 try:
30 uplight=sval.upper()
31 if uplight in ["R","RED"]:
32 status=1
33 elif uplight in ["Y","YELLOW"]:
34 status=2
35 elif uplight in ["G","GREEN"]:
36 status=3
37 elif uplight in ["U","UNKNOWN"]:
38 status=0
39 elif uplight in ["B","BLACK"]:
40 status=-1
41 else:
42 status=int(sval)
43 except Exception:
44 status=None
45 return status
46
47

◆ folderName()

python.DetStatusLib.folderName ( runLumi = True)

Definition at line 8 of file DetStatusLib.py.

8def folderName(runLumi=True):
9 if (runLumi):
10 return '/GLOBAL/DETSTATUS/LBSUMM'
11 else:
12 return '/GLOBAL/DETSTATUS/TISUMM'
13