Belle II Software development
CalibrationCheckerBase Class Reference
Inheritance diagram for CalibrationCheckerBase:
PXDHotPixelMaskCalibrationChecker

Public Member Functions

 __init__ (self, objType_list=[])
 
 initialize (self, checker_list=[])
 
 valid (self)
 
 define_graphs (self)
 
 fill_graphs (self)
 
 draw_plots (self)
 
 beginRun (self)
 
 terminate (self)
 

Public Attributes

dict condition_checkers = {}
 condition checkers which are associated to this calibration.
 

Detailed Description

Abstract base class for generating plots from calibrations which save multiple payloads.

Definition at line 34 of file calibration_checker.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
objType_list = [] )
Parameters:
  objType_list (list): a list of db objects used as keys to their checker.
    e.g., [Belle2.PXDMaskedPixelPar, Belle2.PXDDeadPixelPar]

Definition at line 39 of file calibration_checker.py.

39 def __init__(self, objType_list=[]):
40 """
41 Parameters:
42 objType_list (list): a list of db objects used as keys to their checker.
43 e.g., [Belle2.PXDMaskedPixelPar, Belle2.PXDDeadPixelPar]
44 """
45
46 self.condition_checkers = {}
47 for objType in objType_list:
48 self.condition_checkers[objType] = None
49

Member Function Documentation

◆ beginRun()

beginRun ( self)
function to be executed at the beginning of a run

Definition at line 97 of file calibration_checker.py.

97 def beginRun(self):
98 """
99 function to be executed at the beginning of a run
100 """
101 # \cond false positive doxygen warning
102 if self.valid:
103 self.fill_graphs()
104 # \endcond
105

◆ define_graphs()

define_graphs ( self)
Define summary graphs

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 80 of file calibration_checker.py.

80 def define_graphs(self):
81 """
82 Define summary graphs
83 """
84

◆ draw_plots()

draw_plots ( self)
Generate summary plots from TGraphs of all condition checkers

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 92 of file calibration_checker.py.

92 def draw_plots(self):
93 """
94 Generate summary plots from TGraphs of all condition checkers
95 """
96

◆ fill_graphs()

fill_graphs ( self)
Method to fill TGraphs

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 86 of file calibration_checker.py.

86 def fill_graphs(self):
87 """
88 Method to fill TGraphs
89 """
90

◆ initialize()

initialize ( self,
checker_list = [] )
Initialize condition_checker according to condition objType
Parameters:
  checker_list (list): list of objType checkers

Definition at line 50 of file calibration_checker.py.

50 def initialize(self, checker_list=[]):
51 """
52 Initialize condition_checker according to condition objType
53 Parameters:
54 checker_list (list): list of objType checkers
55 """
56 checker = None
57 for checker in checker_list:
58 for objType in self.condition_checkers.keys():
59 if objType == checker.objType:
60 self.condition_checkers[objType] = checker
61 # \cond false positive doxygen warning
62 if self.valid:
63 checker.tfile.cd()
64 print(f"root file path: {checker.tfile}")
65 self.define_graphs()
66 # \endcond
67

◆ terminate()

terminate ( self)
Execute when terminating a basf2 module.
All required TGraphs should be ready at this stage.

Definition at line 106 of file calibration_checker.py.

106 def terminate(self):
107 """
108 Execute when terminating a basf2 module.
109 All required TGraphs should be ready at this stage.
110 """
111 # \cond false positive doxygen warning
112 if self.valid:
113 self.draw_plots()
114 # \endcond
115
116

◆ valid()

valid ( self)
valid flag

Definition at line 69 of file calibration_checker.py.

69 def valid(self):
70 """
71 valid flag
72 """
73 if None in self.condition_checkers.values():
74 # do nothing if any of the condition checkers is missing
75 return False
76 else:
77 return True
78

Member Data Documentation

◆ condition_checkers

dict condition_checkers = {}

condition checkers which are associated to this calibration.

Parameters:
  objType_list (list): a list of db objects used as keys to their checker.
    e.g., [Belle2.PXDMaskedPixelPar, Belle2.PXDDeadPixelPar]

Definition at line 46 of file calibration_checker.py.


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