From d82459663cf0a26dbbf274a7b5dc16d3d0e70cb5 Mon Sep 17 00:00:00 2001
From: Carmelo Pellegrino <carmelo.pellegrino@gmail.com>
Date: Wed, 20 May 2015 12:44:39 +0200
Subject: [PATCH] time_duration_seconds is used in place of the one in minutes,
 verbosing messages

---
 patch-control.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/patch-control.sh b/patch-control.sh
index a378e8a..0a7b087 100644
--- a/patch-control.sh
+++ b/patch-control.sh
@@ -138,10 +138,11 @@ done | zenity --progress \
 # Peak the run number
 
 run_number=`get_run_number`
+let "run_duration_seconds = ${run_duration} * 60"
 
 log "Run ${run_number} ready to start. \
 Run start time = ${run_start_time}, \
-run duration = ${run_duration}, \
+run duration = ${run_duration} minutes, \
 run setup file = ${rs_file}."
 
 daq_log_file=~/.km3_private/daq_${run_number}.log
@@ -154,12 +155,12 @@ cat ${rs_file} | sed -e 's/RUNNUMBER/${run_number}/' >dm.detectorfile
 run_start_time=`nowUTC`
 
 # Launch the DM
-dm_driver ${run_duration} | mono DetectorControl.exe --control --reset &
+dm_driver ${run_duration_seconds} | mono DetectorControl.exe --control --reset &
 PROCS=(${PROCS[*]} $!)
 
 # Launch the DAQ
-log "Launching the DAQ with the following command line: daq.sh ${run_number} ${run_start_time} ${run_duration}"
-daq.sh ${run_number} ${run_start_time} ${run_duration}
+log "Launching the DAQ with the following command line: daq.sh ${run_number} ${run_start_time} ${run_duration_seconds}"
+daq.sh ${run_number} ${run_start_time} ${run_duration_seconds}
 
 # Point the browser to the correct address, if required
 zenity --question \
@@ -167,10 +168,9 @@ zenity --question \
        --cancel-label="No, thanks" && firefox http://localhost:1301/ &
 
 # Wait the end of the run
-let "run_duration_seconds = ${run_duration} * 60"
 sleep ${run_duration_seconds}
 
 log "Run ${run_number} finished."
-zenity --info --text="Run ${run_number} finished!"
+zenity --info --text="Run ${run_number} finished! The DAQ log file is located in ${daq_log_file}."
 
 exit 0
-- 
GitLab