Belle II Software development
ComparisonPlotFile Class Reference
Inheritance diagram for ComparisonPlotFile:
PlotFile JsonBase

Public Member Functions

def __init__ (self, package, title, rootfile, compared_revisions=None, plots=None, has_reference=False, ntuples=None, html_content=None, description=None)
 

Public Attributes

 compared_revision
 label of the revision which were used in this comparison
 
 ntuples
 the ntuples which were compared
 
 html_content
 user's html content
 
 has_reference
 true if a reference file is available for this plot file
 
 comparison_error
 the number of failed comparisons in this file
 
 comparison_error_shifter
 the number of failed comparisons of shifter plots in this file
 
 comparison_warning
 the number of comparisons which resulted in a warning
 
 comparison_warning_shifter
 the number of comparisons of shifter plots in this file which resulted in a warning
 
 n_shifter_ntuples
 Number of shifter ntuples.
 
 show_shifter
 Show to shifter, i.e.
 

Detailed Description

Contains information about a file containing plots and the comparison which
have been performed for the content of this file

Definition at line 310 of file json_objects.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  package,
  title,
  rootfile,
  compared_revisions = None,
  plots = None,
  has_reference = False,
  ntuples = None,
  html_content = None,
  description = None 
)
Create a new ComparisonPlotFile object and fill all members

Reimplemented from PlotFile.

Definition at line 317 of file json_objects.py.

328 ):
329 """
330 Create a new ComparisonPlotFile object and fill all members
331 """
332
333 if not plots:
334 plots = []
335 if not ntuples:
336 ntuples = []
337 if not html_content:
338 html_content = []
339
340 super().__init__(
341 package, title, rootfile, plots, description=description
342 )
343
344 self.compared_revision = compared_revisions
345
346 self.ntuples = ntuples
347
348 self.html_content = html_content
349
350
351 self.has_reference = has_reference
352
353
354 self.comparison_error = len(
355 [plt for plt in self.plots if plt.comparison_result == "error"]
356 )
357
358 self.comparison_error_shifter = len(
359 [
360 plt
361 for plt in self.plots
362 if (not plt.is_expert) and plt.comparison_result == "error"
363 ]
364 )
365
366 self.comparison_warning = len(
367 [plt for plt in self.plots if plt.comparison_result == "warning"]
368 )
369
371 self.comparison_warning_shifter = len(
372 [
373 plt
374 for plt in self.plots
375 if (not plt.is_expert) and plt.comparison_result == "warning"
376 ]
377 )
378
379
380 self.n_shifter_ntuples = sum(
381 [not tuple.is_expert for tuple in self.ntuples]
382 )
383
384
385 self.show_shifter = bool(
386 self.n_shifter_plots or self.n_shifter_ntuples or self.html_content
387 )
388
389

Member Data Documentation

◆ compared_revision

compared_revision

label of the revision which were used in this comparison

Definition at line 344 of file json_objects.py.

◆ comparison_error

comparison_error

the number of failed comparisons in this file

Definition at line 354 of file json_objects.py.

◆ comparison_error_shifter

comparison_error_shifter

the number of failed comparisons of shifter plots in this file

Definition at line 358 of file json_objects.py.

◆ comparison_warning

comparison_warning

the number of comparisons which resulted in a warning

Definition at line 366 of file json_objects.py.

◆ comparison_warning_shifter

comparison_warning_shifter

the number of comparisons of shifter plots in this file which resulted in a warning

Definition at line 371 of file json_objects.py.

◆ has_reference

has_reference

true if a reference file is available for this plot file

Definition at line 351 of file json_objects.py.

◆ html_content

html_content

user's html content

Definition at line 348 of file json_objects.py.

◆ n_shifter_ntuples

n_shifter_ntuples

Number of shifter ntuples.

Definition at line 380 of file json_objects.py.

◆ ntuples

ntuples

the ntuples which were compared

Definition at line 346 of file json_objects.py.

◆ show_shifter

show_shifter

Show to shifter, i.e.

is there at least one non-expert plot?

Definition at line 385 of file json_objects.py.


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