![]() |
ATLAS Offline Software
|
Functions | |
| get_package_version (package_name, default_prefix="DataQuality") | |
| kgrind_profile (filename="profile.kgrind") | |
| daemonize (function, delay, error_args=None, **kwargs) | |
| send_error_email (exception_info, from_, subject, body) | |
| all_equal (*inputs) | |
| all_permutations (input_list) | |
| flattened (l) | |
| _flatten (l, fn, val=[]) | |
| silence (log_level=None, logger=None) | |
| timer (name) | |
| interleave (*args) | |
| date_to_nanounix (date_string) | |
| nanounix_to_date (nanounix) | |
Variables | |
| log | |
Utility module for things not specific to DQ
|
protected |
Definition at line 133 of file general.py.
| python.general.all_equal | ( | * | inputs | ) |
Returns true if all input arguments are equal (must be hashable)
Definition at line 106 of file general.py.
| python.general.all_permutations | ( | input_list | ) |
Generate all permutations of `input_list`
Definition at line 112 of file general.py.
| python.general.daemonize | ( | function, | |
| delay, | |||
| error_args = None, | |||
| ** | kwargs ) |
Run a daemon which executes `function` every `delay` seconds.
Definition at line 43 of file general.py.
| python.general.date_to_nanounix | ( | date_string | ) |
Returns number of nanoseconds between unix epoch and date in the form 'dd/mm/yyyy'
Definition at line 172 of file general.py.
| python.general.flattened | ( | l | ) |
Definition at line 125 of file general.py.
| python.general.get_package_version | ( | package_name, | |
| default_prefix = "DataQuality" ) |
Returns package version as determined from "cmt show versions"
Definition at line 14 of file general.py.
| python.general.interleave | ( | * | args | ) |
Definition at line 169 of file general.py.
| python.general.kgrind_profile | ( | filename = "profile.kgrind" | ) |
Generate kcachegrind profile information for a call.
Example use:
with kgrind_profile() as p:
p.run("main()")
Definition at line 25 of file general.py.
| python.general.nanounix_to_date | ( | nanounix | ) |
Returns a string representation of `nanounix` nanoseconds since the unix epoch
Definition at line 179 of file general.py.
| python.general.send_error_email | ( | exception_info, | |
| from_, | |||
| subject, | |||
| body ) |
Send an error email containing `exception_info` TODO: Doesn't contain complete information
Definition at line 62 of file general.py.
Turn down the logging verbosity temporarily
Definition at line 141 of file general.py.
| python.general.timer | ( | name | ) |
Definition at line 160 of file general.py.
| python.general.log |
Definition at line 9 of file general.py.