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

Public Member Functions

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

Public Attributes

 condition_checkers
 condition checkers which are assoicated 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__()

def __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]

Reimplemented in PXDHotPixelMaskCalibrationChecker.

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.
44 """
45
46 self.condition_checkers = {}
47 for objType in objType_list:
48 self.condition_checkers[objType] = None
49
The payload telling which PXD pixel is dead (=Readout system does not receive signals)
The payload telling which PXD pixel to mask (ignore)

Member Function Documentation

◆ beginRun()

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

Definition at line 95 of file calibration_checker.py.

95 def beginRun(self):
96 """
97 function to be executed at the beginning of a run
98 """
99 if self.valid:
100 self.fill_graphs()
101

◆ define_graphs()

def define_graphs (   self)
Define summary graphs

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 78 of file calibration_checker.py.

78 def define_graphs(self):
79 """
80 Define summary graphs
81 """
82

◆ draw_plots()

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

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 90 of file calibration_checker.py.

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

◆ fill_graphs()

def fill_graphs (   self)
Method to fill TGraphs

Reimplemented in PXDHotPixelMaskCalibrationChecker.

Definition at line 84 of file calibration_checker.py.

84 def fill_graphs(self):
85 """
86 Method to fill TGraphs
87 """
88

◆ initialize()

def 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 if self.valid:
62 checker.tfile.cd()
63 print(f"root file path: {checker.tfile}")
64 self.define_graphs()
65

◆ terminate()

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

Definition at line 102 of file calibration_checker.py.

102 def terminate(self):
103 """
104 Execute when terminating a basf2 module.
105 All required TGraphs should be ready at this stage.
106 """
107 if self.valid:
108 self.draw_plots()
109
110

◆ valid()

def valid (   self)
valid flag

Definition at line 67 of file calibration_checker.py.

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

Member Data Documentation

◆ condition_checkers

condition_checkers

condition checkers which are assoicated to this calibration.

Definition at line 46 of file calibration_checker.py.


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