]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update control gui scripts
authorhadaq <jan@lxhadeb07>
Sun, 4 Feb 2024 12:58:01 +0000 (13:58 +0100)
committerhadaq <jan@lxhadeb07>
Sun, 4 Feb 2024 12:58:01 +0000 (13:58 +0100)
18 files changed:
control/gui/daq/10_Start_DAQ
control/gui/expert/Powercycle_CTS
control/gui/expert/Stop_Speech_Output
control/gui/power/Ecal_RPC
control/gui/power/TOF_MdcHub
control/gui/power/Triggerbox_Beam
control/gui/reboot/10_Quite-A-Lot
control/gui/reboot/30_Ecal
control/gui/reboot/30_Extra_Boards
control/gui/reboot/30_Hubs
control/gui/reboot/30_MDC_Hub
control/gui/reboot/30_MDC_OEP
control/gui/reboot/30_RICH
control/gui/reboot/30_RPC
control/gui/reboot/30_Start
control/gui/reboot/30_TOF_Wall
control/gui/reboot/90_Reprogram_CTS
control/mdcLVgui/S0/200x

index 6c51976851b5889e333b59b9c5561ed04e35d962..e62959dbe6a5de521a6d3356e709465fd78877f1 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/bash
 
+perl -e '$cmd = q|LANG=C zenity --question --title "Automatic Restart of DAQ?" --text "During the cosmic beam time an additional question is asked:\nDo you want to enable automatic restart of DAQ if a failure happens?"|; $r=system($cmd); print "r: $r\n"; if($r==0) {$answer="yes"} else {$answer="no"}; $c2=qq!echo $answer | ssh hadesp33 "cat >/tmp/enable_automatic_restart"!; $r=qx($c2); print $r '
+
+
+
 export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the DAQ")
 if [ $myvar == "256" ]; then exit; fi
 
index 6437753e2738ec6de94a7b89ef3ec6f601f71bac..8dd6c1c3a5871c151bc15627aefbd65d7629c93c 100755 (executable)
@@ -3,10 +3,12 @@
 export myvar=$(doyoureallywant.pl "to powercycle the Triggerbox and Beam Monitoring?")
 if [ $myvar == "256" ]; then exit; fi
 
-
 xterm  -e bash --login -c  '
   ssh hadaq@lxhadesdaqp "
-  source /home/hadaq/.bash_profile        
+  source /home/hadaq/.bash_profile
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1     
   echo \"Starting a power cycle of CTS...\"
   cd /home/hadaq/hadesdaq/utils;
   bash Powercycle_CTS.sh;
index 2b102042733bec3157b06e8831118daa159ccb17..7db2caa68c8dcc72edced1cfa389118b2e32f63e 100755 (executable)
@@ -1,6 +1,4 @@
 #!/bin/bash
 ssh hadaq@hadesp33 "killall -USR1 speakdaemon.pl"
 
-ssh hadaq@hadesp57 "killall -USR1 speakdaemon.pl; pkill -f espeak"
-
 
index 4e8ccf423f872cfdd1faf45fffc5ac24ac2a3748..bfcbaee4d13c1a3a24f71a23a8e11aea951d3113 100755 (executable)
@@ -5,7 +5,10 @@ if [ $myvar == "256" ]; then exit; fi
 
 xterm  -e bash --login -c  '
   ssh hadaq@lxhadesdaqp "
-  source /home/hadaq/.bash_profile        
+  source /home/hadaq/.bash_profile 
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1       
   echo \"Starting a RPC/ECAL power cycle...\"
   cd /home/hadaq/hadesdaq/utils;
   PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl ./ECAL_Powercycle.pl;
index 9d5f430313cdb4e40d60d2b56494c8cdf42b4a05..544ef6ae8d0f1e5257f0572520acc0481a86b7c2 100755 (executable)
@@ -6,6 +6,9 @@ if [ $myvar == "256" ]; then exit; fi
 xterm  -e bash --login -c  '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile        
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1       
   echo \"Starting a MDC/TOF/Central power cycle...\"
   cd /home/hadaq/hadesdaq/utils;
   PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl ./MdcTofCentral_Powercycle.pl;
