salvus.flow.collections.event_data_collection_proxy
salvus.flow.collections.event_data_collection_proxy salvus flow collections event_data_collection_proxy EventData collection object.
Classes
EventDataCollectionProxy
EventDataCollectionProxyclass EventDataCollectionProxy(builtins.object):
def __init__(
self, proxy_type: str, config: dict, proxy_import: str | None = None
): ...A data proxy describes how to get data from external sources. This could be external files or a web service or something else completely.
Parameters
proxy_typestr — The name of the proxy as a string.configdict — The proxy configuration.proxy_importstr | None — External proxies might require to be imported. Optionally specify the to-be-imported module here.
Methods
read()
read()def read(filename: pathlib.Path | str) -> EventDataCollectionProxy: ...Read an event data collection proxy.
Parameters
filenamepathlib.Path | str — Path to the file on disk.
Returns EventDataCollectionProxy
get_event_data()
get_event_data()def get_event_data(self, event: Event) -> EventData: ...Load the data for a given event.
Parameters
eventEvent — The event to load the data for.
Returns EventData
write()
write()def write(self, filename: pathlib.Path | str) -> None: ...Write the proxy configuration to a file.
Parameters
filenamepathlib.Path | str — Output filename.
Returns None