LArPix Logger

class larpix.logger.Logger(enabled=False, *args, **kwargs)[source]

Base class for larpix logger objects that explicity describes the necessary functions for a Logger implementation. Additional functions are not built into the larpix core.

WRITE = 0

Flag to indicate packets were sent to ASICs

READ = 1

Flag to indicate packets were received from ASICs

record(data, direction=0, *args, **kwargs)[source]

Log specified data.

Parameters:
  • datalist of data to be written to log. Valid data types are specified by logger implementation. Raises a ValueError if datatype is invalid.
  • directionLogger.WRITE if packets were sent to ASICs, Logger.READ if packets were received from ASICs. (default: Logger.WRITE)
is_enabled()[source]

Check if logger is enabled, i.e. actively recording data. All data passed into record() between an enable() and disable() command should be reflected in the log.

enable()[source]

Enable logger

disable()[source]

Disable logger

Note

This flushes any data in the buffer before disabling

is_open()[source]

Returns the value of the internal state “open/closed” (True if open).

Deprecated since version 2.4.0: open, close, and is_open are deprecated and will be removed in the next major release of larpix-control.

open(enable=True)[source]

Change internal state to “open” (meaningless), and if enable, enable this logger (meaningful).

Parameters:enable – whether to enable this logger

Deprecated since version 2.4.0: open, close, and is_open are deprecated and will be removed in the next major release of larpix-control.

close()[source]

Change internal state to “closed” (meaningless) and disable this logger (meaningful).

Deprecated since version 2.4.0: open, close, and is_open are deprecated and will be removed in the next major release of larpix-control.

flush()[source]

Flushes any held data from memory to the destination

Implementations

Here is the documentation for the various LArPix loggers.

Index