Belle II Software development
|
Public Member Functions | |
def | __init__ (self, name, objType, tfile, rundir="", use_hist=False) |
def | objType (self) |
def | run (self) |
def | exp (self) |
def | beginRun (self) |
def | define_graphs (self, ytitle="") |
def | define_hists (self, name=None, title=None, ztitle=None, **kwargs) |
def | get_db_content (self) |
def | get_graph_value (self, sensor_db_content) |
def | get_graph_value_from_hist (self, h2=None) |
def | set_hist_content (self, h2, sensor_db_content) |
def | fill_plots (self) |
def | draw_plots (self, canvas=None, cname="", ymin=0., ymax=None, logy=False) |
def | save_canvas (self, canvas, cname, logy=False) |
Public Attributes | |
name | |
DBObj name. | |
dbObj | |
DBObjPtr for the condition. | |
eventMetaData | |
pointer to the event metadata | |
tfile | |
TFile for saving plots. | |
rundir | |
Directory for writing histograms of each run. | |
graphs | |
Dictionary of plots (TGraph) summarizing variables vs run. | |
hists | |
Dictionary of plots (TH1) to be saved for each run. | |
hist_title_suffix | |
Hist title suffix. | |
runstart | |
The 1st run. | |
runend | |
The last run. | |
expstart | |
The 1st exp. | |
use_hist | |
Flag to get TGraph values from a histogram (TH2F) | |
Protected Attributes | |
_objType | |
DBObj type. | |
Abstract base class describing interfaces to make plots from condition db.
Definition at line 49 of file condition_checker.py.
def __init__ | ( | self, | |
name, | |||
objType, | |||
tfile, | |||
rundir = "" , |
|||
use_hist = False |
|||
) |
Reimplemented in PXDOccupancyInfoChecker, PXDMaskedPixelsChecker, PXDGainMapChecker, and PXDDeadPixelsChecker.
Definition at line 52 of file condition_checker.py.
def beginRun | ( | self | ) |
Call functions at beginning of a run
Definition at line 109 of file condition_checker.py.
def define_graphs | ( | self, | |
ytitle = "" |
|||
) |
Method to define TGraph Parameters: ytitle (str): Label for TGraph y-axis
Reimplemented in PXDOccupancyInfoChecker, PXDMaskedPixelsChecker, PXDDeadPixelsChecker, and PXDGainMapChecker.
Definition at line 116 of file condition_checker.py.
def define_hists | ( | self, | |
name = None , |
|||
title = None , |
|||
ztitle = None , |
|||
** | kwargs | ||
) |
Method to define TH2 Parameters: name (str): name for TH2, to which sensor name will be attached title (str): title for TH2 ztitle (str): title for z-axis (color bar) kwargs: additional arguments
Reimplemented in PXDMaskedPixelsChecker, PXDDeadPixelsChecker, and PXDGainMapChecker.
Definition at line 125 of file condition_checker.py.
def draw_plots | ( | self, | |
canvas = None , |
|||
cname = "" , |
|||
ymin = 0. , |
|||
ymax = None , |
|||
logy = False |
|||
) |
Method to draw plots on a TCanvas Parameters: canvas (TCanvas): ROOT TCanvas for plotting canme (str): Name of the canvas ymin (float): Minimum value of y-axis for plotting ymax (float): Maximum of y-axis for plotting logy (bool): Flag to use log scale for y-axis
Reimplemented in PXDOccupancyInfoChecker, PXDDeadPixelsChecker, PXDGainMapChecker, and PXDMaskedPixelsChecker.
Definition at line 212 of file condition_checker.py.
def exp | ( | self | ) |
Experiment number
Definition at line 103 of file condition_checker.py.
def fill_plots | ( | self | ) |
Method to fill plot objects
Definition at line 170 of file condition_checker.py.
def get_db_content | ( | self | ) |
Abstract method to get content of a payload Should return a Dictionary with sensorID.getID() as key and relaated calibration results as value
Reimplemented in PXDOccupancyInfoChecker, PXDMaskedPixelsChecker, PXDDeadPixelsChecker, and PXDGainMapChecker.
Definition at line 139 of file condition_checker.py.
def get_graph_value | ( | self, | |
sensor_db_content | |||
) |
Abstract method to get a value for each TGraph Parameters: sensor_db_content (Any): Calibration results of a module
Reimplemented in PXDOccupancyInfoChecker, PXDMaskedPixelsChecker, PXDDeadPixelsChecker, and PXDGainMapChecker.
Definition at line 146 of file condition_checker.py.
def get_graph_value_from_hist | ( | self, | |
h2 = None |
|||
) |
Method to get a value for each TGraph Parameters: h2 (TH2): If not none, get value from h2
Reimplemented in PXDDeadPixelsChecker.
Definition at line 153 of file condition_checker.py.
def objType | ( | self | ) |
DBObj type (read only)
Definition at line 89 of file condition_checker.py.
def run | ( | self | ) |
Run number
Definition at line 96 of file condition_checker.py.
def save_canvas | ( | self, | |
canvas, | |||
cname, | |||
logy = False |
|||
) |
Save TCanvas to png/pdf format and do not write it to the ROOT file by default Parameters: canvas (TCanvas): ROOT TCanvas for plotting canme (str): Name of the canvas logy (bool): Flag to use log scale for y-axis
Definition at line 246 of file condition_checker.py.
def set_hist_content | ( | self, | |
h2, | |||
sensor_db_content | |||
) |
Method to set TH2 bins Parameters: h2 (TH2): TH2F object for handling values of a pixel matrix sensor_db_content (Any): Calibration results of a module
Reimplemented in PXDMaskedPixelsChecker, PXDDeadPixelsChecker, and PXDGainMapChecker.
Definition at line 161 of file condition_checker.py.
|
protected |
DBObj type.
Definition at line 59 of file condition_checker.py.
dbObj |
DBObjPtr for the condition.
Definition at line 61 of file condition_checker.py.
eventMetaData |
pointer to the event metadata
Definition at line 63 of file condition_checker.py.
expstart |
The 1st exp.
Definition at line 82 of file condition_checker.py.
graphs |
Dictionary of plots (TGraph) summarizing variables vs run.
Definition at line 72 of file condition_checker.py.
hist_title_suffix |
Hist title suffix.
Definition at line 76 of file condition_checker.py.
hists |
Dictionary of plots (TH1) to be saved for each run.
Definition at line 74 of file condition_checker.py.
name |
DBObj name.
Definition at line 57 of file condition_checker.py.
rundir |
Directory for writing histograms of each run.
Definition at line 67 of file condition_checker.py.
runend |
The last run.
Definition at line 80 of file condition_checker.py.
runstart |
The 1st run.
Definition at line 78 of file condition_checker.py.
tfile |
TFile for saving plots.
Definition at line 65 of file condition_checker.py.
use_hist |
Flag to get TGraph values from a histogram (TH2F)
Definition at line 84 of file condition_checker.py.