index d67e290d5a74c9a70bd12a3075f43a7430f32346..bf9779f671347dd1f4fe1418600f6b16f6664801 100755 (executable)
@@ -3,10 +3,12 @@
 export myvar=$(doyoureallywant.pl "to powercycle the Triggerbox and Beam Monitoring?")
 if [ $myvar == "256" ]; then exit; fi
 
-
 xterm  -e bash --login -c  '
   ssh hadaq@lxhadesdaqp "
-  source /home/hadaq/.bash_profile        
+  source /home/hadaq/.bash_profile  
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1      
   echo \"Starting a power cycle of Triggerbox and Beam Monitoring...\"
   cd /home/hadaq/hadesdaq/utils;
   bash Powercycle_Trigger.sh;
index 30e60bd3244d732a656a760581ab96c869d684bc..45ee7e7c4dda7246344e4f054c80eb774b0fbbe2 100755 (executable)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
-export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot many boards ")
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot TOF, FW, RICH, RPC, ECAL and Start boards ")
 if [ $myvar == "256" ]; then exit; fi
 
-notifyall.sh "DAQ" "<I> The boards of TOF and FW are going to be rebooted." "STARTUP" &
-
+notifyall.sh "DAQ" "<I> The boards of TOF, FW, RICH, RPC, ECAL and Start are going to be rebooted." "STARTUP" &
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
+
   cd ~/trbsoft/trbnettools/binlocal
 
   echo \"This does not include MDC, Extra Boards, Hubs, CTS!\"
@@ -32,6 +35,9 @@ for TRB3_SERVER in  trb3sc136 trb3sc158 trb3sc144 trb3sc139 trb3sc163 trb3sc153
 
   
 echo RPC
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1       
 for TRB3_SERVER in  trb3sc317 trb3sc319 trb3sc320 trb3sc315 trb3sc318 trb3sc316;
   do
     ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
index e0e6efff2d26904977c4523d677f6e1ba89269f1..2fb27fa879e93dc5a7471f9e1976082a54c5a52f 100755 (executable)
@@ -5,10 +5,13 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The ECal boards are going to be rebooted." "STARTUP" &
 
+timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 # Switch off trigger
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
 #  trbcmd reload 0xfe71
   trbcmd reload 0x120
 
@@ -18,7 +21,7 @@ for TRB3_SERVER in  trb3sc134 trb3sc009 trb3sc130 trb3sc128 trb3sc131 trb3sc129
   do
     ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
     TRB3_SERVER=\$TRB3_SERVER ./trbcmd reload 0xffff
-    sleep .3
+    sleep .6
   done
 
   echo \"Done   - Check for Error messages above, then do a DAQ restart!\"
index adfa6d542a86fb690d0ca23035b8a30e842f5f84..901c0721db35098eb26083e259f26f7924e47fc1 100755 (executable)
@@ -5,10 +5,11 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> Auxiliary boards are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
 
 #  trbcmd reload 0x8d00
   trbcmd reload 0x0010
index 847180bfb5c5d7509e8e8f93c70da97f9238d3f5..002274af8f7bc56212da48e41688ea0e8b12d56e 100755 (executable)
@@ -5,10 +5,11 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The central Hubs are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
 #  trbcmd reload 0xfffe
 
 trbcmd reload 0x8011
index 88283b2e82b02e9dcb7d30cf99f071abf950826b..47c9bdc9d64be7c1d13c29906df594423c905a95 100755 (executable)
@@ -11,6 +11,8 @@ notifyall.sh "DAQ" "<I> MDC-Hubs are going to be rebooted." "STARTUP" &
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   export DAQOPSERVER=hadesp31
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   trbcmd reset
   trbcmd reload 0xfe11
   trbcmd reload 0xfe15
index 1ab4e9e7a5d488d2ca8e1fe7e2dbfba1d6809c96..4cc9d6c2cca42c680cc53ce75300e21d59f39025 100755 (executable)
@@ -6,6 +6,8 @@ if [ $myvar == "256" ]; then exit; fi
 notifyall.sh "DAQ" "<I> OEPs are going to be rebooted." "STARTUP" &
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   ~/bin/rebootoep_x11.sh
   sleep 2
 '
