#! /bin/csh -f # # Talk like BLU-ICE: pause data collection # # # retrieve current run information # pretend to be a gui, see if any collections are even running set active_run = `echo -n "" | xos3_exchange.tcl 1 "set_motor_dependency" 1 |& awk '/^stog_configure_run run/ && $3 == "collecting" {print $2}'` # retrieve wich run/frame is running if("$active_run" == "") then echo "data collection is not running. " exit endif # pause the collection echo -n "data collection will pause after current image finishes up" # pretend to be a gui, become master, pause the collection, and then disconnect echo "gtos_become_master force\ngtos_start_operation pauseDataCollection 0.1" |\ xos3_exchange.tcl 1 "operation_completed pauseDataCollection" 1 >& /dev/null if($status) exit 9 # wait for the system to pause (or, at least, stop collecting) set active_run = 1 while ("$active_run" != "") set active_run = `echo -n "" | xos3_exchange.tcl 1 "set_motor_dependency" 1 |& awk '/^stog_configure_run run/ && $3 == "collecting" {print $2}'` echo -n "." # wait a bit before checking again if("$active_run" != "") sleep 1 end echo "" echo "collection has now paused"