Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.collections.event_data_collection_proxy

EventData collection object.

Classes

EventDataCollectionProxy

class EventDataCollectionProxy(builtins.object):
    def __init__(
        self, proxy_type: str, config: Dict, proxy_import: types = 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_type str — The name of the proxy as a string.
  • config Dict — The proxy configuration.
  • proxy_import types — External proxies might require to be imported. Optionally specify the to-be-imported module here.
Methods
read()
def read(filename: Union[str, pathlib.Path]) -> EventDataCollectionProxy: ...

Read an event data collection proxy.

Parameters
  • filename Union[str, pathlib.Path] — Path to the file on disc.
Returns EventDataCollectionProxy
get_event_data()
def get_event_data(
    self, event: salvus.flow.collections.event.Event
) -> salvus.flow.collections.event_data.EventData: ...

Load the data for a given event.

Parameters
  • event salvus.flow.collections.event.Event — The event to load the data for.
Returns salvus.flow.collections.event_data.EventData
write()
def write(self, filename: Union[str, pathlib.Path]) -> None: ...

Write the proxy configuration to a file.

Parameters
  • filename Union[str, pathlib.Path] — Output filename.
Returns None