By convention the experiment run number is maintained in the value of the run key of an experiment's key value store. This program:
Fetches the program definition for the readout-name program from the manager running in mgr_host started by the user mgr_user. The assumption is that this is a readout program that has the ReadoutREST plugin running.
The program definition describes the host in which this Readout is running and its username will be the same as mgr_user. The REST service is assumed to be running on the default service name.
Fetches the value of the run key from the same manager.
Requests that the specified Readout program set its run number to the value of the run key fetched from the key value store.
It is the use of the default REST service name in this and other programs that restrict us to a single Readout program per host/user pair. This restriction should be removed at some point by allowing users to specify the REST service used by programs and using that to select the actual service name.