mento.trigger#

Main interface to online analysis functionality

Provides two classes to create triggers that can, well, automatically trigger processes while data taking is going on. These processes may be local programs or Bash scripts, or programs run on a remote machine via SSH, or SLURM jobs submitted to reserved HPC nodes via SSH+sbatch.

Classes#

Trigger:

Simple class containing information about:

  1. Type of processing to run (local, remote, SLURM, etc.)

  2. Beamtime metadata (computing resource allocation, temporary authentication accounts/tokens for remote connection, etc.)

TriggerMethod:

Simple enumerator listing all possible triggering methods

Local Bash script, Remote call via SSH, SLURM job submission via sbatch, SLURM job submission via REST API, etc.

Functions#

get_ssh_command(bt_info, destination=None):

get the full SSH command to connect to an allocated remote node

def get_sbatch_command(bt_info, job_name, job_dependency, logfile_path):

get the full sbatch command to submit a batch job to the allocated SLURM reservation

Functions

get_sbatch_command(bt_info[, job_name, ...])

Prepare SLURM sbatch command to be run on the remote node, including all Slurm reservation parameters.

get_ssh_command(bt_info[, destination])

Prepare SSH command to be run on the local node, including all options for accessing remote computing resources.

retrieve_arg_list(arg_list)

Internal function.

retrieve_cmd(arg_list)

Internal function.

Classes

Trigger([trigger_method, beamline_root_dir])

Collective information needed to trigger an online analysis run.

TriggerMethod(value)

Supported triggering methods.