index fd0ec63d6bdad0c09575f892dfc917e03b077b84..aee7be010ae3b4e6b3f6505b1a502f993211cd31 100755 (executable)
@@ -5,9 +5,11 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The RICH boards are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   cd ~/trbsoft/trbnettools/binlocal
 
 
@@ -18,7 +20,7 @@ for TRB3_SERVER in  trb3sc136 trb3sc158 trb3sc144 trb3sc139 trb3sc163 trb3sc153
     ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
     TRB3_SERVER=\$TRB3_SERVER ./trbcmd reload 0xfe51  #to prevent a race condition between reset issued by combiner and Dirich not rebooting afterwards
     TRB3_SERVER=\$TRB3_SERVER ./trbcmd reload 0xffff
-    sleep .3
+    sleep .6
   done
 
 
index 79a7318220207ef6e9269fc06f7d619c20890184..d6480cacada57a323cbba6f61f06d6ce6ef1db54 100755 (executable)
@@ -5,17 +5,21 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The RPC boards are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1       
   cd ~/trbsoft/trbnettools/binlocal
   
 for TRB3_SERVER in  trb3sc317 trb3sc319 trb3sc320 trb3sc315 trb3sc318 trb3sc316;
   do
     ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
     TRB3_SERVER=\$TRB3_SERVER ./trbcmd reload 0xffff
-    sleep .3
+    sleep .6
   done  
   
 # TRB3_SERVER=trb3sc317 ./trbcmd reload 0xffff
index c369048c6a6a6d1f30850d4aa34fc55a59f9eef5..59cbacc4d36cbe1b9640938cabbdfe7246318644 100755 (executable)
@@ -5,10 +5,11 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The Start boards are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   
   
 for TRB3_SERVER in  trb3sc438;
index e059982a8e86130f45c35de612fe6ce022ac995e..94045701bcaa4613242d8a9616d4e97928d56c14 100755 (executable)
@@ -5,9 +5,11 @@ if [ $myvar == "256" ]; then exit; fi
 
 notifyall.sh "DAQ" "<I> The boards of TOF and FW are going to be rebooted." "STARTUP" &
 
-
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   cd ~/trbsoft/trbnettools/binlocal
 
 
index fba434fbe19b43b98e091c47ed2d89e1937285eb..7ade4bb2bea127f202800e2885a47cd4bcf88181 100755 (executable)
@@ -8,8 +8,13 @@ killall logerrors.pl
 
 notifyall.sh "DAQ" "<I> FPGA are being reprogrammed." "STARTUP" &
 
+timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 # Switch off trigger
+
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh -X hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   cd ~/trbsoft/hadesdaq/main/
   ./startup.pl -f main_hades.script -o file  -m TOF -m RPC -m WALL -m RICH -m STARTCTS -m MDC -m MDCDATASET --eb off
   #echo \"First config run\"
index 6e0e776dfdb99d1cdd1ddd94abaf5e4471659626..90532142972ddfa0ddd0fad5261c900a956436cf 100755 (executable)
@@ -2,10 +2,11 @@
 #set -xv 
 
 xterm  -e bash --login -c  '
-  ssh hadaq@lxhadesdaqp "
+  ssh hadaq@lxhadesdaq "
   source /home/hadaq/.bash_profile        
   #set -xv
-( which epics >/dev/null 2>&1 && . epics -q ) || export EPICS_BASE=/home/hadaq/EPICS/EPICS-3.15.6/base/
+#( which epics >/dev/null 2>&1 && . epics -q ) || export EPICS_BASE=/home/hadaq/EPICS/EPICS-3.15.6/base/
+( . ~/EPICS/bin/epics -q 7.0.2 ) || export EPICS_BASE=/home/hadaq/EPICS/EPICS-7.0.2/base/
 PERLLIB=\${EPICS_BASE}lib/perl:~/trbsoft/hadesdaq/nettools:~/trbsoft/daqtools/perllibs
 
 cd ~/trbsoft/hadesdaq/utils && ./MDC_Powercycle_2PSx.pl -P 1 -S 1