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

lock related functions implemented

using the logger to log the start of the TriDAS
put the final question in background
report the end of the run
parent 941db557
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,18 @@ ...@@ -7,6 +7,18 @@
# Author: Carmelo Pellegrino <carmelo.pellegrino@bo.infn.it> # Author: Carmelo Pellegrino <carmelo.pellegrino@bo.infn.it>
# #
function put_lock() {
touch /tmp/auto_ss
}
function rm_lock() {
unlink /tmp/auto_ss
}
function test_lock() {
return [ -e /tmp/auto_ss ]
}
function createList() { function createList() {
local LIST local LIST
local file local file
...@@ -105,6 +117,7 @@ JGetMessage -H localhost -T MSG -d 3 >${daq_log_file} & ...@@ -105,6 +117,7 @@ JGetMessage -H localhost -T MSG -d 3 >${daq_log_file} &
## impl: get the pid and add to the list of must_kill_at_the_exit ## impl: get the pid and add to the list of must_kill_at_the_exit
# Copy selected run setup file, changing the run number # Copy selected run setup file, changing the run number
cat ${rs_file} | sed -e 's/RUNNUMBER/${run_number}/' >dm.detectorfile
run_start_time=`nowUTC` run_start_time=`nowUTC`
...@@ -112,10 +125,17 @@ run_start_time=`nowUTC` ...@@ -112,10 +125,17 @@ run_start_time=`nowUTC`
dm_driver ${run_duration} | mono DetectorControl.exe --control --reset & dm_driver ${run_duration} | mono DetectorControl.exe --control --reset &
# Launch the DAQ # 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} daq.sh ${run_number} ${run_start_time} ${run_duration}
# Point the browser to the correct address, if required # Point the browser to the correct address, if required
zenity --question \ zenity --question \
--text="Would you like to open the DetectorManager GUI?" \ --text="Would you like to open the DetectorManager GUI?" \
--cancel-label="No, thanks" && firefox http://localhost:1301/ --cancel-label="No, thanks" && firefox http://localhost:1301/ &
# Wait the end of the run
sleep ${run_duration}
zenity --info --text="Run ${run_number} finished!"
exit 0
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