LArPix Logger

class larpix.logger.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_configs(chips)[source]

Save specified chip configs to log file (if applicable)

Parameters:configs – list of Chips to log
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

flush()[source]

Flushes any held data from memory to the destination

Implementations

Here is the documentation for the various LArPix loggers.

Index