pytuflow.TCFRunState.event_database#
- TCFRunState.event_database(context=None)#
Returns the EventDatabase object.
If more than one EventDatabase object exists, a Context object must be provided to resolve to the correct EventDatabase.
- Parameters:
context (Context, optional) – A context object to resolve the correct EventDatabase object. Not required unless more than one EventDatabase file object exists.
- Returns:
The EventDatabase object.
- Return type:
EventDatabase
- Raises:
KeyError – If the Event File is not found in the control file.
ValueError – If more than one Event File is found and no context is provided to resolve the correct one or if the context does not resolve into a single Event File.
Examples
>>> tcf = ... # assuming is an instance of TCF >>> tcf.event_database() {'Q100': {'_event1_': '100yr'}, 'QPMF': {'_event1_': 'PMFyr'}, '2hr': {'_event2_': '2hr'}, '4hr': {'_event2_': '4hr'}}