![]() |
Belle II Software
release-08-02-05
|
Public Member Functions | |
| def | __init__ (self, Optional[Iterable] meta_option_list=None) |
| bool | has_option (self, str option_name) |
| float | pvalue_warn (self) |
| float | pvalue_error (self) |
| float | float_value (self, key, Optional[float] default=None) |
| int | int_value (self, key, Optional[int] default=None) |
| def | parse_key_value (self, str key) |
Class to simplify the parsing of plot options supplied by the MetaOption named object attached to root plots. A typical meta options list might look like this: ["pvalue-warn=0.9", "pvalue-error=0.4"]
Definition at line 15 of file metaoptions.py.
| def __init__ | ( | self, | |
| Optional[Iterable] | meta_option_list = None |
||
| ) |
Initialize MetaOptionParser
@param meta_option_list: list of meta options read from ROOT object
or None
Definition at line 25 of file metaoptions.py.
| float float_value | ( | self, | |
| key, | |||
| Optional[float] | default = None |
||
| ) |
Extract the float value from a meta option list
@param key: the key to identify the value from the list
@param default: default value
@return: The float value or the default value if this key did not exist
or the float value could not be parsed.
Definition at line 61 of file metaoptions.py.
| bool has_option | ( | self, | |
| str | option_name | ||
| ) |
Checks whether an option is contained in the
meta options
@param option_name: name of the option to check for
@return: True if the option is contained in the meta option list
False otherwise
Definition at line 37 of file metaoptions.py.
| int int_value | ( | self, | |
| key, | |||
| Optional[int] | default = None |
||
| ) |
Extract the int value from a meta option list
@param key: the key to identify the value from the list
@param default: default value
@return: The int value or None if this key did not exist
or the float value could not be parsed.
Definition at line 77 of file metaoptions.py.
| def parse_key_value | ( | self, | |
| str | key | ||
| ) |
Searches the meta options list for a key value entry and parses it
@param key: The key to look for
@retun: The value which was associated to the key or None if the
key was not found.
Definition at line 93 of file metaoptions.py.
| float pvalue_error | ( | self | ) |
@return: The custom error level for the pvalue setting of plot
comparison. None if no custom value was set for the plot.
Definition at line 54 of file metaoptions.py.
| float pvalue_warn | ( | self | ) |
@return: The custom warning level for the pvalue setting of plot
comparison. None if no custom value was set for the plot.
Definition at line 47 of file metaoptions.py.