salvus.flow.collections.event_collection
Event collection object.
Functions
get_list_of_event_names()
get_list_of_event_names()def get_list_of_event_names(
events: Union[
str,
Sequence[str],
salvus.flow.collections.event.Event,
Sequence[salvus.flow.collections.event.Event],
salvus.flow.collections.event_collection.EventCollection,
]
) -> List[str]: ...Helper function extracting the list of event names from a series of events or similar data structures.
Note that the output will be sorted sorted alphabetically, i.e., the order of the events is not necessarily preserved.
Parameters
eventsUnion[str, Sequence[str], salvus.flow.collections.event.Event, Sequence[salvus.flow.collections.event.Event], salvus.flow.collections.event_collection.EventCollection] — The things to turn into a list of events.
Returns List[str]
Classes
EventCollection
EventCollectionclass EventCollection(builtins.object):
def __init__(self, events: List[salvus.flow.collections.event.Event]): ...A list of events.
Parameters
eventsList[salvus.flow.collections.event.Event] — List of events.
Methods
from_sources()
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,
receiver_channels: Optional[
Iterable[salvus.flow.collections.receiver_channel.ReceiverChannel],
salvus.flow.collections.receiver_channel.ReceiverChannel,
] = 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
sourcesUnion[Iterable[salvus.flow.simple_config.source._Base], salvus.flow.simple_config.source._Base] — List of sources.receiversOptional[Iterable[salvus.flow.simple_config.receiver._Base], salvus.flow.simple_config.receiver._Base] — List of receivers.receiver_channelsOptional[Iterable[salvus.flow.collections.receiver_channel.ReceiverChannel], salvus.flow.collections.receiver_channel.ReceiverChannel] — List of receiver channels.event_name_starting_indexint — 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_prefixstr — Events will be named f”{event_name_prefix}_{i:04}” where i is the event index. You can change the prefix here.
Returns EventCollection