km3io.online
¶
Module Contents¶
Classes¶
A reader for summaryslices which are loaded as chunks given by step_size. |
|
Reader for online ROOT files |
|
A simple wrapper for timeslices |
|
A wrapper for a timeslice |
|
A simple wrapper for online events |
|
A wrapper for a online event |
Functions¶
|
Return the rate in Hz from the short int value |
|
Return a boolean array for a value's bit representation. |
|
Returns the hrv/fifo flags for the PMT channels (hrv/fifo) |
|
Returns the number of received UDP packets (dq_status) |
|
Returns the maximum sequence number of the received UDP packets (dq_status) |
|
Returns the UDP Trailer flag (fifo) |
Attributes¶
- class km3io.online.SummarysliceReader(fobj, step_size=1000)[source]¶
A reader for summaryslices which are loaded as chunks given by step_size.
To be used as an iterator (for chunks in SummarysliceReader(…): …)
- km3io.online.unpack_bits(value, bits_template, out)[source]¶
Return a boolean array for a value’s bit representation.
This function also accepts arrays as input, the output shape will be NxM where N is the number of input values and M the length of the
bits_template
array, which is just a dummy array, due to the weird signature system of numba.- Parameters:
- value: int or np.array(int) with shape (N,)
The binary value of containing the bit information
- bits_template: np.array() with shape (M,)
The template for the output array, the only important is its shape
- Returns:
- np.array(bool) either with shape (M,) or (N, M)
- km3io.online.get_channel_flags(value)[source]¶
Returns the hrv/fifo flags for the PMT channels (hrv/fifo)
- Parameters:
- valueint32
The integer value to be parsed.
- km3io.online.get_number_udp_packets(value)[source]¶
Returns the number of received UDP packets (dq_status)
- Parameters:
- valueint32
The integer value to be parsed.
- km3io.online.get_udp_max_sequence_number(value)[source]¶
Returns the maximum sequence number of the received UDP packets (dq_status)
- Parameters:
- valueint32
The integer value to be parsed.
- km3io.online.has_udp_trailer(value)[source]¶
Returns the UDP Trailer flag (fifo)
- Parameters:
- valueint32
The integer value to be parsed.
- class km3io.online.Timeslice(header, superframe, hits_buffer, idx, stream)[source]¶
A wrapper for a timeslice