From 0fe82e3f16743e59ab014f5627204753f1e75549 Mon Sep 17 00:00:00 2001
From: Carmelo Pellegrino <carmelo.pellegrino@gmail.com>
Date: Fri, 27 Nov 2015 13:01:28 +0100
Subject: [PATCH] set the detector id into the start event

---
 daq.sh | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/daq.sh b/daq.sh
index c360c57..defe90b 100755
--- a/daq.sh
+++ b/daq.sh
@@ -7,18 +7,19 @@
 # Author: Carmelo Pellegrino <carmelo.pellegrino@bo.infn.it>
 #
 
-if [ $# -ne 6 ]; then
+if [ $# -ne 7 ]; then
   echo "ERROR:"
-  echo "Syntax: $0 <run_number> <run_start_time> <run_duration_in_sec> <ip of the DAQ server> <username> <writetimeslices>"
+  echo "Syntax: $0 <run_number> <detector_id> <run_start_time> <run_duration_in_sec> <ip of the DAQ server> <username> <writetimeslices>"
   exit -1
 fi
 
 RUN_NUMBER=$1
-RUN_START_TIME=$2
-RUN_DURATION=$3
-DAQ_SERVER=$4
-DAQ_USER=$5
-WRITE_TIMESLICES=$6
+DETECTOR_ID=$2
+RUN_START_TIME=$3
+RUN_DURATION=$4
+DAQ_SERVER=$5
+DAQ_USER=$6
+WRITE_TIMESLICES=$7
 
 SERVER=${DAQ_SERVER} # JLigier for StateMachine
 LOGGER=${DAQ_SERVER} # JLigier for logging
@@ -101,7 +102,7 @@ event ev_configure {
               RC_DWRT path=$DIR; update_s=10; logger_s=5;
 }
 
-event ev_start     { RC_CMD ${RUN_NUMBER} }
+event ev_start     { RC_CMD ${RUN_NUMBER} ${DETECTOR_ID} }
 
 sleep ${RUN_DURATION}
 
-- 
GitLab