Skip to content
Snippets Groups Projects
Commit e6cce246 authored by Ian Reed's avatar Ian Reed
Browse files

removing redundent variable setting

parent a9e1c548
No related branches found
No related tags found
2 merge requests!143Merge changes for DAQ code into the code to use at DESY,!141made pathing more robust by enforcing every path comes from...
......@@ -28,32 +28,29 @@ python3 telescope.py --configuration cern_test --kcu 192.168.0.10 --offset $3 -
#python3 poke_board.py --configuration modulev1 --etrocs 0 --kcu 192.168.0.10 --dark_mode --mask telescope_config_data/cern_test_2024-05-13-20-07-26/noise_width_module_106_etroc_2.yaml
python3 poke_board.py --configuration modulev1 --etrocs 0 --kcu 192.168.0.10 --dark_mode
if [ "$isTrack" = true ]
then
echo "You are starting a telescope run. Have you entered the run number $run_number on telescope? And turn BEAM ON now"
read dummy
fi
for i in $(seq 1 $1)
do
merging_dir="../ETROC2_Test_Stand/ScopeHandler/ScopeData/LecroyMerged/"
merging_dir="../ScopeHandler/ScopeData/LecroyMerged/"
echo "___________________________________ "$i
run_number=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/next_run_number.txt`
run_number=`cat ../ScopeHandler/Lecroy/Acquisition/next_run_number.txt`
echo "Run number: $run_number"
# python3 poke_board.py --configuration modulev0b --etrocs 0 --kcu 192.168.0.10 --rb 1 --bitslip
# python3 poke_board.py --configuration modulev1 --etrocs 2 --kcu 192.168.0.10 --rb 2 --bitslip
# python3 poke_board.py --configuration modulev1 --etrocs 2 --kcu 192.168.0.10 --rb 1 --bitslip
./autopilot.sh $n_events $offset
# python3 poke_board.py --configuration modulev1 --etrocs 2 --kcu 192.168.0.10 --rb 2 --bitslip
# python3 poke_board.py --configuration modulev1 --etrocs 2 --kcu 192.168.0.10 --rb 1 --bitslip
./autopilot.sh $n_events $offset $run_number
temperature=$(python3 poke_board.py --configuration modulev1 --etrocs 0 --rbs 0 --modules 0 --kcu 192.168.0.10 --temperature)
sleep 7s
kcu=`cat ./running_ETROC_acquisition.txt`
scope=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/running_acquisition.txt`
conversion=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Conversion/ongoing_conversion.txt`
merging=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Merging/ongoing_merging.txt`
scope=`cat ../ScopeHandler/Lecroy/Acquisition/running_acquisition.txt`
conversion=`cat ../ScopeHandler/Lecroy/Conversion/ongoing_conversion.txt`
merging=`cat ../ScopeHandler/Lecroy/Merging/ongoing_merging.txt`
echo $kcu
echo $scope
echo $conversion
......@@ -63,9 +60,9 @@ do
echo "Waiting..."
sleep 1s
kcu=`cat ./running_ETROC_acquisition.txt`
scope=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/running_acquisition.txt`
conversion=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Conversion/ongoing_conversion.txt`
merging=`cat ../ETROC2_Test_Stand/ScopeHandler/Lecroy/Merging/ongoing_merging.txt`
scope=`cat ../ScopeHandler/Lecroy/Acquisition/running_acquisition.txt`
conversion=`cat ../ScopeHandler/Lecroy/Conversion/ongoing_conversion.txt`
merging=`cat ../ScopeHandler/Lecroy/Merging/ongoing_merging.txt`
echo $kcu
echo $scope
echo $conversion
......@@ -73,7 +70,5 @@ do
done
test_successful=`test "$merging_dir/run_$run_number.root"`
printf "$run_number,$bias_V,$offset,$n_events,$board_number,$bond,$energy,`date -u`,$isTrack,$powerMode,$temperature, $isMulti \n">>./run_log_SPS_May2024.csv
done
next_file_index="/home/etl/Test_Stand/ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/next_run_number.txt"
index=`cat $next_file_index`
echo $index
echo $3
#ipython3 telescope.py -- --kcu 192.168.0.10 --offset $2 --delay 32
echo -n "True" > running_ETROC_acquisition.txt
(python3 daq.py --l1a_rate 0 --ext_l1a --kcu 192.168.0.10 --rb 0 --run $index --lock "/home/etl/Test_Stand/ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/running_acquisition.txt") &
(python3 daq.py --l1a_rate 0 --ext_l1a --kcu 192.168.0.10 --rb 0 --run $index --lock "/home/etl/Test_Stand/ETL_TestingDAQ/ScopeHandler/Lecroy/Acquisition/running_acquisition.txt") &
(sleep 15
python3 /home/etl/Test_Stand/ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/acquisition_wrapper.py --nevents $1)
python3 data_dumper.py --input ${index} --rbs 0 --skip_trigger_check
python3 /home/etl/Test_Stand/ETL_TestingDAQ/ScopeHandler/Lecroy/Acquisition/acquisition_wrapper.py --nevents $1)
python3 data_dumper.py --input $3 --rbs 0 --skip_trigger_check
# remember: 0,1,2
#python3 root_dumper.py --input ${index} #_rb0 # Run in other shell with root configured
echo -n "False" > running_ETROC_acquisition.txt
echo -n "True" > merging.txt
echo -n "True" > /home/etl/Test_Stand/ETROC2_Test_Stand/ScopeHandler/Lecroy/Acquisition/merging.txt
echo -n "True" > /home/etl/Test_Stand/ETL_TestingDAQ/ScopeHandler/Lecroy/Acquisition/merging.txt
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