Analysis manager

A tree-view panel: manages the start, stop, status monitoring and automatic restart of analysis scripts.

Overview

quatm/GUI/entries/analysismanager.py provides the analysis manager: it lists the analysis scripts in a checkable tree table (name / script / category / input stream) and is responsible for starting and stopping subprocesses, monitoring and automatic restart, as well as adding, deleting and configuring analysis entries.

Components

ComponentDescription
AnalysisManagerMain panel: loads and organises the analysis entries, and provides delete/configure entry points
TreeViewWidgetAnalysis script management tree: checking starts and stops, monitoring restarts automatically, add/delete/edit
addAnalysisWidgetToolbar for adding an analysis entry (name / category / script / input stream)

Functions

OperationDescription
Check to startChecking an entry starts the corresponding analysis subprocess; unchecking stops it
StopendProcess: terminates first and waits briefly for exit, then forces the end on timeout
Status refreshupdateStatus: periodically checks whether the process is still running
Clean up stray processeskillVagabonding: terminates leftover processes of the same script from the previous round
Add / configure / deleteThe toolbar registers new entries; a selected row can be configured or deleted

Usage

from quatm.GUI.entries.analysismanager import AnalysisManager

mgr = AnalysisManager(name="AnalysisManager", parent=parent)

Analysis scripts are independent processes: once an entry is checked, the manager launches the script with the current interpreter and injects the project environment variables into the child process, so analysis code and the main program are isolated from each other and a script crash cannot affect experiments.