live preview streamer in start daq script

This commit is contained in:
lhdamiani
2021-08-18 17:36:07 +02:00
parent 2e0f28352b
commit dd30e2c86e
+24 -1
View File
@@ -12,6 +12,7 @@ BUILD_PATH='/home/hax_l/sf_daq_buffer/build/'
UDP_RECV='std_udp_recv'
UDP_SYNC='std_udp_sync'
EIGER_ASSEMBLER='eiger_assembler'
STD_STREAM_SEND='std_stream_send'
STD_DET_WRITER='std_det_writer'
# default config file
@@ -22,6 +23,7 @@ HELP_FLAG=0
# CONFIGURATION
BIT_DEPTH=16
N_MPI_EXEC=3
STREAM_NAME='streamvis'
while getopts h:c:b:m: flag
do
case "${flag}" in
@@ -29,15 +31,17 @@ do
c ) CONFIG_FILE=${OPTARG};;
b ) BIT_DEPTH=${OPTARG};;
m ) N_MPIT_EXEC=${OPTARG};;
s ) STREAMVIS=${OPTARG};;
esac
done
# prints help and exits
if (( ${HELP_FLAG} == 1 )); then
echo "Usage : $0 -h <help_flag> -c <config_file> -b <bit_depth>"
echo "Usage : $0 -h <help_flag> -c <config_file> -b <bit_depth> -s <stream_name>"
echo " help_flag : show this help and exits."
echo " config_file : detector configuration file."
echo " bit_depth : detector bit depth."
echo " stream name : live stream name."
exit
fi
@@ -127,6 +131,25 @@ else
exit
fi
# Start the stream
echo "Starting the ${STD_STREAM_SEND}..."
if [ -f "${BUILD_PATH}${STD_STREAM_SEND}" ]; then
if [ -f "${CONFIG_FILE}" ]; then
if [ ${BIT_DEPTH} -ne 0 ]; then
${BUILD_PATH}${STD_STREAM_SEND} ${CONFIG_FILE} ${BIT_DEPTH} ${STREAM_NAME} &
else
echo "Error: ${BIT_DEPTH} can't be zero..."
exit
fi
else
echo "Something went wrong while starting the ${STD_STREAM_SEND}..."
exit
fi
else
echo "Error: ${STD_STREAM_SEND} wasn't found..."
exit
fi
# Start the eiger writer
echo "Starting the ${STD_DET_WRITER}..."
export PATH="/usr/lib64/mpich-3.2/bin:${PATH}";