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() {
echo ${run_number}
}
# Ask for the run setup
rs_file=`zenity --title "Run Setup Selector" \
--list \
--text "Select one of the following Run Setups:" \
--radiolist \
--column="Selection" \
--column="Run Setup file" \
$(createList ${folder})`
if [ -z "${rs_file}" ]; then
zenity --error --text="No Run Setup file selectet, aborting"
exit -1
fi
while [ 1 ]; do
# Ask for the run setup
rs_file=`zenity --title "Run Setup Selector" \
--list \
--text "Select one of the following Run Setups:" \
--radiolist \
--column="Selection" \
--column="Run Setup file" \
$(createList ${folder})`
if [ -z "${rs_file}" ]; then
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
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" \
--list \
--text "Select one of the following duration:" \
--radiolist \
--column="Selection" \
--column="Minutes" \
FALSE 5 TRUE 10 FALSE 20`
# Copy selected run setup file, changing the run number
# Launch the DM
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