A defect instance. Forms a row in the table.
 
Definition at line 48 of file dq_defect_info_table.py.
 
◆ __init__()
      
        
          | def 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:
 
   58         (self.name, self.description, self.iovs, self.lumi, self.virtual, 
 
   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)
 
   68             self.rec_lb_frac = 
"-" 
   70         self.users = 
set(iov.user 
for iov 
in iovs)
 
   71         self.users -= 
set([
"sys:virtual"]) 
 
   72         self.bots = 
set(u 
for u 
in self.users 
if u.startswith(
"sys:"))
 
   73         self.users -= self.bots
 
   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 "-" 
 
 
 
◆ content()
      
        
          | def dq_defect_info_table.Defect.content  | 
          ( | 
            | 
          self | ) | 
           | 
        
      
 
Definition at line 88 of file dq_defect_info_table.py.
   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" 
   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
 
  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)
 
 
 
 
◆ name_with_url()
      
        
          | def 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)
 
   85             return "{0}".
format(self.name)
 
 
 
 
◆ bots
      
        
          | dq_defect_info_table.Defect.bots | 
        
      
 
 
◆ latest_run
      
        
          | dq_defect_info_table.Defect.latest_run | 
        
      
 
 
◆ lumi
      
        
          | dq_defect_info_table.Defect.lumi | 
        
      
 
 
◆ nlumi
      
        
          | dq_defect_info_table.Defect.nlumi | 
        
      
 
 
◆ nlumi_rec
      
        
          | dq_defect_info_table.Defect.nlumi_rec | 
        
      
 
 
◆ nruns
      
        
          | dq_defect_info_table.Defect.nruns | 
        
      
 
 
◆ rec_lb_frac
      
        
          | dq_defect_info_table.Defect.rec_lb_frac | 
        
      
 
 
◆ users
      
        
          | dq_defect_info_table.Defect.users | 
        
      
 
 
The documentation for this class was generated from the following file:
 
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.