#! /bin/tcsh -f # # Talk like BLU-ICE: un-pause data collection # # # retrieve current run information # pretend to be a gui, see if any runs are paused set paused_run = `echo -n "" | xos3_exchange.tcl 1 "set_motor_dependency" 1 |& awk '/^stog_configure_run run/ && $3 == "paused" {print $5}' | tail -1` # retrieve wich run/frame is running if("$paused_run" == "") then echo "data collection is not paused. " exit endif # pretend to be a gui, become master, unpause the collection, and then disconnect echo "gtos_become_master force\ngtos_start_operation collectRuns 0.1 $paused_run" |\ xos3_exchange.tcl 1 "start_operation collectRuns" 1 >& /dev/null if($status) exit 9 # wait for the system to start collecting echo -n "waiting for run $paused_run to start up" set active_run = "" while ("$active_run" == "") set active_run = `echo -n "" | xos3_exchange.tcl 1 "set_motor_dependency" 1 |& awk '/^stog_configure_run run/ && $3 == "collecting" {print $5}'` echo -n "." # wait a bit before checking again if("$active_run" == "") sleep 1 end echo "" echo "collection is now running"