From d801ac786842ad0518c19d0530e41d822644e361 Mon Sep 17 00:00:00 2001 From: hadaq Date: Wed, 12 Aug 2015 22:19:55 +0200 Subject: [PATCH] bugfix readout.pl, change to 7 sources, mt --- users/gsi_dirc/EventBuilderNew.xml | 6 +-- users/gsi_dirc/check_ping.pl | 10 ++--- users/gsi_dirc/readout.pl | 22 ++++++++--- users/gsi_dirc/register_config_tdc.db | 22 +++++------ users/gsi_dirc/register_configgbe.db | 6 +-- users/gsi_dirc/register_configgbe_ip.db | 6 +-- users/gsi_dirc/startup.sh | 50 +++++++++++++------------ users/gsi_dirc/trbreset_loop.pl | 2 +- 8 files changed, 68 insertions(+), 56 deletions(-) diff --git a/users/gsi_dirc/EventBuilderNew.xml b/users/gsi_dirc/EventBuilderNew.xml index d480d15..584ce33 100644 --- a/users/gsi_dirc/EventBuilderNew.xml +++ b/users/gsi_dirc/EventBuilderNew.xml @@ -64,7 +64,7 @@ When starting analysis from the go4 gui, one should specify stream server with p - + @@ -73,7 +73,7 @@ When starting analysis from the go4 gui, one should specify stream server with p - + @@ -102,7 +102,7 @@ When starting analysis from the go4 gui, one should specify stream server with p - + diff --git a/users/gsi_dirc/check_ping.pl b/users/gsi_dirc/check_ping.pl index ced342d..acd5cf4 100755 --- a/users/gsi_dirc/check_ping.pl +++ b/users/gsi_dirc/check_ping.pl @@ -27,14 +27,14 @@ my $map = { 2 => { trb => 73, sys => "MCP 02" }, 3 => { trb => 74, sys => "MCP 03" }, 4 => { trb => 104, sys => "MCP 04" }, - 5 => { trb => 97, sys => "TOF 1" }, - 6 => { trb => 59, sys => "TOF 2" }, - 7 => { trb => 89, sys => "HODO" }, - 8 => { trb => 57, sys => "AUX" }, +# 5 => { trb => 97, sys => "TOF 1" }, +# 6 => { trb => 59, sys => "TOF 2" }, +# 7 => { trb => 89, sys => "HODO" }, + 5 => { trb => 57, sys => "AUX" }, -1 => { trb => 56, sys => "CTS" }, }; -my $MAX_PROCESSES=50; +my $MAX_PROCESSES=30; my $pm = Parallel::ForkManager->new($MAX_PROCESSES); my $maximal_reboot_counter = 4; my $number_of_reboots_done = 0; diff --git a/users/gsi_dirc/readout.pl b/users/gsi_dirc/readout.pl index 7c02426..708aaa3 100755 --- a/users/gsi_dirc/readout.pl +++ b/users/gsi_dirc/readout.pl @@ -4,7 +4,7 @@ use strict; use Getopt::Long; my $help = ""; -my $dataPath = "/d/june2015/"; +my $dataPath = "/d/aug2015/"; my $label = "test"; my $time = -1; my $name = "cc"; @@ -42,7 +42,9 @@ if(!defined $old) { $c=qq|pkill -f "dabc_exe"|; qx($c); - $c=qq|perl -p -e 's/dabc.hld/$name.hld/' EventBuilderNew.xml > EventBuilder_autogenerated.xml|; + my $pathandfile = "$dataPath/$name.hld"; + $c=qq|perl -p -e 's^pathandfile^$pathandfile^' EventBuilderNew.xml > EventBuilder_autogenerated.xml|; + #print "$c\n"; qx($c); $c=qq|urxvt -geometry 80x27-0+0 -e bash -c 'dabc_exe EventBuilder_autogenerated.xml; sleep 10'|; @@ -51,20 +53,28 @@ if(!defined $old) { } else { - $c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 10 -x $name --filesize 1536 -d file -o $dataPath'|; + $c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 7 -x $name --filesize 1536 -d file -o $dataPath'|; + #$c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 10 -x $name --filesize 1536 -d file -o $dataPath'|; #$c=qq|xterm -geometry 122x16-0+0 -e bash -c 'daq_evtbuild -S $label -m 23 -x $name -d file -o $dataPath'|; - #print $c; + print "test"; + print $dataPath; + + print $c; system("$c &"); sleep 1; - $c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 10 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50005 -i UDP:127.0.0.1:50006 -i UDP:127.0.0.1:50007 -i UDP:127.0.0.1:50008'"; + $c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 7 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50008'"; + + + #$c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 10 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50005 -i UDP:127.0.0.1:50006 -i UDP:127.0.0.1:50007 -i UDP:127.0.0.1:50008'"; #$c=qq"xterm -geometry 82x44-0+234 -e bash -c 'daq_netmem -S $label -m 23 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50005 -i UDP:127.0.0.1:50006 -i UDP:127.0.0.1:50007 -i UDP:127.0.0.1:50008 -i UDP:127.0.0.1:50009 -i UDP:127.0.0.1:50010 -i UDP:127.0.0.1:50011 -i UDP:127.0.0.1:50012 -i UDP:127.0.0.1:50013 -i UDP:127.0.0.1:50014 -i UDP:127.0.0.1:50015 -i UDP:127.0.0.1:50016 -i UDP:127.0.0.1:50017 -i UDP:127.0.0.1:50018 -i UDP:127.0.0.1:50019 -i UDP:127.0.0.1:50020 -i UDP:127.0.0.1:50021 -i UDP:127.0.0.1:50022; sleep 2'"; #$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 2 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50002'"; - system("$c &"); + print $c; + system("$c &"); print "Saving data to $dataPath\n"; } diff --git a/users/gsi_dirc/register_config_tdc.db b/users/gsi_dirc/register_config_tdc.db index aa79059..a743ff1 100644 --- a/users/gsi_dirc/register_config_tdc.db +++ b/users/gsi_dirc/register_config_tdc.db @@ -11,31 +11,31 @@ ################################################################# # Broken (lost config) Padiwa - 0x2008 0 0xffff0000 0x0000ffff +# 0x2008 0 0xffff0000 0x0000ffff # FLASH # 0x2021 0 0x00000000 0x00000000 # 0x2022 0 0x00000000 0x00000000 # TOF1 - 0x2014 0 0x0000ffff 0x00000000 - 0x2015 0 0xffffffff 0x00000000 - 0x2016 0 0xffffffff 0x00000000 +# 0x2014 0 0x0000ffff 0x00000000 +# 0x2015 0 0xffffffff 0x00000000 +# 0x2016 0 0xffffffff 0x00000000 # 0x2017 0 0x0000ffff 0x00000000 # TOF2 - 0x2018 0 0x0000ffff 0x00000000 - 0x2019 0 0xffffffff 0x00000000 - 0x201a 0 0xffffffff 0x00000000 +# 0x2018 0 0x0000ffff 0x00000000 +# 0x2019 0 0xffffffff 0x00000000 +# 0x201a 0 0xffffffff 0x00000000 # 0x201b 0 0x00000000 0x00000000 # #Hodo - 0x201c 0 0x0000005f 0x00000000 - 0x201d 0 0xffffffff 0x00000000 - 0x201e 0 0x00000000 0x00000000 - 0x201f 0 0x00000000 0x00000000 +# 0x201c 0 0x0000005f 0x00000000 +# 0x201d 0 0xffffffff 0x00000000 +# 0x201e 0 0x00000000 0x00000000 +# 0x201f 0 0x00000000 0x00000000 # EDD # 0x202b 0 0x00000000 0x00000000 diff --git a/users/gsi_dirc/register_configgbe.db b/users/gsi_dirc/register_configgbe.db index 9e3e766..98b9f33 100755 --- a/users/gsi_dirc/register_configgbe.db +++ b/users/gsi_dirc/register_configgbe.db @@ -17,9 +17,9 @@ 0x8002 0 0x8002 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 0x8003 0 0x8003 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 0x8004 0 0x8004 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 - 0x8005 0 0x8005 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 - 0x8006 0 0x8006 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 - 0x8007 0 0x8007 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8005 0 0x8005 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8006 0 0x8006 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8007 0 0x8007 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 0x8008 0 0x8008 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 # 0x8009 0 0x8009 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 # 0x800a 0 0x800a 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 diff --git a/users/gsi_dirc/register_configgbe_ip.db b/users/gsi_dirc/register_configgbe_ip.db index 5906c4e..19db8e3 100755 --- a/users/gsi_dirc/register_configgbe_ip.db +++ b/users/gsi_dirc/register_configgbe_ip.db @@ -34,9 +34,9 @@ 0x8002 0 0x1e04f330 0x000e 0xc0a80003 0xc352 0xdead8002 0x001b 0xc0a80003 0xc353 0x0578 0x8003 0 0x1e04f330 0x000e 0xc0a80003 0xc353 0xdead8003 0x001b 0xc0a80004 0xc354 0x0578 0x8004 0 0x1e04f330 0x000e 0xc0a80003 0xc354 0xdead8004 0x001b 0xc0a80005 0xc355 0x0578 - 0x8005 0 0x1e04f330 0x000e 0xc0a80003 0xc355 0xdead8005 0x001b 0xc0a80006 0xc356 0x0578 - 0x8006 0 0x1e04f330 0x000e 0xc0a80003 0xc356 0xdead8006 0x001b 0xc0a80007 0xc357 0x0578 - 0x8007 0 0x1e04f330 0x000e 0xc0a80003 0xc357 0xdead8007 0x001b 0xc0a80008 0xc358 0x0578 +# 0x8005 0 0x1e04f330 0x000e 0xc0a80003 0xc355 0xdead8005 0x001b 0xc0a80006 0xc356 0x0578 +# 0x8006 0 0x1e04f330 0x000e 0xc0a80003 0xc356 0xdead8006 0x001b 0xc0a80007 0xc357 0x0578 +# 0x8007 0 0x1e04f330 0x000e 0xc0a80003 0xc357 0xdead8007 0x001b 0xc0a80008 0xc358 0x0578 0x8008 0 0x1e04f330 0x000e 0xc0a80003 0xc358 0xdead8008 0x001b 0xc0a80009 0xc359 0x0578 # 0x8009 0 0x1e04f330 0x000e 0xc0a80003 0xc359 0xdead8009 0x001b 0xc0a8000a 0xc35a 0x0578 # 0x800a 0 0x1e04f330 0x000e 0xc0a80003 0xc35a 0xdead800a 0x001b 0xc0a8000b 0xc35b 0x0578 diff --git a/users/gsi_dirc/startup.sh b/users/gsi_dirc/startup.sh index c6bce67..2c6096b 100755 --- a/users/gsi_dirc/startup.sh +++ b/users/gsi_dirc/startup.sh @@ -59,14 +59,14 @@ trbcmd w 0xfe4c 0xc803 0x0000ffff ## channel 33-64 enable trbcmd w 0xfe4c 0xc804 0x0000007c ## data transfer limit # TOFs time windows -trbcmd w 0x2014 0xc801 0x8000008c -trbcmd w 0x2015 0xc801 0x8000008c -trbcmd w 0x2016 0xc801 0x8000008c -trbcmd w 0x2018 0xc801 0x8000008c -trbcmd w 0x2019 0xc801 0x8000008c -trbcmd w 0x201a 0xc801 0x8000008c -trbcmd w 0x201c 0xc801 0x8000008c -trbcmd w 0x201d 0xc801 0x8000008c +#trbcmd w 0x2014 0xc801 0x8000008c +#trbcmd w 0x2015 0xc801 0x8000008c +#trbcmd w 0x2016 0xc801 0x8000008c +#trbcmd w 0x2018 0xc801 0x8000008c +#trbcmd w 0x2019 0xc801 0x8000008c +#trbcmd w 0x201a 0xc801 0x8000008c +#trbcmd w 0x201c 0xc801 0x8000008c +#trbcmd w 0x201d 0xc801 0x8000008c # special Matthias TDCs @@ -130,10 +130,10 @@ prepare_padiwas_invert_leds.pl --endpoints=0x2014-0x201f --chains=0..2 --invert= # turn off two unused TDCs in HODO # turn off two unused TDCs in TOF1 -switchport.pl 0x8005 3 off +#switchport.pl 0x8005 3 off # turn off two unused TDCs in TOF1 -switchport.pl 0x8006 3 off +#switchport.pl 0x8006 3 off # timeouts @@ -163,23 +163,25 @@ echo "write barrel dirc thresholds" #./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_25_offset_40_a.log -o 160 #./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_27_offset_40_a.log -o 160 -./write_thresholds.pl padiwa_threshold_results_sequential_2015_07_04_offset_40_a.log -o 160 +#./write_thresholds.pl padiwa_threshold_results_sequential_2015_07_04_offset_40_a.log -o 160 +./write_thresholds.pl padiwa_threshold_results_sequential_2015_08_11_offset_40_a.log -o 160 -sleep 2 -echo "write mcp and scitil thresholds" +#sleep 2 + +#echo "write mcp and scitil thresholds" #MCP-TOF, SciTils -./write_thresholds.pl mcptof_mcpout_zero.log -o 0 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_pixels_zero.log -o 0 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_scitil_noatt_zero.log -o 0 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_hodo_zero.log -o 0 >> /dev/null # =7 mV before amp -./write_thresholds.pl mcptof_chanmerge_mcpnoamp_zero.log -o 0 >> /dev/null # =7 mV before amp -sleep 2 -./write_thresholds.pl mcptof_mcpout_zero.log -o 400 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_pixels_zero.log -o 1500 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_scitil_noatt_zero.log -o 400 >> /dev/null # =10 mV before amp -./write_thresholds.pl mcptof_hodo_zero.log -o 1000 >> /dev/null # =7 mV before amp -./write_thresholds.pl mcptof_chanmerge_mcpnoamp_zero.log -o 400 >> /dev/null # =7 mV before amp +#./write_thresholds.pl mcptof_mcpout_zero.log -o 0 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_pixels_zero.log -o 0 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_scitil_noatt_zero.log -o 0 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_hodo_zero.log -o 0 >> /dev/null # =7 mV before amp +#./write_thresholds.pl mcptof_chanmerge_mcpnoamp_zero.log -o 0 >> /dev/null # =7 mV before amp +#sleep 2 +#./write_thresholds.pl mcptof_mcpout_zero.log -o 400 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_pixels_zero.log -o 1500 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_scitil_noatt_zero.log -o 400 >> /dev/null # =10 mV before amp +#./write_thresholds.pl mcptof_hodo_zero.log -o 1000 >> /dev/null # =7 mV before amp +#./write_thresholds.pl mcptof_chanmerge_mcpnoamp_zero.log -o 400 >> /dev/null # =7 mV before amp #echo "led off" diff --git a/users/gsi_dirc/trbreset_loop.pl b/users/gsi_dirc/trbreset_loop.pl index fa4e297..8826c41 100755 --- a/users/gsi_dirc/trbreset_loop.pl +++ b/users/gsi_dirc/trbreset_loop.pl @@ -4,7 +4,7 @@ use strict; use warnings; ### Change THIS! -my $required_endpoints = 50; +my $required_endpoints = 30; my $max_counter = 10; -- 2.43.0