From: Hades DAQ Date: Tue, 12 Mar 2019 12:30:15 +0000 (+0100) Subject: updates of control GUI X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=9ca0718edd18eab5da548195df3683813351c6e1;p=hadesdaq.git updates of control GUI --- diff --git a/control/gui/50_Reboot_TRB3 b/control/gui/50_Reboot_TRB3 new file mode 100644 index 0000000..47c1ce7 --- /dev/null +++ b/control/gui/50_Reboot_TRB3 @@ -0,0 +1,18 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +notifyall.sh "DAQ" " The TRB3 in the system 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 + ~/trbsoft/hadesdaq/nettools/reboot_TRB3.pl + sleep 10 + " +' + +notifyall.sh "DAQ" " The TRB3 in the system are going to be rebooted." "STARTUP" & + diff --git a/control/gui/Buttons2.pm b/control/gui/Buttons2.pm index c6c839a..4ced96a 100644 --- a/control/gui/Buttons2.pm +++ b/control/gui/Buttons2.pm @@ -373,7 +373,7 @@ sub make_subroutine { # make subroutines #sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); } - my $str = qq|sub slot| . $i . qq|Pressed { my \$c = this->{self}->{ra_buttons}->[$i]; \$c = "cd $dir; control_gui_logger.sh \$c; ./\$c &"; print "will execute: \$c\n"; system(\$c); }|; + my $str = qq|sub slot| . $i . qq|Pressed { my \$s = this->{self}->{ra_buttons}->[$i]; my \$str = "\$dir/\$s"; my \$c = "cd \$dir; control_gui_logger.sh CONTROL \$str; ./\$s &"; print "will execute: \$c\n"; system(\$c); }|; # my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|; #system(\$c); }|; #print "sub: $str\n"; diff --git a/control/gui/daq/20_Reprogram_FPGA b/control/gui/daq/20_Reprogram_FPGA index 0fb05bc..fba434f 100755 --- a/control/gui/daq/20_Reprogram_FPGA +++ b/control/gui/daq/20_Reprogram_FPGA @@ -1,6 +1,6 @@ #!/bin/bash -export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl " reprogramm the FPGAs") +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reprogramm the FPGAs") if [ $myvar == "256" ]; then exit; fi @@ -12,9 +12,9 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' ssh -X hadaq@lxhadesdaqp " 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\" - bash startup_briccolage.sh -" + #echo \"First config run\" + #bash startup_briccolage.sh + " ' notifyall.sh "DAQ" " FPGA have been programmed and DAQ is started." "STARTUP" & diff --git a/control/gui/daq/30_Reboot_OEP b/control/gui/daq/30_Reboot_OEP index 6a1ec2c..1ab4e9e 100755 --- a/control/gui/daq/30_Reboot_OEP +++ b/control/gui/daq/30_Reboot_OEP @@ -3,11 +3,11 @@ export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl " reboot the MDC-OEPs") if [ $myvar == "256" ]; then exit; fi +notifyall.sh "DAQ" " OEPs are going to be rebooted." "STARTUP" & + xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' -ssh hadaq@lxhadesdaqp " -~/bin/rebootoep_x11.sh -sleep 2 -" + ~/bin/rebootoep_x11.sh + sleep 2 ' notifyall.sh "DAQ" " OEPs rebooted" "MDC"& diff --git a/control/gui/daq/35_Reboot_MDCHub b/control/gui/daq/35_Reboot_MDCHub index cb5b1f9..7c20ef3 100755 --- a/control/gui/daq/35_Reboot_MDCHub +++ b/control/gui/daq/35_Reboot_MDCHub @@ -7,11 +7,13 @@ export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl " reboot the MDC-Hubs") if [ $myvar == "256" ]; then exit; fi +notifyall.sh "DAQ" " MDC-Hubs are going to be rebooted." "STARTUP" & + xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' trbcmd reset trbcmd reload 0xfe11 + sleep 8 ' -sleep 8; -notifyall.sh "DAQ" " MDC-Hubs rebooted" "MDC"& +notifyall.sh "DAQ" " MDC-Hubs rebooted" "MDC" & diff --git a/control/gui/daq/40_ReSync_Missing_OEP b/control/gui/daq/40_ReSync_Missing_OEP index cc2c59a..e58656e 100755 --- a/control/gui/daq/40_ReSync_Missing_OEP +++ b/control/gui/daq/40_ReSync_Missing_OEP @@ -1,8 +1,8 @@ #!/bin/bash xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' -ssh hadaq@lxhadesdaqp " -echo "reviveoep.pl" -reviveoep.pl -sleep 10 -" + ssh hadaq@lxhadesdaqp " + echo "reviveoep.pl" + reviveoep.pl + sleep 10 + " ' diff --git a/control/gui/daq/41_Resync_DiRich b/control/gui/daq/41_Resync_DiRich new file mode 100755 index 0000000..f6d0d8c --- /dev/null +++ b/control/gui/daq/41_Resync_DiRich @@ -0,0 +1,8 @@ +#!/bin/bash +xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' + ssh hadaq@lxhadesdaqp " + echo "revivedirich.pl" + revivedirich.pl + sleep 10 + " +' diff --git a/control/gui/daq/50_Reboot_CentralHubs b/control/gui/daq/50_Reboot_CentralHubs new file mode 100755 index 0000000..33d2bff --- /dev/null +++ b/control/gui/daq/50_Reboot_CentralHubs @@ -0,0 +1,19 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +notifyall.sh "DAQ" " The TRB3 in the system 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 + trbcmd reload 0xfe65 + trbcmd reload 0x8000 + sleep 10 + " +' + +notifyall.sh "DAQ" " The Central Hubs are going to be rebooted." "STARTUP" & + diff --git a/control/gui/daq/50_Reboot_Dirich b/control/gui/daq/50_Reboot_Dirich new file mode 100755 index 0000000..dd899c1 --- /dev/null +++ b/control/gui/daq/50_Reboot_Dirich @@ -0,0 +1,18 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +#notifyall.sh "DAQ" " The TRB3 in the system are going to be rebooted." "STARTUP" & +notifyall.sh "DAQ" " The DiRich 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 + trbcmd reload 0xfe51 + sleep 10 + " +' + + diff --git a/control/gui/daq/50_Reboot_Ecal b/control/gui/daq/50_Reboot_Ecal new file mode 100755 index 0000000..a112eae --- /dev/null +++ b/control/gui/daq/50_Reboot_Ecal @@ -0,0 +1,19 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +notifyall.sh "DAQ" " The TRB3 in the system 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 + trbcmd reload 0xfe71 + trbcmd reload 0xfe61 + sleep 10 + " +' + +notifyall.sh "DAQ" " The ECal TRB3sc are going to be rebooted." "STARTUP" & + diff --git a/control/gui/daq/50_Reboot_RICH_Hubs b/control/gui/daq/50_Reboot_RICH_Hubs new file mode 100755 index 0000000..b91ae1e --- /dev/null +++ b/control/gui/daq/50_Reboot_RICH_Hubs @@ -0,0 +1,17 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +notifyall.sh "DAQ" " The TRB3 in the system 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 + trbcmd reload 0xfe66 + sleep 10 + " +' + +notifyall.sh "DAQ" " The RICH Hubs are going to be rebooted." "STARTUP" & diff --git a/control/gui/daq/50_Reboot_Rich_Combiner b/control/gui/daq/50_Reboot_Rich_Combiner new file mode 100755 index 0000000..6fe9c25 --- /dev/null +++ b/control/gui/daq/50_Reboot_Rich_Combiner @@ -0,0 +1,18 @@ +#!/bin/bash + +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot the TRB3s in the system") +if [ $myvar == "256" ]; then exit; fi + +#notifyall.sh "DAQ" " The TRB3 in the system are going to be rebooted." "STARTUP" & +notifyall.sh "DAQ" " The Rich Combiner 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 + trbcmd reload 0xfe52 + sleep 10 + " +' + + diff --git a/control/gui/daq/50_Reboot_TRB3 b/control/gui/daq/50_Reboot_TRB3 deleted file mode 100755 index c98ab9d..0000000 --- a/control/gui/daq/50_Reboot_TRB3 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use HADES::TrbNet; - -$ENV{'DAQOPSERVER'} = "hadesp31"; -trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror(); - -#system("trbcmd i 0xffff"); -#exit; - -system("trbcmd reload 0xfe49"); - -system("trbcmd reload 0x8880"); -system("trbcmd reload 0x8890"); -system("trbcmd reload 0x8900"); -system("trbcmd reload 0x8910"); - diff --git a/control/gui/eb/27_Start_TDC_CAL b/control/gui/eb/27_Start_TDC_CAL index ec01cce..5bc3604 100755 --- a/control/gui/eb/27_Start_TDC_CAL +++ b/control/gui/eb/27_Start_TDC_CAL @@ -1,15 +1,18 @@ #!/bin/bash # 100Hz -> 2e6 pulservalue = 0x1E8480 -export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "start the TDC calibration") -if [ $myvar == "256" ]; then exit; fi +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "start the TDC calibration process") +if [ $myvar == "256" ]; then exit; fi + +notifyall.sh "DAQ" " TDC-Calibration process on eventbuilders started." "STARTUP" & + -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " TDC calibration is starting." "EB" & xterm -geometry 80x24 -bg orange -fg black -e bash -c ' - /home/hadaq/trbsoft/hadesdaq/evtbuild/tdc_calib_start.sh - sleep 20 + ssh hadaq@lxhadesdaqp " + /home/hadaq/trbsoft/hadesdaq/evtbuild/tdc_calib_start.sh + " ' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have started the calibration procedure." "EB" & +/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have started TDC-Calibration procedure." "EB" & diff --git a/control/gui/eb/28_Stop_TDC_CAL b/control/gui/eb/28_Stop_TDC_CAL index 2d5bd9f..694a6a7 100755 --- a/control/gui/eb/28_Stop_TDC_CAL +++ b/control/gui/eb/28_Stop_TDC_CAL @@ -1,14 +1,16 @@ #!/bin/bash -export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "stop the TDC calibration") -if [ $myvar == "256" ]; then exit; fi +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "stop the TDC calibration process") +if [ $myvar == "256" ]; then exit; fi -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " TDC calibration is stopping." "EB" & +notifyall.sh "DAQ" " TDC-Calibration process on eventbuilders is going to be stopped." "STARTUP" & - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' - /home/hadaq/trbsoft/hadesdaq/evtbuild/tdc_calib_stop.sh - sleep 30; - ' - -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have stopped the TDC-Calibration procedure." "EB" & +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh hadaq@lxhadesdaqp " + /home/hadaq/trbsoft/hadesdaq/evtbuild/tdc_calib_stop.sh + sleep 30; + " +' + +/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have stopped TDC-Calibration procedure." "EB" & diff --git a/control/gui/eb/29_BEAM_Files b/control/gui/eb/29_BEAM_Files index 22a3f40..05183e6 100755 --- a/control/gui/eb/29_BEAM_Files +++ b/control/gui/eb/29_BEAM_Files @@ -14,19 +14,20 @@ # ' # " -export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "start the TDC calibration") +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "change the EBs to Beam Files") if [ $myvar == "256" ]; then exit; fi -$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " TDC calibration is starting." "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " EBs are going to be changed to write beam files." "EB" & - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' - echo "Setting file prefix be" - /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=be&oninit=10\" - echo set prefix te on BNET master controller - sleep 2 - ' - +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " + echo "Setting file prefix be" + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=be&oninit=10\" + echo set prefix te on BNET master controller + sleep 2 + " +' $HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing beam files." "EB" & diff --git a/control/gui/eb/50_COSMICS_Files b/control/gui/eb/50_COSMICS_Files index 84fb1a8..1e2a6b3 100755 --- a/control/gui/eb/50_COSMICS_Files +++ b/control/gui/eb/50_COSMICS_Files @@ -15,13 +15,18 @@ # " #/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing Cosmics Files" "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "change the EBs to Cosmic Files") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " EBs are going to be changed to write cosmic files." "EB" & + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Setting file prefix co" /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=co&oninit=10\" echo set prefix te on BNET master controller sleep 2 - ' " -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing Cosmics Files." "EB" & +' + $HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing Cosmics Files." "EB" & diff --git a/control/gui/eb/52_TEST_File b/control/gui/eb/52_TEST_File index c8fbd43..5f1dd29 100755 --- a/control/gui/eb/52_TEST_File +++ b/control/gui/eb/52_TEST_File @@ -15,13 +15,18 @@ # # /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing test files" "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' - echo "Setting file prefix te" - /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=te&oninit=10\" - echo set prefix te on BNET master controller - sleep 2 - ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "change the EBs to Test Files") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " EBs are going to be changed to write test files." "EB" & + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " + echo "Setting file prefix te" + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=te&oninit=10\" + echo set prefix te on BNET master controller + sleep 2 " -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing test files." "EB" & +' +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing test files." "EB" & diff --git a/control/gui/eb/55_NO_FILE b/control/gui/eb/55_NO_FILE index ed22b3c..76ac521 100755 --- a/control/gui/eb/55_NO_FILE +++ b/control/gui/eb/55_NO_FILE @@ -13,13 +13,17 @@ # " # /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. NO FILES are being written" "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "change the EBs to \"No-Files\"") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " EBs are going to be changed to write no files." "EB" & + +ssh -X hadaq@lxhadesdaq " xterm -geometry 80x24 -bg orange -fg black -e bash -c ' echo "Setting file prefix --n NO FILES" /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix='--'&oninit=10\" echo set prefix -- on BNET master controller sleep 2 - ' - " -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing NO FILES." "EB" & + ' +" +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are writing NO FILES." "EB" & diff --git a/control/gui/eb/60_Restart_EB b/control/gui/eb/60_Restart_EB index 30de264..6b2b0b2 100755 --- a/control/gui/eb/60_Restart_EB +++ b/control/gui/eb/60_Restart_EB @@ -3,10 +3,10 @@ export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the Eventbuilders") if [ $myvar == "256" ]; then exit; fi -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & xterm -geometry 80x24 -bg orange -fg black -e bash -c ' -ssh -X hadaq@lxhadesdaq " + ssh hadaq@lxhadesdaqp " echo \"Restarting Eventbuilder 1 - 16\" stoptrigger.sh cd ~/trbsoft/hadesdaq/evtbuild/ @@ -15,5 +15,5 @@ ssh -X hadaq@lxhadesdaq " " ' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted with last prefix" "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted with last prefix" "EB" & diff --git a/control/gui/eb/65_____Stop_EB b/control/gui/eb/65_____Stop_EB index 4846ee7..013c3b4 100755 --- a/control/gui/eb/65_____Stop_EB +++ b/control/gui/eb/65_____Stop_EB @@ -2,11 +2,19 @@ # notifyall.sh "DAQ" " Eventbuilders are being stopped." "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "stop the Eventbuilders") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being stopped." "EB" & + + + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Stopping Eventbuilder 1 - 16" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e stop -n 1-16 - ' - " -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been stopped" "EB" & + " +' + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been stopped" "EB" & diff --git a/control/gui/eb/70_Set_1_EB b/control/gui/eb/70_Set_1_EB index 5fcabfe..ae1fec6 100755 --- a/control/gui/eb/70_Set_1_EB +++ b/control/gui/eb/70_Set_1_EB @@ -2,14 +2,21 @@ # notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the EBs with 1 builder node") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being started with only one builder node." "EB" & + + + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Starting Eventbuilders with one BNET builder node" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 1 sleep 2 - ' " +' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 1 BNET builder node" "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 1 BNET builder node" "EB" & diff --git a/control/gui/eb/73_Set_4_EB b/control/gui/eb/73_Set_4_EB index 295b438..bdad11f 100755 --- a/control/gui/eb/73_Set_4_EB +++ b/control/gui/eb/73_Set_4_EB @@ -2,14 +2,19 @@ # notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the EBs with 4 builder nodes") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being started with 4 builder nodes." "EB" & + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Starting Eventbuilders with 4 BNET builder nodes" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 4 sleep 2 - ' " +' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 4 BNET builder nodes" "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 4 BNET builder nodes" "EB" & diff --git a/control/gui/eb/75_Set_8_EB b/control/gui/eb/75_Set_8_EB index 20a8104..8176a47 100755 --- a/control/gui/eb/75_Set_8_EB +++ b/control/gui/eb/75_Set_8_EB @@ -2,14 +2,19 @@ # notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the EBs with 8 builder nodes") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being started with 8 builder nodes." "EB" & + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Starting Eventbuilders with 8 BNET builder nodes" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 8 sleep 2 - ' " +' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 8 BNET builder nodes" "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 8 BNET builder nodes" "EB" & diff --git a/control/gui/eb/76_Set_12_EB b/control/gui/eb/76_Set_12_EB index a8440bf..c3de4cf 100755 --- a/control/gui/eb/76_Set_12_EB +++ b/control/gui/eb/76_Set_12_EB @@ -2,14 +2,20 @@ # notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & -ssh -X hadaq@lxhadesdaq " - xterm -geometry 80x24 -bg orange -fg black -e bash -c ' +export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the EBs with 12 builder nodes") +if [ $myvar == "256" ]; then exit; fi + +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders are being started with 12 builder nodes." "EB" & + + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh -X hadaq@lxhadesdaqp " echo "Starting Eventbuilders with 12 BNET builder nodes" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 12 sleep 2 - ' " +' -/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 12 BNET builder nodes" "EB" & +$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted using 12 BNET builder nodes" "EB" & diff --git a/control/gui/expert/90_MDC_HighVoltageRamp b/control/gui/expert/90_MDC_HighVoltageRamp index e607ec1..94134c3 100755 --- a/control/gui/expert/90_MDC_HighVoltageRamp +++ b/control/gui/expert/90_MDC_HighVoltageRamp @@ -3,5 +3,5 @@ export myvar=$(doyoureallywant.pl "to RAMP DOWN High Voltage!") if [ $myvar == "256" ]; then exit; fi cd /home/hadaq/trbsoft/hadesdaq/control/mdcHVgui/ -/home/hadaq/trbsoft/hadesdaq/control/mdcHVgui/call_programs2.pl +PERLLIB=. $HOME/trbsoft/hadesdaq/control/mdcHVgui/call_programs2.pl diff --git a/control/gui/expert/BLR_Reinit_FPGA b/control/gui/expert/BLR_Reinit_FPGA index 9ea919b..4dda223 100755 --- a/control/gui/expert/BLR_Reinit_FPGA +++ b/control/gui/expert/BLR_Reinit_FPGA @@ -4,11 +4,11 @@ export myvar=$(doyoureallywant.pl "to reprogram the BLR-FPGA \(should not have a if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash -c ' -echo "reinit FPGA" -command_client.pl -e etraxp107 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/rpc/fpga/20110301_rpc_a.stapl" -sleep 1 -echo "reload the BLR settings" -command_client.pl -e etraxp107 -c "spi_trbv2_7 /home/hadaq/cts/mult_thresholds/ctsblr_thresholds" -sleep 4 + echo "reinit FPGA" + command_client.pl -e etraxp107 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/rpc/fpga/20110301_rpc_a.stapl" + sleep 1 + echo "reload the BLR settings" + command_client.pl -e etraxp107 -c "spi_trbv2_7 /home/hadaq/cts/mult_thresholds/ctsblr_thresholds" + sleep 4 ' diff --git a/control/gui/expert/MDC_LV_Turn_On_ALL_Relais b/control/gui/expert/MDC_LV_Turn_On_ALL_Relais index 0859841..77c2b14 100755 --- a/control/gui/expert/MDC_LV_Turn_On_ALL_Relais +++ b/control/gui/expert/MDC_LV_Turn_On_ALL_Relais @@ -1,5 +1,7 @@ #!/bin/bash + xterm -e 'echo "Enabling the MDC-LV-Relais. Wait 4 Seconds..."; sleep 4' & + ~/bin/command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 0'" sleep 2 ~/bin/command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 0'" diff --git a/control/gui/expert/Nxyter_Rescue b/control/gui/expert/Nxyter_Rescue index 96541f2..32b0c46 100755 --- a/control/gui/expert/Nxyter_Rescue +++ b/control/gui/expert/Nxyter_Rescue @@ -1,8 +1,9 @@ #!/bin/bash + xterm -geometry 80x24 -bg orange -fg black -e bash -c " -echo -e '\033[1mNxyter Rescue Script called\n\n' -/home/hadaq/trbsoft/daq/pion/tools/Nxyter_Rescue.pl -sleep 30 -echo -e '\n\n\nDone' -sleep 5 + echo -e '\033[1mNxyter Rescue Script called\n\n' + /home/hadaq/trbsoft/daq/pion/tools/Nxyter_Rescue.pl + sleep 30 + echo -e '\n\n\nDone' + sleep 5 " diff --git a/control/gui/expert/Reload_RICH b/control/gui/expert/Reload_RICH index df1f52f..2f087fb 100755 --- a/control/gui/expert/Reload_RICH +++ b/control/gui/expert/Reload_RICH @@ -2,7 +2,14 @@ export myvar=$(doyoureallywant.pl "to Reload the RICH?") if [ $myvar == "256" ]; then exit; fi +notifyall.sh "DAQ" " RICH FPGAs are going to be reloaded." "STARTUP" & + + export DAQOPSERVER=hadesp31 + trbcmd reload 0xfe51 trbcmd reload 0xfe52 +sleep 2 + +notifyall.sh "DAQ" " RICH FPGAs have been reloaded." "STARTUP" & diff --git a/control/gui/expert/Reload_RPC_Thresholds b/control/gui/expert/Reload_RPC_Thresholds index 65390de..f41d2fd 100755 --- a/control/gui/expert/Reload_RPC_Thresholds +++ b/control/gui/expert/Reload_RPC_Thresholds @@ -1,14 +1,12 @@ #!/bin/bash - -ssh -X lxhadesdaq " xterm -geometry 80x24 -bg orange -fg black -e bash -c ' echo Reloading RPC thresholds - cd /home/hadaq/rpc/utilities/ + cd /home/hadaq/trbsoft/hadesdaq/rpc/utilities/ ./setTriggerBoardSX.sh ./setThresholdsAll.sh sleep 5 ' -" -notifyall.sh "DAQ" " RPC-Thresholds have been reloaded." "RPC" & \ No newline at end of file + +notifyall.sh "DAQ" " RPC-Thresholds have been reloaded." "RPC" & diff --git a/control/gui/expert/Restart_BNET_Control b/control/gui/expert/Restart_BNET_Control index 282f5a3..a19d7ff 100755 --- a/control/gui/expert/Restart_BNET_Control +++ b/control/gui/expert/Restart_BNET_Control @@ -3,7 +3,15 @@ #lxhadeb07 140.181.80.125 # lxhadeb 08 (140.181.80.62 #xterm -geometry 80x24 -bg orange -fg black -e bash -c ' ssh hadaq@140.181.91.154 "/home/hadaq/bin/restart_bnetmaster.sh ; echo closing window in 5 secs...; sleep 5" ' -xterm -geometry 80x24 -bg orange -fg black -e bash -c ' ssh hadaq@140.181.80.125 "/home/hadaq/bin/restart_bnetmaster.sh ; echo closing window in 5 secs...; sleep 5" ' + + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh hadaq@lxhadeb07p " + /home/hadaq/bin/restart_bnetmaster.sh + echo closing window in 5 secs... + sleep 5 + " +' diff --git a/control/gui/expert/Restart_Hmon b/control/gui/expert/Restart_Hmon index e20d5ca..8be126f 100755 --- a/control/gui/expert/Restart_Hmon +++ b/control/gui/expert/Restart_Hmon @@ -8,8 +8,8 @@ xterm -geometry 80x24 -bg orange -fg black -e bash -c ' ./start.sh #1>/dev/null 2>/dev/null echo "Hmon has been restarted" sleep 5 - " - ' + " +' diff --git a/control/gui/expert/Restart_Rawdata_Mon b/control/gui/expert/Restart_Rawdata_Mon index cfc8977..db29d8c 100755 --- a/control/gui/expert/Restart_Rawdata_Mon +++ b/control/gui/expert/Restart_Rawdata_Mon @@ -5,7 +5,14 @@ # below for lxhadeb13, given back to Jochen #xterm -geometry 80x24 -bg orange -fg black -e bash -c ' ssh hadaq@140.181.83.176 "/home/hadaq/bin/restart_rawmon.sh ; echo closing window in 5 secs...; sleep 5" ' # below lxhadeb12: -xterm -geometry 80x24 -bg orange -fg black -e bash -c ' ssh hadaq@140.181.83.168 "/home/hadaq/bin/restart_rawmon.sh ; echo closing window in 5 secs...; sleep 5" ' + +xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + ssh hadaq@lxhadeb12p " + /home/hadaq/bin/restart_rawmon.sh + echo closing window in 5 secs... + sleep 5 + " +' diff --git a/control/gui/expert/Restart_Sequencer b/control/gui/expert/Restart_Sequencer index dd84524..96d9244 100755 --- a/control/gui/expert/Restart_Sequencer +++ b/control/gui/expert/Restart_Sequencer @@ -5,10 +5,10 @@ xterm -geometry 80x24 -bg orange -fg black -e bash -c ' echo Re-starting Sequencers echo -en \"\x18\"| netcat -w 1 localhost 4813 sleep 5 - " - ' - + " +' + # | netcat -w 1 localhost 4813 - \ No newline at end of file + diff --git a/control/gui/expert/Set_ECAL_Thr b/control/gui/expert/Set_ECAL_Thr new file mode 100755 index 0000000..b8ff19b --- /dev/null +++ b/control/gui/expert/Set_ECAL_Thr @@ -0,0 +1,20 @@ +#!/bin/bash +export myvar=$(doyoureallywant.pl "to reset the ECAL thresholds?") +if [ $myvar == "256" ]; then exit; fi + +xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' + ssh hadaq@lxhadesdaqp " + export DAQOPSERVER=hadesp31 + echo \" Connected to lxhadesdaq...\" + echo \" Setting Thresholds...\" + ssh hadesp33 \"pkill -f ./hmon_ecal_recover_dead_slow_channels.pl\" + cd /home/hadaq/trbsoft/hadesdaq/ecal/ecal_thresholds/trb_dirich_threshold/ + . ./setLD + ./HADESthreshscan_v1 -l 0 --loading-file 20190220_155833_std_save.thr -t 0 500 500 + ./HADESthreshscan_v1 -l 0 --loading-file 20190220_155833_std_save.thr -t 0 45 n200 + echo \"Done\" + tmux new-session -d -s \"ecal_recover_dead_channels\" \"cd ~/trbsoft/hadesdaq/hmon/; export PERL5LIB=.; ./hmon_ecal_recover_dead_slow_channels.pl\" + sleep 10 +" +' + diff --git a/control/gui/expert/Set_RICH_HV b/control/gui/expert/Set_RICH_HV index 3da2638..c1cf51b 100755 --- a/control/gui/expert/Set_RICH_HV +++ b/control/gui/expert/Set_RICH_HV @@ -3,19 +3,11 @@ export myvar=$(doyoureallywant.pl "to set the RICH HV and switch it on/off?") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh hadaq@lxhadeb06 " + ssh hadaq@lxhadesdaqp " export DAQOPSERVER=hadesp31 - echo \" Connected to lxhadeb06...\" + echo \" Connected to lxhadesdaq...\" echo \" Setting HV...\" - cd /home/hadaq/JoF/HV_RICH/ - . epics - ./setCrate.sh 1 -# ./setHV.sh gain_alignement_HV_1.5E+06_fifth.dat - ./setHV.sh gain_alignement_HV_1.5E+06.dat -# ./setHV.sh gain_alignement_HV_2.0E+06.dat -# ./setHVon_off.sh gain_alignement_HV_1.5E+06_fifth.dat 2 - ./setHVon_off.sh gain_alignement_HV_1.5E+06.dat 2 -# ./setHVon_off.sh gain_alignement_HV_2.0E+06.dat 2 + /home/hadaq/trbsoft/hadesdaq/utils/RICH_HV_Switch.sh /home/hadaq/hadesdaq/richhv/rich700/generated_HV_sets/gain_alignement_HV_2.0E+06.dat echo \"Done\" sleep 10 " diff --git a/control/gui/expert/Set_RICH_Thr b/control/gui/expert/Set_RICH_Thr index f5b2461..274d027 100755 --- a/control/gui/expert/Set_RICH_Thr +++ b/control/gui/expert/Set_RICH_Thr @@ -3,15 +3,11 @@ export myvar=$(doyoureallywant.pl "to reset the RICH thresholds?") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh hadaq@lxhadeb06 " + ssh hadaq@lxhadesdaqp " export DAQOPSERVER=hadesp31 - echo \" Connected to lxhadeb06...\" + echo \" Connected to lxhadesdaq...\" echo \" Setting Thresholds...\" - cd /home/hadaq/trbsoft/daqtools/thresholds/threshold_wuppertal/trb_dirich_threshold/ - source ./setLD - #./HADESthreshscan_v1 - #./HADESthreshscan_v1 --loading-file /home/hadaq/trbsoft/daqtools/thresholds/threshold_wuppertal/trb_dirich_threshold/standard_baselines.thr -l 0 -n 0 5 - ./HADESthreshscan_v1 --loading-file /home/hadaq/trbsoft/daqtools/thresholds/threshold_wuppertal/trb_dirich_threshold/threshold_files/standard_baselines.thr -l 0 -t 0 50 + /home/hadaq/trbsoft/hadesdaq/utils/RICH_Thr_Call.sh --loading-file /home/hadaq/hadesdaq/rich/trb_dirich_threshold/threshold_files/standard_baselines.thr -l 0 -t 0 70 echo \"Done\" sleep 10 " diff --git a/control/gui/expert/Start_Speech_Output b/control/gui/expert/Start_Speech_Output index 9f8f29f..8dd0f8a 100755 --- a/control/gui/expert/Start_Speech_Output +++ b/control/gui/expert/Start_Speech_Output @@ -1,5 +1,5 @@ #!/bin/bash -ssh hadaq@hades33 "killall -USR2 speakdaemon.pl" +ssh hadaq@hadesp50 "killall -USR2 speakdaemon.pl" diff --git a/control/gui/expert/Stop_Speech_Output b/control/gui/expert/Stop_Speech_Output index b03ebef..6dd4231 100755 --- a/control/gui/expert/Stop_Speech_Output +++ b/control/gui/expert/Stop_Speech_Output @@ -1,6 +1,6 @@ #!/bin/bash #ssh hadaq@hades33 "killall -USR1 speakdaemon.pl" -ssh hadaq@hades33 "killall -USR1 speakdaemon.pl; pkill -f espeak" +ssh hadaq@hadesp50 "killall -USR1 speakdaemon.pl; pkill -f espeak" diff --git a/control/gui/monitor/10_CTS_Mon b/control/gui/monitor/10_CTS_Mon index 7c377ad..6214a04 100755 --- a/control/gui/monitor/10_CTS_Mon +++ b/control/gui/monitor/10_CTS_Mon @@ -8,6 +8,7 @@ export DAQOPSERVER=hadesp31 cd /home/hadaq/trbsoft/hadesdaq/control/ctsmon perl ./mon_cts.pl sleep 1 + exit diff --git a/control/gui/monitor/20_Hmon b/control/gui/monitor/20_Hmon index faccd51..65a73f9 100755 --- a/control/gui/monitor/20_Hmon +++ b/control/gui/monitor/20_Hmon @@ -1,4 +1,3 @@ #!/bin/bash -#ssh -X hades30 " firefox -p Hmon http://hadesdaq02/mon" -MOZ_NO_REMOTE=1 firefox -p Hmon http://hades33/mon +MOZ_NO_REMOTE=1 firefox -P Hmon_forDaqOnly http://hades33/mon diff --git a/control/gui/monitor/40_BNET b/control/gui/monitor/40_BNET index 1a03ab6..4cddd81 100755 --- a/control/gui/monitor/40_BNET +++ b/control/gui/monitor/40_BNET @@ -1,3 +1,3 @@ #!/bin/bash -MOZ_NO_REMOTE=1 firefox -P Eventbuilding http://hades33/eb +MOZ_NO_REMOTE=1 firefox -P Eventbuilding http://hades33/eb/?monitoring=2000 diff --git a/control/gui/monitor/80_Daq_VNC b/control/gui/monitor/80_Daq_VNC index 99f2329..dcd1d3d 100755 --- a/control/gui/monitor/80_Daq_VNC +++ b/control/gui/monitor/80_Daq_VNC @@ -1,3 +1,3 @@ #!/bin/bash -vncviewer -passwd ~/.vnc/passwd hades30:1 & +vncviewer --shared -passwd ~/.vnc/passwd hades30:1 & diff --git a/control/gui/monitor/91_Hmon_Snaphot b/control/gui/monitor/91_Hmon_Snaphot new file mode 100755 index 0000000..b09aa2d --- /dev/null +++ b/control/gui/monitor/91_Hmon_Snaphot @@ -0,0 +1,7 @@ +#!/bin/bash + +#ssh -X -l scs lxhadeb06 '. /home/scs/.profile; medm -x hades.adl' +xterm -geometry 80x24 -bg green -fg black -e bash -c " + ssh -X hadaq@hades33 'cd /home/hadaq/trbsoft/daq/hmon; PERL5LIB=. perl ./permanent/hmon_archiver.pl once' + sleep 1000 + "; diff --git a/control/gui/power/00_Powercycle_all b/control/gui/power/00_Powercycle_all index 5ba8ab5..a7ce529 100755 --- a/control/gui/power/00_Powercycle_all +++ b/control/gui/power/00_Powercycle_all @@ -4,16 +4,17 @@ export myvar=$(doyoureallywant.pl "to powercycle RICH,ECAL LV?") if [ $myvar == "256" ]; then exit; fi xterm -e bash --login -c ' - ssh hadaq@lxhadesdaq " - source /home/hadaq/.bash_profile + ssh hadaq@lxhadesdaqp " + source /home/hadaq/.bash_profile echo \'Starting power cycle...\' cd /home/hadaq/hadesdaq/utils; export PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl - ./RICH_Powercycle.pl; + ./RICH_Powercycle.pl; #./ECAL_5V_Entrance_Powercycle.sh; #./ECAL_LV5_Powercycle; #./HUB_Powercycle.pl; - + ./ECAL_Powercycle.pl + ./MdcTofCentral_Powercycle.pl sleep 5 " diff --git a/control/gui/power/10_RICH_Powercycle b/control/gui/power/10_RICH_Powercycle index 7d4fd19..54859fa 100755 --- a/control/gui/power/10_RICH_Powercycle +++ b/control/gui/power/10_RICH_Powercycle @@ -4,11 +4,14 @@ export myvar=$(doyoureallywant.pl "to powercycle the RICH LV?") if [ $myvar == "256" ]; then exit; fi xterm -e bash --login -c ' - ssh hadaq@lxhadesdaq " + ssh hadaq@lxhadesdaqp " source /home/hadaq/.bash_profile +# export DAQOPSERVER=hadesp31 echo \"Starting a RICH power cycle...\" cd /home/hadaq/hadesdaq/utils; PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl ./RICH_Powercycle.pl; sleep 5 + # /home/hadaq/trbsoft/hadesdaq/utils/RICH_Thr_Call.sh --loading-file /home/hadaq/hadesdaq/rich/trb_dirich_threshold/threshold_files/standard_baselines.thr -l 0 -t 0 50 + # sleep 5 " ' diff --git a/control/gui/power/20_ECAL_RPC_48V_Powercycle b/control/gui/power/20_ECAL_RPC_48V_Powercycle new file mode 100755 index 0000000..69e8e17 --- /dev/null +++ b/control/gui/power/20_ECAL_RPC_48V_Powercycle @@ -0,0 +1,14 @@ +#!/bin/bash + +export myvar=$(doyoureallywant.pl "to powercycle the RPC/ECAL LV?") +if [ $myvar == "256" ]; then exit; fi + +xterm -e bash --login -c ' + ssh hadaq@lxhadesdaqp " + source /home/hadaq/.bash_profile + 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; + sleep 5 + " +' diff --git a/control/gui/power/21_ECAL_Padiwa_Powercycle b/control/gui/power/21_ECAL_Padiwa_Powercycle new file mode 100755 index 0000000..f696d16 --- /dev/null +++ b/control/gui/power/21_ECAL_Padiwa_Powercycle @@ -0,0 +1,9 @@ +#!/bin/bash + +export myvar=$(doyoureallywant.pl "to make a ECAL Padiwa 5V powercycle? There will be no further warnings!") +if [ $myvar == "256" ]; then exit; fi + +xterm -e " +cd ../../../../hadesdaq/utils; +./ECAL_LV5_Powercycle.sh; +" diff --git a/control/gui/power/22_ECAL_Rack_Powercycle b/control/gui/power/22_ECAL_Rack_Powercycle new file mode 100755 index 0000000..09a4dcf --- /dev/null +++ b/control/gui/power/22_ECAL_Rack_Powercycle @@ -0,0 +1,9 @@ +#!/bin/bash + +export myvar=$(doyoureallywant.pl "to make a ECAL 5V Entrance Rack powercycle? There will be no further warnings!") +if [ $myvar == "256" ]; then exit; fi + +xterm -e " +cd ../../../../hadesdaq/utils; +./ECAL_5V_Entrance_Powercycle.sh +" diff --git a/control/gui/power/40_Start_Powercycle b/control/gui/power/40_Start_Powercycle index e49b61d..81ea82c 100755 --- a/control/gui/power/40_Start_Powercycle +++ b/control/gui/power/40_Start_Powercycle @@ -1,6 +1,6 @@ #!/bin/bash -export myvar=$(doyoureallywant.pl "to powercycle the RICH Fans?") +export myvar=$(doyoureallywant.pl "to powercycle the Start detector?") if [ $myvar == "256" ]; then exit; fi xterm -e " diff --git a/control/gui/power/50_MdcTofCentral_Powercycle b/control/gui/power/50_MdcTofCentral_Powercycle new file mode 100755 index 0000000..b658928 --- /dev/null +++ b/control/gui/power/50_MdcTofCentral_Powercycle @@ -0,0 +1,14 @@ +#!/bin/bash + +export myvar=$(doyoureallywant.pl "to powercycle the MDC/TOF/Central LV?") +if [ $myvar == "256" ]; then exit; fi + +xterm -e bash --login -c ' + ssh hadaq@lxhadesdaqp " + source /home/hadaq/.bash_profile + 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; + sleep 5 + " +' diff --git a/control/gui/power/90_HUBS_Powercycle b/control/gui/power/90_HUBS_Powercycle index 59b40e5..dabc474 100755 --- a/control/gui/power/90_HUBS_Powercycle +++ b/control/gui/power/90_HUBS_Powercycle @@ -1,11 +1,14 @@ #!/bin/bash - +#JAM 5-mar-2019 7:56 added missing perrlib environment. cannot test this during data taking, still to do export myvar=$(doyoureallywant.pl "to powercycle the Hubs and Rich Sensor Board?") if [ $myvar == "256" ]; then exit; fi -xterm -e " -echo 'Starting power cycle...' -cd ../../../../hadesdaq/utils; -./HUB_Powercycle.pl; -sleep 5 +xterm -e bash --login -c ' + ssh hadaq@lxhadesdaqp " + source /home/hadaq/.bash_profile + echo \"Starting a HUB-Power-Cycle...\" + cd /home/hadaq/hadesdaq/utils; + PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl ./HUB_Powercycle.pl; + sleep 5 " +' diff --git a/control/gui/power/MDC_LV_Powercycle b/control/gui/power/MDC_LV_Powercycle index ced25ed..e2cb101 100755 --- a/control/gui/power/MDC_LV_Powercycle +++ b/control/gui/power/MDC_LV_Powercycle @@ -3,6 +3,7 @@ export myvar=$(doyoureallywant.pl "to make a MDC powercycle? There will be no further warnings!") if [ $myvar == "256" ]; then exit; fi + cd /home/hadaq/trbsoft/hadesdaq/control/mdcLVgui/ -/home/hadaq/trbsoft/hadesdaq/control/mdcLVgui/call_programs2.pl +PERL5LIB=. /home/hadaq/trbsoft/hadesdaq/control/mdcLVgui/call_programs2.pl diff --git a/control/gui/power/RPC_special_PwrCyc b/control/gui/power/RPC_special_PwrCyc index a2a4c91..a9790f6 100755 --- a/control/gui/power/RPC_special_PwrCyc +++ b/control/gui/power/RPC_special_PwrCyc @@ -1,13 +1,15 @@ #!/bin/bash -xterm -e " + + export myvar=$(doyoureallywant.pl 'to do a power cycle on RPC') if [ $myvar == '256' ]; then exit; fi -echo 'Sending power cycle request' -wget -O /dev/null --http-password kaese --http-user admin -d http://haepcp15/RESET.CGI?a=0\&bi=5\&t=0\&b=1 -sleep 5 -echo 'waiting a minute until boards are rebooted' -sleep 60 -echo 'Done' -sleep 5 +xterm -e " + echo 'Sending power cycle request' + wget -O /dev/null --http-password kaese --http-user admin -d http://haepcp15/RESET.CGI?a=0\&bi=5\&t=0\&b=1 + sleep 5 + echo 'waiting a minute until boards are rebooted' + sleep 60 + echo 'Done' + sleep 10 " diff --git a/control/mdcHVgui/Buttons2.pm b/control/mdcHVgui/Buttons2.pm index 1b78d68..6abae06 100755 --- a/control/mdcHVgui/Buttons2.pm +++ b/control/mdcHVgui/Buttons2.pm @@ -381,7 +381,8 @@ sub make_subroutine { # make subroutines #sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); } - my $str = qq|sub slot| . $i . qq|Pressed { my \$c = this->{self}->{ra_buttons}->[$i]; \$c = "cd $dir; ./\$c &"; print "will execute: \$c\n"; system(\$c); }|; + my $str = qq|sub slot| . $i . qq|Pressed { my \$s = this->{self}->{ra_buttons}->[$i]; my \$str="Powercycle in \$dir / \$s"; my \$c = "cd \$dir; control_gui_logger.sh MDC_HV \$str; ./\$s &"; print "going to execute: \$c\n"; system(\$c); }|; + # my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|; #system(\$c); }|; #print "sub: $str\n"; diff --git a/control/mdcHVgui/S1/Plane_1 b/control/mdcHVgui/S1/Plane_1 index f9933bf..2b76471 100755 --- a/control/mdcHVgui/S1/Plane_1 +++ b/control/mdcHVgui/S1/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 1 sleep 5 diff --git a/control/mdcHVgui/S1/Plane_2 b/control/mdcHVgui/S1/Plane_2 index 987f338..49f2f01 100755 --- a/control/mdcHVgui/S1/Plane_2 +++ b/control/mdcHVgui/S1/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 1 sleep 5 diff --git a/control/mdcHVgui/S1/Plane_3 b/control/mdcHVgui/S1/Plane_3 index 4b87a31..a9357dc 100755 --- a/control/mdcHVgui/S1/Plane_3 +++ b/control/mdcHVgui/S1/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 1 sleep 5 diff --git a/control/mdcHVgui/S1/Plane_4 b/control/mdcHVgui/S1/Plane_4 index ff61089..7531a71 100755 --- a/control/mdcHVgui/S1/Plane_4 +++ b/control/mdcHVgui/S1/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 1 sleep 5 diff --git a/control/mdcHVgui/S2/Plane_1 b/control/mdcHVgui/S2/Plane_1 index fba21e0..f5d566c 100755 --- a/control/mdcHVgui/S2/Plane_1 +++ b/control/mdcHVgui/S2/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 2 sleep 5 diff --git a/control/mdcHVgui/S2/Plane_2 b/control/mdcHVgui/S2/Plane_2 index b9a8d22..fe623f6 100755 --- a/control/mdcHVgui/S2/Plane_2 +++ b/control/mdcHVgui/S2/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 2 sleep 5 diff --git a/control/mdcHVgui/S2/Plane_3 b/control/mdcHVgui/S2/Plane_3 index 9b68358..1cd3416 100755 --- a/control/mdcHVgui/S2/Plane_3 +++ b/control/mdcHVgui/S2/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 2 sleep 5 diff --git a/control/mdcHVgui/S2/Plane_4 b/control/mdcHVgui/S2/Plane_4 index b6c1cbd..885f163 100755 --- a/control/mdcHVgui/S2/Plane_4 +++ b/control/mdcHVgui/S2/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 2 sleep 5 diff --git a/control/mdcHVgui/S3/Plane_1 b/control/mdcHVgui/S3/Plane_1 index d3a8876..3a8e15d 100755 --- a/control/mdcHVgui/S3/Plane_1 +++ b/control/mdcHVgui/S3/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 3 sleep 5 diff --git a/control/mdcHVgui/S3/Plane_2 b/control/mdcHVgui/S3/Plane_2 index b282f91..3f66eb4 100755 --- a/control/mdcHVgui/S3/Plane_2 +++ b/control/mdcHVgui/S3/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 3 sleep 5 diff --git a/control/mdcHVgui/S3/Plane_3 b/control/mdcHVgui/S3/Plane_3 index f7b96ef..8b371fa 100755 --- a/control/mdcHVgui/S3/Plane_3 +++ b/control/mdcHVgui/S3/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 3 sleep 5 diff --git a/control/mdcHVgui/S3/Plane_4 b/control/mdcHVgui/S3/Plane_4 index 2148e5e..7263a0c 100755 --- a/control/mdcHVgui/S3/Plane_4 +++ b/control/mdcHVgui/S3/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 3 sleep 5 diff --git a/control/mdcHVgui/S4/Plane_1 b/control/mdcHVgui/S4/Plane_1 index 1a89d0f..ceec487 100755 --- a/control/mdcHVgui/S4/Plane_1 +++ b/control/mdcHVgui/S4/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 4 sleep 5 diff --git a/control/mdcHVgui/S4/Plane_2 b/control/mdcHVgui/S4/Plane_2 index dd7e0a4..bee78d6 100755 --- a/control/mdcHVgui/S4/Plane_2 +++ b/control/mdcHVgui/S4/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 4 sleep 5 diff --git a/control/mdcHVgui/S4/Plane_3 b/control/mdcHVgui/S4/Plane_3 index c71eef6..1016b03 100755 --- a/control/mdcHVgui/S4/Plane_3 +++ b/control/mdcHVgui/S4/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 4 sleep 5 diff --git a/control/mdcHVgui/S4/Plane_4 b/control/mdcHVgui/S4/Plane_4 index ff91576..203c019 100755 --- a/control/mdcHVgui/S4/Plane_4 +++ b/control/mdcHVgui/S4/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 4 sleep 5 diff --git a/control/mdcHVgui/S5/Plane_1 b/control/mdcHVgui/S5/Plane_1 index c11bd40..507701d 100755 --- a/control/mdcHVgui/S5/Plane_1 +++ b/control/mdcHVgui/S5/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 5 sleep 5 diff --git a/control/mdcHVgui/S5/Plane_2 b/control/mdcHVgui/S5/Plane_2 index 34caeb5..f30b970 100755 --- a/control/mdcHVgui/S5/Plane_2 +++ b/control/mdcHVgui/S5/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 5 sleep 5 diff --git a/control/mdcHVgui/S5/Plane_3 b/control/mdcHVgui/S5/Plane_3 index 195d1c5..3984bea 100755 --- a/control/mdcHVgui/S5/Plane_3 +++ b/control/mdcHVgui/S5/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 5 sleep 5 diff --git a/control/mdcHVgui/S5/Plane_4 b/control/mdcHVgui/S5/Plane_4 index 6afbb24..87e0cc2 100755 --- a/control/mdcHVgui/S5/Plane_4 +++ b/control/mdcHVgui/S5/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 5 sleep 5 diff --git a/control/mdcHVgui/S6/Plane_1 b/control/mdcHVgui/S6/Plane_1 index f444d4c..368cb1e 100755 --- a/control/mdcHVgui/S6/Plane_1 +++ b/control/mdcHVgui/S6/Plane_1 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 1 6 sleep 5 diff --git a/control/mdcHVgui/S6/Plane_2 b/control/mdcHVgui/S6/Plane_2 index e95cc9e..ed31ae3 100755 --- a/control/mdcHVgui/S6/Plane_2 +++ b/control/mdcHVgui/S6/Plane_2 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 2 6 sleep 5 diff --git a/control/mdcHVgui/S6/Plane_3 b/control/mdcHVgui/S6/Plane_3 index 4873ff0..f4fa287 100755 --- a/control/mdcHVgui/S6/Plane_3 +++ b/control/mdcHVgui/S6/Plane_3 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 3 6 sleep 5 diff --git a/control/mdcHVgui/S6/Plane_4 b/control/mdcHVgui/S6/Plane_4 index a1d3f6b..7b7d825 100755 --- a/control/mdcHVgui/S6/Plane_4 +++ b/control/mdcHVgui/S6/Plane_4 @@ -4,9 +4,9 @@ export myvar=$(doyoureallywant.pl "to do a HV ramping cycle") if [ $myvar == "256" ]; then exit; fi xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' - ssh -X hadaq@hadesdaq02 " + ssh -X hadaq@lxhadesdaqp " source /home/hadaq/.bashrc - echo \" Connected to hadesdaq02...\" + echo \" Connected to lxhadesdaqp...\" cd /home/hadaq/trbsoft/mdc/ ./mdc_ramping.pl 4 6 sleep 5 diff --git a/control/mdcLVgui/Buttons2.pm b/control/mdcLVgui/Buttons2.pm index 9bd65f0..9df0ccb 100755 --- a/control/mdcLVgui/Buttons2.pm +++ b/control/mdcLVgui/Buttons2.pm @@ -380,8 +380,9 @@ sub make_subroutine { (my $i, my $dir) = @_; # make subroutines #sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); } - - my $str = qq|sub slot| . $i . qq|Pressed { my \$c = this->{self}->{ra_buttons}->[$i]; \$c = "cd $dir; ./\$c &"; print "will execute: \$c\n"; system('logger -p local1.info -t DAQ MdcLV \\ Powercycle in '.$dir.'/'.this->{self}->{ra_buttons}->[$i]); system(\$c); }|; + + my $str = qq|sub slot| . $i . qq|Pressed { my \$s = this->{self}->{ra_buttons}->[$i]; my \$str="Powercycle in \$dir / \$s"; my \$c = "cd \$dir; control_gui_logger.sh MDC_LV \$str; ./\$s &"; print "going to execute: \$c\n"; system(\$c); }|; + # my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|; #system(\$c); }|; #print "sub: $str\n"; diff --git a/control/mdcLVgui/S0/200x b/control/mdcLVgui/S0/200x index 5804121..249e643 100755 --- a/control/mdcLVgui/S0/200x +++ b/control/mdcLVgui/S0/200x @@ -1,4 +1,4 @@ #!/bin/bash command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 1'" sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'" \ No newline at end of file +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'" diff --git a/control/qa/Buttons2.pm b/control/qa/Buttons2.pm index e56e84f..7773799 100644 --- a/control/qa/Buttons2.pm +++ b/control/qa/Buttons2.pm @@ -324,7 +324,7 @@ sub make_subroutine { # make subroutines #sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); } - my $str = qq|sub slot| . $i . qq|Pressed { my \$c = this->{self}->{ra_buttons}->[$i]; \$c = "cd $dir; ./\$c &"; print "will execute: \$c\n"; system('logger -p local1.info -t DAQ MdcLV \\ Powercycle in '.$dir.'/'.this->{self}->{ra_buttons}->[$i]); system(\$c); }|; + my $str = qq|sub slot| . $i . qq|Pressed { my \$s = this->{self}->{ra_buttons}->[$i]; my \$str="\$dir/\$s"; my \$c = "cd \$dir; control_gui_logger.sh QA \$str; ./\$s &"; print "will execute: \$c\n"; system(\$c); }|; # my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|; #system(\$c); }|; #print "sub: $str\n"; diff --git a/control/qa/QA/10_Start_OnlineQA.png b/control/qa/QA/10_Start_OnlineQA.png new file mode 100644 index 0000000..7b3568d Binary files /dev/null and b/control/qa/QA/10_Start_OnlineQA.png differ diff --git a/control/qa/QA/11_Stop_OnlineQA b/control/qa/QA/11_Stop_OnlineQA new file mode 100755 index 0000000..d0aa708 --- /dev/null +++ b/control/qa/QA/11_Stop_OnlineQA @@ -0,0 +1,3 @@ +#!/bin/bash + +/home/hades-qa/bin/stop_OLM.sh diff --git a/control/qa/QA/11_Stop_OnlineQA.png b/control/qa/QA/11_Stop_OnlineQA.png new file mode 100644 index 0000000..cd4fd05 Binary files /dev/null and b/control/qa/QA/11_Stop_OnlineQA.png differ diff --git a/control/qa/QA/15_Vertex_Reconstruction.png b/control/qa/QA/15_Vertex_Reconstruction.png new file mode 100644 index 0000000..ea34349 Binary files /dev/null and b/control/qa/QA/15_Vertex_Reconstruction.png differ diff --git a/control/qa/QA/screenshot_QHF_1.png b/control/qa/QA/screenshot_QHF_1.png new file mode 100644 index 0000000..2fb3c91 Binary files /dev/null and b/control/qa/QA/screenshot_QHF_1.png differ diff --git a/control/qa/call_programs_local.sh b/control/qa/call_programs_local.sh index 88dd62c..800f03a 100755 --- a/control/qa/call_programs_local.sh +++ b/control/qa/call_programs_local.sh @@ -1,7 +1,7 @@ #!/bin/bash cd /home/hadaq/trbsoft/hadesdaq/control/qa/ -./call_programs_wrapper.sh -geometry -0-0 & +./call_programs_wrapper.sh -geometry 300x300-0-0 & #/home/hadaq/trbsoft/hadesdaq/control/gui/call_programs_wrapper.sh -geometry -0-0 & #cd /home/hadaq/trbsoft/daq/control/gui/ diff --git a/control/qa/call_programs_wrapper.sh b/control/qa/call_programs_wrapper.sh index fe7b756..b10ce53 100755 --- a/control/qa/call_programs_wrapper.sh +++ b/control/qa/call_programs_wrapper.sh @@ -2,4 +2,4 @@ #ssh -X lxhadeb06 ". .bashrc; export PATH=\$PATH:\$HOME/bin; echo $PATH; cd /home/hadaq/trbsoft/hadesdaq/control/gui/; ./call_programs2.pl -geometry -0-0" cd /home/hadaq/trbsoft/daq/control/qa/ -/home/hadaq/trbsoft/daq/control/qa/call_programs2.pl -geometry -0-0 +/home/hadaq/trbsoft/daq/control/qa/call_programs2.pl $ARGV diff --git a/utils/ECAL_5V_Entrance_Powercycle.sh b/utils/ECAL_5V_Entrance_Powercycle.sh new file mode 100755 index 0000000..efdf2d1 --- /dev/null +++ b/utils/ECAL_5V_Entrance_Powercycle.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo 'Sending power cycle request' +echo -n 'current status: ' +echo 'OUTPUT:STATE? CH1' | ssh odroid6 'cat > /dev/FTDI_USB_Serial_Converter_FTGZLM92; timeout 2 cat /dev/FTDI_USB_Serial_Converter_FTGZLM92' +echo 'switching off...' +echo 'OUTPUT:STATE CH1,OFF' | ssh odroid6 'cat > /dev/FTDI_USB_Serial_Converter_FTGZLM92' +sleep 2 +echo -n 'current status: ' +echo 'OUTPUT:STATE? CH1' | ssh odroid6 'cat > /dev/FTDI_USB_Serial_Converter_FTGZLM92; timeout 2 cat /dev/FTDI_USB_Serial_Converter_FTGZLM92' + +echo 'switching on...' +echo 'OUTPUT:STATE CH1,ON' | ssh odroid6 'cat > /dev/FTDI_USB_Serial_Converter_FTGZLM92' +echo -n 'current status: ' +echo 'OUTPUT:STATE? CH1' | ssh odroid6 'cat > /dev/FTDI_USB_Serial_Converter_FTGZLM92; timeout 2 cat /dev/FTDI_USB_Serial_Converter_FTGZLM92' + +sleep 5 diff --git a/utils/ECAL_LV5_Powercycle.sh b/utils/ECAL_LV5_Powercycle.sh new file mode 100755 index 0000000..1279177 --- /dev/null +++ b/utils/ECAL_LV5_Powercycle.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +echo 'Sending power cycle request' +echo -n 'current status: ' +echo 'OUTPUT:GENERAL ?' | ssh odroid5 'cat > /dev/HAMEG_HAMEG_HO720_100030505473; timeout 1 cat /dev/HAMEG_HAMEG_HO720_100030505473' +echo 'switching off...' +echo 'OUTPUT:GENERAL OFF' | ssh odroid4 'cat > /dev/HAMEG_HAMEG_HO720_100030271763' +echo 'OUTPUT:GENERAL OFF' | ssh odroid5 'cat > /dev/HAMEG_HAMEG_HO720_100030505473' +echo 'OUTPUT:GENERAL OFF' | ssh odroid6 'cat > /dev/HAMEG_HAMEG_HO720_100030805647' +sleep 2 +echo -n 'current status: ' +echo 'OUTPUT:GENERAL ?' | ssh odroid5 'cat > /dev/HAMEG_HAMEG_HO720_100030505473; timeout 1 cat /dev/HAMEG_HAMEG_HO720_100030505473' + +echo 'switching on...' +echo 'OUTPUT:GENERAL ON' | ssh odroid4 'cat > /dev/HAMEG_HAMEG_HO720_100030271763' +echo 'OUTPUT:GENERAL ON' | ssh odroid5 'cat > /dev/HAMEG_HAMEG_HO720_100030505473' +echo 'OUTPUT:GENERAL ON' | ssh odroid6 'cat > /dev/HAMEG_HAMEG_HO720_100030805647' +echo -n 'current status: ' +echo 'OUTPUT:GENERAL ?' | ssh odroid5 'cat > /dev/HAMEG_HAMEG_HO720_100030505473; timeout 1 cat /dev/HAMEG_HAMEG_HO720_100030505473' + +sleep 5 diff --git a/utils/ECAL_Powercycle.pl b/utils/ECAL_Powercycle.pl new file mode 100755 index 0000000..6ad2d1d --- /dev/null +++ b/utils/ECAL_Powercycle.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +use lib "../nettools/"; +use Perl2Epics; +use Data::Dumper; + +print "Connect..\n"; +my $s = "HAD:RPC:PS:11:SETONOFF"; +Perl2Epics::Connect("ECALLV_Power",$s); + +Perl2Epics::Put("ECALLV_Power",1); #Off +my $data = Perl2Epics::GetAll(); +print $data->{"ECALLV_Power"}->{val}."\n"; +sleep 8; +Perl2Epics::Put("ECALLV_Power",0); #On diff --git a/utils/HMP_Powersupply.pl b/utils/HMP_Powersupply.pl new file mode 100755 index 0000000..94615ed --- /dev/null +++ b/utils/HMP_Powersupply.pl @@ -0,0 +1,116 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +# use Device::SerialPort; +use IO::Socket; +use IO::Handle; +use feature 'state'; +use URI::Escape; +use Time::HiRes qw( usleep); +use POSIX qw/floor ceil strftime/; +use Fcntl; +use Storable qw(lock_store lock_retrieve); +use JSON::XS; + + +my @new_command = split('&',$ARGV[0]); +my $ser_dev = "IP10.0.0.2";#shift(@new_command); +my $ser_type = "HMP";#shift(@new_command); +my $ser_speed = "5025";#shift(@new_command); #speed or port number + +if (!defined $ser_dev || !defined $ser_type || !defined $ser_speed) { + exit 0; + } + + +my $port; +my $isIP = 0; +my $cnt = 0; +my $isRemote = undef; + +## Load stored values +#my $file = $ser_dev; +# $file =~ s/\W//g; +# $file = "/dev/shm/pwrsup-".$file.".dump"; +#my $db; +# if(-e $file && -r $file) { +# $db = lock_retrieve($file); +# } + + +if($ser_dev =~ /^IP(.*)/) { + $ser_dev = $1; + $isIP = 1; + } + +print HMP_ethernet() if (($ser_type eq "HMP" or $ser_type eq "HMC") && $isIP == 1); + + + +sub HMP_ethernet { + print strftime("%H:%M:%S &", localtime()); + my $data; + my $JSONcnt=0; + my $port = IO::Socket::INET->new(PeerAddr => $ser_dev, PeerPort => $ser_speed, Proto => "tcp", Type => +SOCK_STREAM, Timeout => 1) + or (print("Device not found") && return); + + #$data->{time} = strftime("%H:%M:%S", localtime()); + while ( my $command = shift(@new_command) ) { + $command = uri_unescape($command); + #print $command."\n"; + my $x = getValue($port,$command,$cnt++); + $x =~ s/\&//; + print $x."&" if $command =~ /\?/; + } + return; +} + + +sub serial_rw { + my ($fh, $command,$forceread) = @_; + my $x = ""; + if ($ser_type eq 'PSP') {$command .= "\r";} else {$command .= "\n";} + print $fh "$command"; +# print $command; + if($ser_type eq 'PWRSW' || $forceread || $command =~ /\?/) { + for my $i (0..500) { + $x .= <$fh>; + if($x && ($x =~ /\n/ || $x =~ /\r/) ) { + chomp $x; + last; + } + usleep(1000); + } + } + else { + usleep(1000); + } + return $x; + } + + +sub getValue { + my ($fh,$cmd,$cnt,$forceread) = @_; +# if (0 && defined $db->{$cmd.$cnt}{tim} && $db->{$cmd.$cnt}{tim} > time()-10) { +# return $db->{$cmd.$cnt}{val}; +# } +# else { + my $val = serial_rw($fh,$cmd,$forceread); + # addDB($cmd.$cnt,$val); + return $val; + # } + } + + +#sub addDB { +# my ($cmd,$val) = @_; +# $db->{$cmd}{val} = $val; +# $db->{$cmd}{tim} = time(); +# } + +#lock_store($db,$file); +print "\n"; + +exit 1; diff --git a/utils/HUB_Powercycle.pl b/utils/HUB_Powercycle.pl new file mode 100755 index 0000000..dcbacb1 --- /dev/null +++ b/utils/HUB_Powercycle.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +use lib "../nettools/"; +use Perl2Epics; +use Data::Dumper; + +print "Connect..\n"; +my $s = "HAD:RICH:PS:16:SETONOFF"; +Perl2Epics::Connect("RICHLV_PowerOnOff",$s); + + +Perl2Epics::Put("RICHLV_PowerOnOff",1); +Perl2Epics::GetAll(); + +sleep 8; +Perl2Epics::Put("RICHLV_PowerOnOff",0); diff --git a/utils/MdcTofCentral_Powercycle.pl b/utils/MdcTofCentral_Powercycle.pl new file mode 100755 index 0000000..d965ac2 --- /dev/null +++ b/utils/MdcTofCentral_Powercycle.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +use lib "../nettools/"; +use Perl2Epics; +use Data::Dumper; + +print "Connect..\n"; +my $s = "HAD:RPC:PS:03:SETONOFF"; +Perl2Epics::Connect("MDCTOFCENTRLV_Power",$s); + +Perl2Epics::Put("MDCTOFCENTRLV_Power",1); +my $data = Perl2Epics::GetAll(); +print $data->{"MDCTOFCENTRLV_Power"}->{val}."\n"; +sleep 8; +Perl2Epics::Put("MDCTOFCENTRLV_Power",0); diff --git a/utils/RICH_Fan_Powercycle.sh b/utils/RICH_Fan_Powercycle.sh new file mode 100755 index 0000000..9c5a816 --- /dev/null +++ b/utils/RICH_Fan_Powercycle.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +odroid="odroid1"; +devicename="/dev/HAMEG_HAMEG_HO720_100030280929"; + +echo "Sending power cycle request to $odroid @ $devicename" + +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo 'Switching Off...' +echo 'OUTPUT:GENERAL OFF' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo 'Switching ON...' +echo 'OUTPUT:GENERAL ON' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" diff --git a/utils/RICH_HV_Switch.sh b/utils/RICH_HV_Switch.sh new file mode 100755 index 0000000..a6b7b81 --- /dev/null +++ b/utils/RICH_HV_Switch.sh @@ -0,0 +1,8 @@ +#!/bin/bash +first_input=$1 +#shift +. epics -- +/home/hadaq/hadesdaq/richhv/rich700/setCrate.sh 1 +/home/hadaq/hadesdaq/richhv/rich700/setHV.sh $first_input +/home/hadaq/hadesdaq/richhv/rich700/setHVon_off.sh $first_input 2 +#~/trbsoft/hadesdaq/richhv/rich700/infoHV.sh $1 diff --git a/utils/RICH_Powercycle.pl b/utils/RICH_Powercycle.pl new file mode 100755 index 0000000..7973c48 --- /dev/null +++ b/utils/RICH_Powercycle.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w + +use strict; +use warnings; +use lib "../nettools/"; +use Perl2Epics; +use Data::Dumper; + +print "Connect..\n"; +my $s = "HAD:RICH:PS:poweron"; +Perl2Epics::Connect("RICHLV_PowerOn",$s); + +$s = "HAD:RICH:PS:poweroff"; +Perl2Epics::Connect("RICHLV_PowerOff",$s); + +Perl2Epics::Put("RICHLV_PowerOff",1); +Perl2Epics::GetAll(); + +sleep 8; +Perl2Epics::Put("RICHLV_PowerOn",1); diff --git a/utils/RICH_Thr_Call.sh b/utils/RICH_Thr_Call.sh new file mode 100755 index 0000000..84683a5 --- /dev/null +++ b/utils/RICH_Thr_Call.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /home/hadaq/hadesdaq/rich/trb_dirich_threshold +. ./setLD +./HADESthreshscan_v1 "$@" diff --git a/utils/control_gui_logger.sh b/utils/control_gui_logger.sh new file mode 100755 index 0000000..56286a9 --- /dev/null +++ b/utils/control_gui_logger.sh @@ -0,0 +1,11 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +my $str = join " ", @ARGV[1..$#ARGV]; +my $command = qq|logger -p local1.info -t "DAQ" "$ARGV[0] $str"|; +qx($command); + +exit; + diff --git a/utils/mdc_lv.pl b/utils/mdc_lv.pl new file mode 100755 index 0000000..38bf807 --- /dev/null +++ b/utils/mdc_lv.pl @@ -0,0 +1,144 @@ +#!/usr/bin/perl -w + +use Data::Dumper; + +my $numArg = $#ARGV +1; +my $LastArg = 0; +my @Sector; +my @Plane; + +my $DEBUGLEVEL = 1; +my $DoAll = 0; +my $Powercycle = 2; # 0-Off; 1-On, 2-Cycle +my $LV = [ + ["3AA5E702000000A4","3A14E3020000008B","3A5CDB02000000E5","3ABEF0020000002A"], #S0; 200x,210X,220X,230X 1 + ["3AA5E702000000A4","3A14E3020000008B","3A5CDB02000000E5","3ABEF0020000002A"], #S1; 201x,211X,221X,231X 2 + ["3A11DA0200000017","3A3AD90200000017","3A05E5020000007B","3A53E602000000A9"], #S2; 202x,212X,222X,232X 1 + ["3A11DA0200000017","3A3AD90200000017","3A05E5020000007B","3A53E602000000A9"], #S3; 203x,213X,223X,233X 2 + ["3A6EE302000000DC","3A6FDA020000009C","3A1FF4020000005E","3AF6DB0200000076"], #S4; 204x,214X,224X,234X 1 + ["3A6EE302000000DC","3A6FDA020000009C","3A1FF4020000005E","3AF6DB0200000076"] #S5; 205x,215X,225X,235X 2 + ]; + +if ($numArg == 0) { + #No Arguments + print "usage: mdc_lv.pl --sector --plane --off\n"; + print "usage: mdc_lv.pl --sector --plane\n"; + print "usage: mdc_lv.pl -s -p \n"; + print "usage: mdc_lv.pl -a \n"; + print "usage: mdc_lv.pl --all \n"; + +} elsif ($ARGV[0] eq "-h" || $ARGV[0] eq "--help") { + help(); +} else { + for (my $i=0; $i<$numArg;$i++){ + my ($letter) = $ARGV[$i] =~ /^[-][-]*(.*)/; + if (defined $letter) { + #print $letter."\n"; + #-- + if ($letter eq "s" || $letter eq "sector"){ + #sector selection + $LastArg = 1; + } elsif ($letter eq "p" || $letter eq "plane") { + #level + $LastArg = 2; + } elsif ($letter eq "a" || $letter eq "all") { + #all + $LastArg = 3; + $DoAll = 1; + last; + } elsif ( $letter eq "off") { + #all + $LastArg = 4; + $Powercycle = 0; + } elsif ( $letter eq "on") { + #all + $LastArg = 5; + $Powercycle = 1; + } else { + print "$letter: not a supported Parameter!\n"; + $LastArg = 0; + } + } else { + # Values + if ($LastArg == 0) { + print "ERROR\n"; + } else { + ##Values to last Parameter + if ($LastArg == 1) { + if ($ARGV[$i] >= 0 && $ARGV[$i] < 6) { + push(@Sector,$ARGV[$i]); + } else { + print "Sector value not between 0 and 5.\n"; + } + } elsif ($LastArg == 2) { + if ($ARGV[$i] >= 0 && $ARGV[$i] < 4) { + push(@Plane ,$ARGV[$i]); + } else { + print "Plane value not between 0 and 3.\n"; + } + } elsif ($LastArg == 3) { + print "Switch All...\n"; + } else { + print "ERROR\n"; + } + } + } + } + + if ( $DoAll == 0) { + my $SectorSize = @Sector; + my $PlaneSize = @Plane; + for (my $s = 0; $s<$SectorSize;$s++){ + my $factor = $Sector[$s]%2 + 1; + if ($PlaneSize == 0) { + print "no Plane!\n"; + } else { + for (my $p = 0; $p<$PlaneSize;$p++){ + my $addr = $LV->[$Sector[$s]][$Plane[$p]]; + print "Sec: $Sector[$s] Plane: $Plane[$p] Factor: $factor Addr: $addr\n" if ($DEBUGLEVEL >= 1); + if ($Powercycle == 2) { + run($addr,$factor); + } else { + print "Switch only Off...\n"; + run_off($addr,$factor); + } + } + } + } + } else { + ## Do all + print "Do All...\n"; + run_all(); + } +} + + +sub help { + print "HELP ME!!!\n"; +} + +sub run { + my ($addr,$factor) = @_; + print "$addr $factor \n"; + print qx(command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS $addr $factor'"; + sleep 5; + command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS $addr 0'"; + )."\n"; +} + +sub run_off { + my ($addr,$factor) = @_; + print "$addr $factor \n"; + print qx(command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS $addr $factor'"; + )."\n"; +} + +sub run_all { + for (my $s=0;$s<6;$s++){ + for (my $p=0;$p<4;$p++){ + my $factor = $s%2 + 1; + my $addr = $LV->[$s][$p]; + run($addr,$factor); + } + } +} diff --git a/utils/odroid_HMP_Powercycle.sh b/utils/odroid_HMP_Powercycle.sh new file mode 100755 index 0000000..498b4f8 --- /dev/null +++ b/utils/odroid_HMP_Powercycle.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +###################################################### +# # +# odroid_HMP_Powercycle.sh # +# # +###################################################### + +if [ -z $1 ]; then + odroid="odroid1"; +else + odroid=$1; +fi; + +if [ -z $2 ]; then + devicename="/dev/HAMEG_HAMEG_HO720_100030280929"; +else + devicename=$2; +fi; + +#echo $1 $2; + +echo "Sending power cycle request to $odroid @ $devicename" + +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo 'Switching Off...' +echo 'OUTPUT:GENERAL OFF' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo 'Switching ON...' +echo 'OUTPUT:GENERAL ON' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename" +echo -n 'Current Status: ' +echo 'OUTPUT:GENERAL ?' | ssh $odroid "cat > $devicename; timeout 2 cat $devicename"