From 1d5db559865b469e8250f9dd870d5c14532418b6 Mon Sep 17 00:00:00 2001
From: Carmelo Pellegrino <carmelo.pellegrino@gmail.com>
Date: Wed, 27 May 2015 15:33:14 +0200
Subject: [PATCH] Logging the DAQ configuration for each run. This resolves
 issue #10

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

diff --git a/daq.sh b/daq.sh
index 00e5a6c..6ebc8f9 100755
--- a/daq.sh
+++ b/daq.sh
@@ -38,6 +38,9 @@ DETECTOR=du1cppm.detx # position of the detector file
 
 ROOT_FILE=`printf "${DIR}/KM3NeT_%08d.root" ${RUN_NUMBER}`
 
+# Run number formatted for filenames
+RNUMB_FNAMES=`printf "%08d" ${RUN_NUMBER}`
+
 if [ -f ${ROOT_FILE} ] ; then
     echo "The file ${ROOT_FILE} already exists, please rename or remove it first, then restart this script"
     exit -1
@@ -59,6 +62,8 @@ triggerParameters      = writeTimeslices         = 1;
 bufferSize             = 1073741824;
 EOF
 
+cp ev_configure_dfilter_dqdf.txt ${HOME}/.km3_private/ev_configure_dfilter_dqdf_R${RNUMB_FNAMES}.txt
+
 cat>ev_configure_dqueue_dqdf.txt<<EOF
 timeslice_duration=100;
 run_start_time=${RUN_START_TIME};
@@ -71,6 +76,8 @@ opto_recipients=127.0.0.1:5556;
 acou_recipient=127.0.0.1:5800;
 EOF
 
+cp ev_configure_dqueue_dqdf.txt ${HOME}/.km3_private/ev_configure_dqueue_dqdf_R${RNUMB_FNAMES}.txt
+
 # Driver input
 
 cat>driver.txt<<EOF
@@ -104,6 +111,8 @@ event ev_off       { RC_CMD }
 
 EOF
 
+cp driver.txt ${HOME}/.km3_private/driver_R${RNUMB_FNAMES}.txt
+
 JDAQDriver -H $SERVER -M $LOGGER -d $DEBUG -t $TIMEOUT_S -f driver.txt -c
 
 exit 0
-- 
GitLab