#! /bin/csh -f # # Talk like BLU-ICE: check for data collection # # again: # 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 else echo "data collection is running. " if("$1" == "wait" && "$active_run" == "run0") then echo -n "" | xos3_exchange.tcl 1 "operation_completed collect" 10 | grep image_ready goto again endif if("$1" == "wait") then echo -n "" | xos3_exchange.tcl 1 "operation_completed collectRun" 10 | grep image_ready goto again endif exit 1 endif