Skip to content
Snippets Groups Projects
Commit f81afe1e authored by Carmelo Pellegrino's avatar Carmelo Pellegrino
Browse files

Asking for run duration before the run number calculation

Asking repeteadly if "Cancel" is selected
Waiting for 10 secs to cancel the operation, reporting the parameters
Launch the logger
parent a1ebfa54
No related branches found
No related tags found
No related merge requests found
...@@ -52,36 +52,60 @@ function get_run_number() { ...@@ -52,36 +52,60 @@ function get_run_number() {
echo ${run_number} echo ${run_number}
} }
# Ask for the run setup while [ 1 ]; do
rs_file=`zenity --title "Run Setup Selector" \ # Ask for the run setup
--list \
--text "Select one of the following Run Setups:" \ rs_file=`zenity --title "Run Setup Selector" \
--radiolist \ --list \
--column="Selection" \ --text "Select one of the following Run Setups:" \
--column="Run Setup file" \ --radiolist \
$(createList ${folder})` --column="Selection" \
--column="Run Setup file" \
if [ -z "${rs_file}" ]; then $(createList ${folder})`
zenity --error --text="No Run Setup file selectet, aborting"
exit -1 if [ -z "${rs_file}" ]; then
fi zenity --error --text="No Run Setup file selectet, aborting"
exit -1
fi
# Ask for run duration
run_duration=`zenity --title "Run duration" \
--list \
--text "Select one of the following duration:" \
--radiolist \
--column="Selection" \
--column="Minutes" \
FALSE Cancel FALSE 5 TRUE 10 FALSE 20`
if [ "$run_duration" == "Cancel" ]; then
break
fi
done
# Wait 10 seconds
i=0;
while [ $i -lt 100 ]; do
echo $i
sleep 1
let "i = $i + 10"
done | zenity --progress \
--auto-close \
--text="You have 10 seconds to cancel the current operation:\nrunsetup: ${rs_file}\nduration: ${run_duration}" \
--auto-kill
# Peak the run number # Peak the run number
run_number=`get_run_number` run_number=`get_run_number`
# Copy selected run setup file, changing the run number daq_log_file=~/.km3_private/daq_${run_number}.log
JGetMessage -H localhost -T MSG -d 3 >${daq_log_file} &
# Ask for run duration
run_duration=`zenity --title "Run duration" \ # Copy selected run setup file, changing the run number
--list \
--text "Select one of the following duration:" \
--radiolist \
--column="Selection" \
--column="Minutes" \
FALSE 5 TRUE 10 FALSE 20`
# Launch the DM # Launch the DM
dm_driver ${run_duration} | mono DetectorControl.exe --control --reset & dm_driver ${run_duration} | mono DetectorControl.exe --control --reset &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment