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

Public Member Functions

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

Public Attributes

 compared_revision = compared_revisions
 label of the revision which were used in this comparison
 
 ntuples = ntuples
 the ntuples which were compared
 
 html_content = html_content
 user's html content
 
 has_reference = 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.
 
 package = package
 name of the package which created this file
 
 title = title
 Display name of this file.
 
 rootfile = rootfile
 filename of the root file
 
 plots = plots
 list of plots which are contained inside this plot file
 
 description = description
 Description of plot file.
 
 n_shifter_plots = sum([not plot.is_expert for plot in self.plots])
 Number of shifter plots.
 

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__()

__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

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 = compared_revisions

label of the revision which were used in this comparison

Definition at line 344 of file json_objects.py.

◆ comparison_error

comparison_error
Initial value:
= len(
[plt for plt in self.plots if plt.comparison_result == "error"]
)

the number of failed comparisons in this file

Definition at line 354 of file json_objects.py.

◆ comparison_error_shifter

comparison_error_shifter
Initial value:
= len(
[
plt
for plt in self.plots
if (not plt.is_expert) and plt.comparison_result == "error"
]
)

the number of failed comparisons of shifter plots in this file

Definition at line 358 of file json_objects.py.

◆ comparison_warning

comparison_warning
Initial value:
= len(
[plt for plt in self.plots if plt.comparison_result == "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
Initial value:
= len(
[
plt
for plt in self.plots
if (not plt.is_expert) and plt.comparison_result == "warning"
]
)

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

Definition at line 371 of file json_objects.py.

◆ description

description = description
inherited

Description of plot file.

Definition at line 157 of file json_objects.py.

◆ has_reference

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 = html_content

user's html content

Definition at line 348 of file json_objects.py.

◆ n_shifter_ntuples

n_shifter_ntuples
Initial value:
= sum(
[not tuple.is_expert for tuple in self.ntuples]
)

Number of shifter ntuples.

Definition at line 380 of file json_objects.py.

◆ n_shifter_plots

n_shifter_plots = sum([not plot.is_expert for plot in self.plots])
inherited

Number of shifter plots.

Definition at line 159 of file json_objects.py.

◆ ntuples

ntuples = ntuples

the ntuples which were compared

Definition at line 346 of file json_objects.py.

◆ package

package = package
inherited

name of the package which created this file

Definition at line 149 of file json_objects.py.

◆ plots

plots = plots
inherited

list of plots which are contained inside this plot file

Definition at line 155 of file json_objects.py.

◆ rootfile

rootfile = rootfile
inherited

filename of the root file

Definition at line 153 of file json_objects.py.

◆ show_shifter

show_shifter
Initial value:
= bool(
self.n_shifter_plots or self.n_shifter_ntuples or self.html_content
)

Show to shifter, i.e.

is there at least one non-expert plot?

Definition at line 385 of file json_objects.py.

◆ title

title = title
inherited

Display name of this file.

Definition at line 151 of file json_objects.py.


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