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

salvus.flow.collections.event_collection

Event collection object.

Classes

EventCollection

class EventCollection(builtins.object):
    def __init__(self, events: List[salvus.flow.collections.event.Event]):
        ...

A list of events.

Parameters
  • events List[salvus.flow.collections.event.Event] — List of events.
Methods
from_sources()
def from_sources(
    sources: Union[
        Iterable[salvus.flow.simple_config.source._Base],
        salvus.flow.simple_config.source._Base,
    ],
    receivers: Optional[
        Iterable[salvus.flow.simple_config.receiver._Base],
        salvus.flow.simple_config.receiver._Base,
    ] = None,
    event_name_starting_index: int = 0,
    event_name_prefix: str = "event",
) -> EventCollection:
    ...

Create an event collection object from a list of sources. The receivers will be copied to every event.

Parameters
  • sources Union[Iterable[salvus.flow.simple_config.source._Base], salvus.flow.simple_config.source._Base] — List of sources.
  • receivers Optional[Iterable[salvus.flow.simple_config.receiver._Base], salvus.flow.simple_config.receiver._Base] — List of receivers.
  • event_name_starting_index int — Events will be named f”{event_name_prefix}_{i:04}” where i is the event index. You can change the starting index here.
  • event_name_prefix str — Events will be named f”{event_name_prefix}_{i:04}” where i is the event index. You can change the prefix here.
Returns EventCollection