AlicaLogger

public class AlicaLogger

The ALICA logger logs analyzer and controller outputs during an acquisition.

Author:Marcel Stefko

Methods

addBatchedOutput

public void addBatchedOutput(int frame_no, double value)

Add batched output of analyzer into the log.

Parameters:
  • frame_no
  • value – value of the output

addControllerOutput

public void addControllerOutput(int frame_no, double value)

Add output of controller into log

Parameters:
  • frame_no
  • value – value of the output

addIntermittentOutput

public void addIntermittentOutput(int frame_no, double value)

Add intermittent output of analyzer into log

Parameters:
  • frame_no
  • value – value of the output

addSetpoint

public void addSetpoint(int frame_no, double setpoint)

Add setpoint of controller into log

Parameters:
  • frame_no
  • setpoint – value of the output

addToLog

public void addToLog(int frame_no, String value_name, double value)

Add a parameter into the log.

Parameters:
  • frame_no – The acquisition frame number for this log entry.
  • value_name – name of parameter
  • value – value of parameter

addToLog

public void addToLog(int frame_no, String value_name, String value)

Add a parameter into log

Parameters:
  • frame_no
  • value_name – name of parameter
  • value – value of parameter

clear

public final void clear()

Resets logger, removes all data.

getInstance

public static AlicaLogger getInstance()
Returns:AlicaLogger singleton

getLogMap

public LinkedHashMap<Integer, LinkedHashMap<String, Object>> getLogMap()

Returns the current log.

Returns:The current log stored by this logger.

logDebugMessage

public void logDebugMessage(String message)

Log message to MicroManager or to a general logger

Parameters:
  • message – message to be logged

logError

public void logError(Exception exc, String message)

Log exception in MicroManager or in general logger

Parameters:
  • exc – exception to be logged
  • message – message to be logged

logMessage

public void logMessage(String message)

Log message to MicroManager or to a general logger.

Parameters:
  • message – The message to be logged.

saveLog

public boolean saveLog()

Saves the log into a csv file chosen by file selection dialog.

Returns:true if save was successful, false otherwise

setStudio

public void setStudio(Studio studio)

Set studio to allow general logging.

Parameters:
  • studio – MMStudio

showError

public void showError(Exception exc, String message)

Show exception in MicroManager or in ImageJ

Parameters:
  • exc – exception to be shown
  • message – message to be shown

showMessage

public void showMessage(String message)

Show message in MicroManager or in ImageJ

Parameters:
  • message – message to be logged