ATLAS Offline Software
Loading...
Searching...
No Matches
dq_defect_info_table.Defect Class Reference
Inheritance diagram for dq_defect_info_table.Defect:
Collaboration diagram for dq_defect_info_table.Defect:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, name, description, iovs, virtual, intolerable, lumi)
 name_with_url (self)
 content (self)

Public Attributes

 name
 description
 iovs
str lumi
 virtual
 intolerable
 nlumi
 nlumi_rec
str rec_lb_frac = "{0:.0%}".format(self.nlumi_rec / self.nlumi)
 users = set(iov.user for iov in iovs)
 bots = set(u for u in self.users if u.startswith("sys:"))
str nruns = len(runs) if runs else "-"
str latest_run = max(runs) if runs else "-"

Detailed Description

A defect instance. Forms a row in the table.

Definition at line 48 of file dq_defect_info_table.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

dq_defect_info_table.Defect.__init__ ( self,
name,
description,
iovs,
virtual,
intolerable,
lumi )

Definition at line 52 of file dq_defect_info_table.py.

52 def __init__(self, name, description, iovs, virtual, intolerable, lumi):
53 if description == name:
54 # Don't bother pretending that there is a description if it is just
55 # equal to the name
56 description = ""
57
58 (self.name, self.description, self.iovs, self.lumi, self.virtual,
59 self.intolerable) = (
60 name, description, iovs, lumi / 1e6, virtual, intolerable)
61 self.nlumi = sum(iov.length for iov in iovs
62 if iov.since.run == iov.until.run)
63 self.nlumi_rec = sum(iov.length for iov in iovs
64 if iov.recoverable and iov.since.run == iov.until.run)
65 if self.nlumi and self.nlumi_rec:
66 self.rec_lb_frac = "{0:.0%}".format(self.nlumi_rec / self.nlumi)
67 else:
68 self.rec_lb_frac = "-"
69
70 self.users = set(iov.user for iov in iovs)
71 self.users -= set(["sys:virtual"]) # exclude the "virtual" user.
72 self.bots = set(u for u in self.users if u.startswith("sys:"))
73 self.users -= self.bots
74
75 runs = iovs.runs
76 self.nruns = len(runs) if runs else "-"
77 self.latest_run = max(runs) if runs else "-"
78 self.lumi = "{0:.3f}".format(self.lumi) if runs else "-"
79
#define max(a, b)
Definition cfImp.cxx:41
STL class.

Member Function Documentation

◆ content()

dq_defect_info_table.Defect.content ( self)

Definition at line 88 of file dq_defect_info_table.py.

88 def content(self):
89 td = '<td class="icon {class_}"><span>{0}</span></td>'
90 bot_cls = user_cls = ""
91 if len(self.users) == 1: user_cls = "user"
92 if len(self.users) > 1: user_cls = "users"
93 if len(self.bots): bot_cls = "bots"
94
95 virt_class = "virtual" if self.virtual else "primary"
96 tol_class = "intolerable" if self.intolerable else "tolerable"
97 virt_sort = 1 if self.virtual else 0
98 tol_sort = 1 if self.virtual else 0
99
100 c = [
101 td.format(virt_sort, class_=virt_class),
102 td.format(tol_sort, class_=tol_class),
103 td.format(", ".join(self.users), class_=user_cls),
104 td.format(", ".join(self.bots), class_=bot_cls),
105 content_string.format(d=self)
106 ]
107 return "".join(c)
108

◆ name_with_url()

dq_defect_info_table.Defect.name_with_url ( self)

Definition at line 81 of file dq_defect_info_table.py.

81 def name_with_url(self):
82 if self.virtual or self.intolerable:
83 return '<a href="{0}/{1}.svg">{1}</a>'.format(GRAPH_URL, self.name)
84 else:
85 return "{0}".format(self.name)
86

Member Data Documentation

◆ bots

dq_defect_info_table.Defect.bots = set(u for u in self.users if u.startswith("sys:"))

Definition at line 72 of file dq_defect_info_table.py.

◆ description

dq_defect_info_table.Defect.description

Definition at line 58 of file dq_defect_info_table.py.

◆ intolerable

dq_defect_info_table.Defect.intolerable

Definition at line 59 of file dq_defect_info_table.py.

◆ iovs

dq_defect_info_table.Defect.iovs

Definition at line 58 of file dq_defect_info_table.py.

◆ latest_run

str dq_defect_info_table.Defect.latest_run = max(runs) if runs else "-"

Definition at line 77 of file dq_defect_info_table.py.

◆ lumi

str dq_defect_info_table.Defect.lumi

Definition at line 58 of file dq_defect_info_table.py.

◆ name

dq_defect_info_table.Defect.name

Definition at line 58 of file dq_defect_info_table.py.

◆ nlumi

dq_defect_info_table.Defect.nlumi
Initial value:
= sum(iov.length for iov in iovs
if iov.since.run == iov.until.run)

Definition at line 61 of file dq_defect_info_table.py.

◆ nlumi_rec

dq_defect_info_table.Defect.nlumi_rec
Initial value:
= sum(iov.length for iov in iovs
if iov.recoverable and iov.since.run == iov.until.run)

Definition at line 63 of file dq_defect_info_table.py.

◆ nruns

str dq_defect_info_table.Defect.nruns = len(runs) if runs else "-"

Definition at line 76 of file dq_defect_info_table.py.

◆ rec_lb_frac

str dq_defect_info_table.Defect.rec_lb_frac = "{0:.0%}".format(self.nlumi_rec / self.nlumi)

Definition at line 66 of file dq_defect_info_table.py.

◆ users

dq_defect_info_table.Defect.users = set(iov.user for iov in iovs)

Definition at line 70 of file dq_defect_info_table.py.

◆ virtual

dq_defect_info_table.Defect.virtual

Definition at line 58 of file dq_defect_info_table.py.


The documentation for this class was generated from the following file: