![]() |
ATLAS Offline Software
|
Static Public Member Functions | |
| list[str] | allCrestConnections () |
| str|None | getCrestConnection (str dbname) |
| dict[str, str] | getDBNameMapping () |
| CrestApi | getCrestApi (str server) |
| dict[str, dict[str, Any]] | getConditionsForTimestamp (str tag, *, int timestamp, str server="", CrestApi|None api=None, bool get_time_type=False) |
| list[dict[str, dict[str, Any]]] | getConditionsInRange (str tag, *, int since, int until, str server="", CrestApi|None api=None, bool get_time_type=False) |
| str | getTagTimeType (str tag, *, str server="", CrestApi|None api=None) |
| list[str] | getAttribs (str tag, *, str server="", CrestApi|None api=None) |
| dict | getPayloadFromHash (str payload_hash, *, str server="", CrestApi|None api=None) |
| dict[str, Any]|None | getEORParams (int run, *, str server="", CrestApi|None api=None) |
| list[dict[str, dict[str, Any]]] | getHLTPrescaleKeys (int run, *, str server="", CrestApi|None api=None) |
| int|None | getHLTPrescaleKey (int run, int lb, *, str server="", CrestApi|None api=None) |
| list[dict[str, dict[str, Any]]] | getL1PrescaleKeys (int run, *, str server="", CrestApi|None api=None) |
| int|None | getL1PrescaleKey (int run, int lb, *, str server="", CrestApi|None api=None) |
| list[dict[str, dict[str, Any]]] | getBunchGroupKeys (int run, *, str server="", CrestApi|None api=None) |
| int|None | getBunchGroupKey (int run, int lb, *, str server="", CrestApi|None api=None) |
| dict[str, Any]|None | getMenuConfigKey (int run, *, str server="", CrestApi|None api=None) |
| dict[str, Any] | getTrigConfKeys (int runNumber, int lumiBlock, str server="", CrestApi|None api=None) |
Static Public Attributes | |
| dict | dbname_crestconn_mapping |
| dict | crestconn_dbname_mapping |
Static Protected Member Functions | |
| None | _update_with_time_type (dict[str, Any] result, str time_type, int since) |
| dict | _get_payload (payload_hash, api) |
| dict | _get_payload_workaround (payload_hash, server) |
| _get_iovs_for_run (str tag, *, int run, CrestApi api) | |
| IovSetDto|HTTPResponse | _get_iov_for_timestamp (str tag, *, int timestamp, CrestApi api) |
| IovSetDto|HTTPResponse | _get_iovs_range (*, int since, int until, CrestApi api, str tag) |
| tuple[list[Any], dict[Any, Any]] | _get_payload_spec (str tag, CrestApi api) |
Definition at line 15 of file TriggerCrestUtil.py.
|
staticprotected |
Helper to retrieve the IOV for a given timestamp
Args:
tag (str): tag name
timestamp (int): time-stamp in format run<32+lb or time in nanoseconds since 1.1.1970
api (CrestApi): Crest API instance.
Returns:
IovSetDto: set of IOVs (of size 1)
Definition at line 464 of file TriggerCrestUtil.py.
|
staticprotected |
Helper to retrieve all IOVs for a run
Definition at line 457 of file TriggerCrestUtil.py.
|
staticprotected |
Helper to retrieve the IOV in a given range
Args:
tag (str): tag name
since (int): start of the range (either run<32+lb or time in nanoseconds since 1.1.1970, inclusive)
until (int): end of the range (either run<32+lb or time in nanoseconds since 1.1.1970, exclusive)
api (CrestApi): Crest API instance.
Returns:
IovSetDto: set of IOVs
Definition at line 479 of file TriggerCrestUtil.py.
|
staticprotected |
Definition at line 432 of file TriggerCrestUtil.py.
|
staticprotected |
Helper to retrieve the payload spec for a given tag
Definition at line 500 of file TriggerCrestUtil.py.
|
staticprotected |
Definition at line 436 of file TriggerCrestUtil.py.
|
staticprotected |
Definition at line 418 of file TriggerCrestUtil.py.
|
static |
list of all known crest connections
Returns:
list[str]: list of crest connection names
Definition at line 56 of file TriggerCrestUtil.py.
|
static |
list of attributes for this tag
Args:
tag (str): tag name
server (str, optional): crest server name. Only needed if api is not provided. Defaults to "".
api (CrestApi, optional): Crest API instance. Defaults to None.
Raises:
RuntimeError: if both server and api are missing
Returns:
dict: list of attributes
Definition at line 227 of file TriggerCrestUtil.py.
|
static |
Definition at line 355 of file TriggerCrestUtil.py.
|
static |
Definition at line 340 of file TriggerCrestUtil.py.
|
static |
Conditions data for tag at a specific timestamp
Conditions data is returned as a dict with 'since' and 'payload' keys.
The 'payload' itself is a dict of channel:'data dicts'. The 'data dict' has attribute names as
keys and the corresponding values. If get_time_type is True, also 'time_type' key is added to
each IOV dict and the since is further expanded into 'since_run' and 'since_lb' (for run/lb-based
timestamps) or 'since_formatted' (for time-based timestamps).
Args:
tag (str): The tag name
timestamp (int): The timestamp to query (either run<32+lb or time in nanoseconds since 1.1.1970)
server (str, optional): Crest server name. Only needed if api is not provided. Defaults to "".
api (_type_, optional): Crest API instance. Defaults to None.
get_time_type (bool, optional): Whether to retrieve the time type. Defaults to False.
Raises:
RuntimeError: If both server and api are missing
Returns:
dict[str, dict[str, any]]: Conditions data
Definition at line 98 of file TriggerCrestUtil.py.
|
static |
Conditions data for tag in given range
List goes over the IOVs found. For each IOV, there is a dict with 'since' and 'payload' keys.
The 'payload' itself is a dict of channel:'data dicts'. The 'data dict' has attribute names as
keys and the corresponding values. If get_time_type is True, also 'time_type' key is added to
each IOV dict and the since is further expanded into 'since_run' and 'since_lb' (for run/lb-based
timestamps) or 'since_formatted' (for time-based timestamps).
Args:
tag (str): tag name
since (int): start of the range (either run<32+lb or time in nanoseconds since 1.1.1970, inclusive)
until (int): end of the range (either run<32+lb or time in nanoseconds since 1.1.1970, exclusive)
server (str, optional): crest server name. Only needed if api is not provided. Defaults to "".
api (CrestApi, optional): Crest API instance. Defaults to None.
get_time_type (bool, optional): whether to retrieve the time type. Defaults to False.
Raises:
RuntimeError: if both server and api are missing
Returns:
list[dict[str, dict[str, any]]]: conditions data
Definition at line 151 of file TriggerCrestUtil.py.
|
static |
Crest API object
Args:
server (str): crest server name.
Returns:
CrestApi: Crest API instance.
Definition at line 86 of file TriggerCrestUtil.py.
|
static |
maps from triggerdb schema or triggerdb-alias to crest connection
See https://its.cern.ch/jira/browse/ATR-32030
If the input dbname is already a crest connection name, it is returned as is.
Args:
dbname (str): triggerdb name or alias or crest connection name.
Returns:
str | None: crest connection name or None if not found.
Definition at line 65 of file TriggerCrestUtil.py.
|
static |
Definition at line 82 of file TriggerCrestUtil.py.
|
static |
Definition at line 279 of file TriggerCrestUtil.py.
|
static |
Definition at line 305 of file TriggerCrestUtil.py.
|
static |
Definition at line 290 of file TriggerCrestUtil.py.
|
static |
Definition at line 330 of file TriggerCrestUtil.py.
|
static |
Definition at line 315 of file TriggerCrestUtil.py.
|
static |
Definition at line 365 of file TriggerCrestUtil.py.
|
static |
Get payload from hash
Args:
payload_hash (str): hash of the payload
server (str, optional): crest server name. Defaults to "".
api (CrestApi, optional): Crest API instance. Defaults to None.
Raises:
RuntimeError: if both server and api are missing
Returns:
dict: payload retrieved from the hash
Definition at line 250 of file TriggerCrestUtil.py.
|
static |
time type of the tag, either 'run-lumi' or 'time'
Args:
tag (str): tag name
server (str, optional): crest server name. Only needed if api is not provided. Defaults to "".
api (CrestApi, optional): Crest API instance. Defaults to None.
Raises:
RuntimeError: if both server and api are missing
Returns:
str: time type of the tag ['run-lumi' or 'time']
Definition at line 203 of file TriggerCrestUtil.py.
|
static |
Definition at line 401 of file TriggerCrestUtil.py.
|
static |
Definition at line 42 of file TriggerCrestUtil.py.
|
static |
Definition at line 19 of file TriggerCrestUtil.py.