![]() |
Belle II Software
release-06-02-00
|
Public Member Functions | |
def | __new__ (cls, name, expert_username, description, input_data_formats=None, input_data_names=None, input_data_filters=None, depends_on=None, expert_config=None) |
def | json_dumps (self) |
def | __str__ (self) |
Static Public Attributes | |
allowed_data_formats = frozenset({"raw", "cdst", "mdst", "udst"}) | |
Allowed data file formats. More... | |
Simple class to hold and display required information for a prompt calibration script (process). Parameters: name (str): The unique calibration name, not longer than 64 characters. expert_username (str): The JIRA username of the expert to contact about this script. This username will be used to assign the default responsible person for submitting and checking prompt calibration jobs. description (str): Long form description of the calibration and what it does. Feel free to make this as long as you need. input_data_formats (frozenset(str)): The data formats {'raw', 'cdst', 'mdst', 'udst'} of the input files that should be used as input to the process. Used to figure out if this calibration should occur before the relevant data production e.g. before cDST files are created. input_data_names (frozenset(str)): The names that you will use when accessing the input data given to the prompt calibration process i.e. Use these in the ``get_calibrations`` function to access the correct input data files. e.g. input_data_names=["all_events", "offres_photon_events"] input_data_filters (dict): The data selection for the data input names, used for automated calibration. The keys should correspond to one of the ``input_data_names`` with the values being a list of the various data filters, e.g. Data Tag, Beam Energy, Run Type, Run Quality Tag and Magnet. All available filters can be found in the input_data_filters dictionary e.g. from prompt import input_data_filters with details about data tags and run quality tags found at: https://calibration.belle2.org/belle2/data_tags/list/. To exclude specific filters, pre-append with *NOT* e.g. {"all_events": ["mumu_tight_or_highm_calib", "hadron_calib", "Good", "On"], "offres_photon_events": ["gamma_gamma_calib", "Good", "NOT On"]}. Not selecting a specfic filters (e.g. Magnet) is equivalent to not having any requirements, e.g. (Either) depends_on (list(CalibrationSettings)): The settings variables of the other prompt calibrations that you want want to depend on. This will allow the external automatic system to understand the overall ordering of scripts to run. If you encounter an import error when trying to run your prompt calibration script, it is likely that you have introduced a circular dependency. expert_config (dict): Default expert configuration for this calibration script. This is an optional dictionary (which must be JSON compliant) of configuration options for your get_calibrations(...) function. This is supposed to be used as a catch-all place to send in options for your calibration setup. For example, you may want to have an optional list of IoV boundaries so that your prompt script knows that it should split the input data between different IoV ranges. Or you might want to send if options like the maximum events per input file to process. The value in your settings object will be the *default*, but you can override the value via the caf_config.json sent into ``b2caf-prompt-run``.
Definition at line 51 of file __init__.py.
def __new__ | ( | cls, | |
name, | |||
expert_username, | |||
description, | |||
input_data_formats = None , |
|||
input_data_names = None , |
|||
input_data_filters = None , |
|||
depends_on = None , |
|||
expert_config = None |
|||
) |
The special method to create the tuple instance. Returning the instance calls the __init__ method
Definition at line 109 of file __init__.py.
def json_dumps | ( | self | ) |
Returns: str: A valid JSON format string of the attributes.
Definition at line 164 of file __init__.py.
|
static |
Allowed data file formats.
You should use these values for CalibrationSettings.input_data_formats
. Right now you should only use "raw" or "cdst" because we don't actually run calibrations on "mdst" or "udst". They are here for completeness.
Definition at line 107 of file __init__.py.