]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update control GUI scripts
authorJan Michel <jan@lxhadeb07>
Fri, 15 Feb 2019 13:32:00 +0000 (14:32 +0100)
committerJan Michel <jan@lxhadeb07>
Fri, 15 Feb 2019 13:32:00 +0000 (14:32 +0100)
59 files changed:
control/gui/Buttons2.pm
control/gui/call_programs_local.sh
control/gui/call_programs_wrapper.sh [changed from file to symlink]
control/gui/call_programs_wrapper_lxhadeb06.sh [new file with mode: 0755]
control/gui/call_programs_wrapper_lxhadesdaq.sh [new file with mode: 0755]
control/gui/daq/10_Start_DAQ
control/gui/daq/20_Reprogram_FPGA
control/gui/daq/30_Reboot_OEP
control/gui/daq/35_Reboot_MDCHub
control/gui/daq/40_ReSync_Missing_OEP
control/gui/eb/10_Restart_EB [deleted file]
control/gui/eb/22_Restart_BNET_2_Builders [deleted file]
control/gui/eb/23_Restart_BNET_3_Builders [deleted file]
control/gui/eb/27_Start_TDC_CAL
control/gui/eb/28_Stop_TDC_CAL
control/gui/eb/29_BEAM_Files [moved from control/gui/eb/29_Prefix_Be with 69% similarity]
control/gui/eb/29_BEAM_Files.png [moved from control/gui/eb/10_Restart_EB.png with 100% similarity]
control/gui/eb/50_COSMICS_Files [moved from control/gui/eb/50_Prefix_Co with 100% similarity]
control/gui/eb/52_TEST_File [moved from control/gui/eb/40_Prefix_Te with 96% similarity]
control/gui/eb/55_NO_FILE [moved from control/gui/eb/30_Prefix_NoFile with 100% similarity]
control/gui/eb/55_NO_FILE.png [moved from control/gui/eb/20_____Stop_EB.png with 100% similarity]
control/gui/eb/60_Prefix_TC [deleted file]
control/gui/eb/60_Restart_EB [new file with mode: 0755]
control/gui/eb/65_____Stop_EB [moved from control/gui/eb/20_____Stop_EB with 100% similarity]
control/gui/eb/70_Prefix_Ri [deleted file]
control/gui/eb/70_Set_1_EB [moved from control/gui/eb/21_Restart_BNET_1_Builder with 100% similarity]
control/gui/eb/73_Set_4_EB [moved from control/gui/eb/23_Restart_BNET_4_Builders with 100% similarity]
control/gui/eb/75_Prefix_Ec [deleted file]
control/gui/eb/75_Set_8_EB [moved from control/gui/eb/25_Restart_BNET_8_Builders with 100% similarity]
control/gui/eb/76_Set_12_EB [moved from control/gui/eb/26_Restart_BNET_12_Builders with 100% similarity]
control/gui/eb/80_Prefix_St [deleted file]
control/gui/eb/90_Prefix_Md [deleted file]
control/gui/eb/98_Prefix_Sh [deleted file]
control/gui/eb/99_Prefix_Pt [deleted file]
control/gui/expert/BLR_Reinit_FPGA [new file with mode: 0755]
control/gui/expert/BLR_Reload_Settings [new file with mode: 0755]
control/gui/expert/Pexor_Repair [deleted file]
control/gui/expert/RICH_Powercycle [deleted file]
control/gui/expert/Reboot RICH [deleted file]
control/gui/expert/Reload_RICH [new file with mode: 0755]
control/gui/expert/Set_RICH_HV
control/gui/monitor/10_CTS_Mon
control/gui/monitor/28_Epics_old [moved from control/gui/monitor/28_Epics with 100% similarity]
control/gui/monitor/30_EPICS_Power [new file with mode: 0755]
control/gui/monitor/30_EPICS_Power.png [moved from control/gui/monitor/28_Epics.png with 100% similarity]
control/gui/monitor/80_Daq_VNC
control/gui/monitor/mumble [new file with mode: 0755]
control/gui/power/00_Powercycle_all [new file with mode: 0755]
control/gui/power/10_RICH_Powercycle [new file with mode: 0755]
control/gui/power/11_Rich_Fan_Powercycle [new file with mode: 0755]
control/gui/power/20_ECAL_5V_Entrance_Powercycle [new file with mode: 0755]
control/gui/power/21_ECAL_LV5_Powercycle [new file with mode: 0755]
control/gui/power/30_Wall_Powercycle [moved from control/gui/expert/Wall_Powercycle with 73% similarity]
control/gui/power/40_Start_Powercycle [new file with mode: 0755]
control/gui/power/90_HUBS_Powercycle [new file with mode: 0755]
control/gui/power/MDC_LV_Powercycle [moved from control/gui/expert/MDC_LV_Powercycle with 100% similarity]
control/gui/power/RPC_special_PwrCyc [moved from control/gui/expert/RPC_special_PwrCyc with 81% similarity]
dcs_archive [new symlink]
hmon/hmon_ebsummary.pl [new file with mode: 0755]

index de2d45932facc4fa36e18ce872c881a2bba3e154..187a52fef0bb3077b79286bbd014e8e148657a43 100644 (file)
@@ -145,6 +145,16 @@ sub NEW {
     $horizontalLayout->addWidget( $groupBox_4 );
 
 
+    my $groupBox_5 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_5} = $groupBox_5;
+    $groupBox_5->setObjectName( "groupBox_5" );
+    my $vl_gb5 = Qt::VBoxLayout( $groupBox_5 );
+    $self->{vl_gb5} = $vl_gb5;
+    $vl_gb5->setObjectName( "vl_gb5" );
+
+    $horizontalLayout->addWidget( $groupBox_5 );
+
+
 
     my $vl_top = Qt::VBoxLayout( );
     $self->{vl_top} = $vl_top;
@@ -212,9 +222,11 @@ sub NEW {
     $dir = "eb";
     make_buttons($self, $dir, \$cur_button_number, $groupBox_3, $vl_gb3);
 
-
     $dir = "expert";
     make_buttons($self, $dir, \$cur_button_number, $groupBox_4, $vl_gb4);
+
+    $dir = "power";
+    make_buttons($self, $dir, \$cur_button_number, $groupBox_5, $vl_gb5);
     #print "cur_button: $cur_button_number\n";
 
     #$layoutWidget->updateGeometry();
@@ -240,6 +252,7 @@ sub retranslateUi {
     $self->{groupBox_2}->setTitle( Qt::Application::translate( 'MainWindow', "Monitor Tools", undef, Qt::Application::UnicodeUTF8() ) );
     $self->{groupBox_3}->setTitle( Qt::Application::translate( 'MainWindow', "Eventbuilder Tools", undef, Qt::Application::UnicodeUTF8() ) );
     $self->{groupBox_4}->setTitle( Qt::Application::translate( 'MainWindow', "Expert Tools", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_5}->setTitle( Qt::Application::translate( 'MainWindow', "Power Tools", undef, Qt::Application::UnicodeUTF8() ) );
 #    $self->{pushButton}->setText( Qt::Application::translate( 'MainWindow', "Quit DAQ-Control", undef, Qt::Application::UnicodeUTF8() ) );
     $self->{checkBox}->setText( Qt::Application::translate( 'MainWindow', "Show Expert Tools", undef, Qt::Application::UnicodeUTF8() ) );
 
index 7ec753753339085ae03d57a2154456635ec211d8..19603478fc817ca483bcca71391468b9ee12a4b0 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
 
 cd /home/hadaq/trbsoft/hadesdaq/control/gui/
-./call_programs_wrapper.sh -geometry -0-0 &
-#/home/hadaq/trbsoft/hadesdaq/control/gui/call_programs_wrapper.sh -geometry -0-0 &
+/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0 &
 
+#/home/hadaq/trbsoft/hadesdaq/control/gui/call_programs_wrapper.sh -geometry -0-0 &
 #cd /home/hadaq/trbsoft/daq/control/gui/
 #./call_programs2.pl -geometry -0-0
 
deleted file mode 100755 (executable)
index ba93d5a8b9f881763f0186e300a831031423b27d..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ssh -X lxhadeb06 "export PATH=\$PATH:\$HOME/bin; echo $PATH; cd /home/hadaq/trbsoft/hadesdaq/control/gui/; ./call_programs2.pl -geometry -0-0" 
-#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/gui/
-#/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..f135b22c8bb66805bf847518ed3d1f0e4c398b66
--- /dev/null
@@ -0,0 +1 @@
+call_programs_local.sh
\ No newline at end of file
diff --git a/control/gui/call_programs_wrapper_lxhadeb06.sh b/control/gui/call_programs_wrapper_lxhadeb06.sh
new file mode 100755 (executable)
index 0000000..ba93d5a
--- /dev/null
@@ -0,0 +1,5 @@
+ssh -X lxhadeb06 "export PATH=\$PATH:\$HOME/bin; echo $PATH; cd /home/hadaq/trbsoft/hadesdaq/control/gui/; ./call_programs2.pl -geometry -0-0" 
+#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/gui/
+#/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0
diff --git a/control/gui/call_programs_wrapper_lxhadesdaq.sh b/control/gui/call_programs_wrapper_lxhadesdaq.sh
new file mode 100755 (executable)
index 0000000..db334ba
--- /dev/null
@@ -0,0 +1,5 @@
+ssh -X lxhadesdaq "export PATH=\$PATH:\$HOME/bin; echo $PATH; cd /home/hadaq/trbsoft/hadesdaq/control/gui/; ./call_programs2.pl -geometry -0-0" 
+#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/gui/
+#/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0
index fed9db926e984ad2a8b674f94a52a3635d77fb7c..9f07f5e18dca8d105287886cb8fbe4f39da914c1 100755 (executable)
@@ -3,11 +3,11 @@
 export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "restart the DAQ")
 if [ $myvar == "256" ]; then exit; fi
 
-#notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
+notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
 
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
-  ssh hadaq@lxhadesdaq "
+  ssh hadaq@lxhadesdaqp "
   source /home/hadaq/.bash_profile
   echo \"  <Startup> Connected to lxhadesdaq...\"
   echo \"  <Startup> Starting DAQ with default settings...\"
@@ -17,5 +17,5 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
 "
 '
 
-#notifyall.sh "DAQ" "<I> DAQ has been started." "STARTUP" &
+notifyall.sh "DAQ" "<I> DAQ has been started." "STARTUP" &
 
index ff94836448fd5513ceaddda2089dfe735d467089..0fb05bcd2193add9e641b65b86f34798fcbc8da9 100755 (executable)
@@ -9,7 +9,7 @@ killall logerrors.pl
 notifyall.sh "DAQ" "<I> FPGA are being reprogrammed." "STARTUP" &
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
-  ssh -X hadaq@lxhadesdaq "
+  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\"
index ce73397195c75e9200d763ce01909045e93516b6..6a1ec2ca5ba8669642976e78f59ea3e485d7297a 100755 (executable)
@@ -3,12 +3,12 @@
 export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl " reboot the MDC-OEPs")
 if [ $myvar == "256" ]; then exit; fi
 
-
-ssh -X hadaq@lxhadesdaq "
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+ssh hadaq@lxhadesdaqp "
 ~/bin/rebootoep_x11.sh
-'
+sleep 2
 "
+'
 
 notifyall.sh "DAQ" "<I> OEPs rebooted" "MDC"&
 
index 0bd30b14b38ac9c7f994c5f9cc89a24e9fcea825..cb5b1f9370b747803656bdca1a3334b44ec96108 100755 (executable)
@@ -7,11 +7,11 @@
 export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl " reboot the MDC-Hubs")
 if [ $myvar == "256" ]; then exit; fi
 
-ssh -X hadaq@lxhadesdaq "
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
-trbcmd reset;
-trbcmd reload 0xfe11
-'";
+  trbcmd reset
+  trbcmd reload 0xfe11
+'
+
 sleep 8;
 notifyall.sh "DAQ" "<I> MDC-Hubs rebooted" "MDC"&
 
index e264cbba84b26d717155a1d153bfa1ae3c47d7b8..cc2c59a407efd6c5430c9c6e9ddb76483fc43589 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/bash
-ssh -X hadaq@lxhadesdaq "
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+ssh hadaq@lxhadesdaqp "
+echo "reviveoep.pl"
 reviveoep.pl
-  '
- "
-
+sleep 10
+"
+'
diff --git a/control/gui/eb/10_Restart_EB b/control/gui/eb/10_Restart_EB
deleted file mode 100755 (executable)
index 0a77f47..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-#/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-  echo "Restarting Eventbuilder 1 - 16"
-  stoptrigger.sh
-  cd ~/trbsoft/hadesdaq/evtbuild/
-  sleep 10 && starttrigger.sh &
-  ./start_eb_gbe.sh      
-  '
- "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been restarted with last prefix" "EB" &
-
diff --git a/control/gui/eb/22_Restart_BNET_2_Builders b/control/gui/eb/22_Restart_BNET_2_Builders
deleted file mode 100755 (executable)
index 96257af..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-  echo "Starting Eventbuilders  with 2 BNET builder nodes"
-  cd ~/trbsoft/hadesdaq/evtbuild/
-  ./start_eb_gbe.pl -e restart -n 1-16  -d on -p te -b 2
-  sleep 2
- '
- "
-
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been restarted using 2 BNET builder nodes" "EB" &
-
diff --git a/control/gui/eb/23_Restart_BNET_3_Builders b/control/gui/eb/23_Restart_BNET_3_Builders
deleted file mode 100755 (executable)
index 77a6044..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-  echo "Starting Eventbuilders  with 3 BNET builder nodes"
-  cd ~/trbsoft/hadesdaq/evtbuild/
-  ./start_eb_gbe.pl -e restart -n 1-16  -d on -p te -b 3
-  sleep 2
- '
- "
-
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been restarted using 3 BNET builder nodes" "EB" &
-
index 8531db2ec751682d1b09d9ae8e899f86e2d72559..ec01ccea744531f5635da8d97979e5a0fcd41e9b 100755 (executable)
@@ -1,11 +1,15 @@
 #!/bin/bash
 # 100Hz -> 2e6 pulservalue = 0x1E8480
 
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "start the TDC calibration")
+if [ $myvar == "256" ]; then exit; fi                            
+
+/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> 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 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have started TDC-Calibration procedure." "EB" &
+'
+
+/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have started the calibration procedure." "EB" &
 
index b88e1981c965c83c6e5a2478ab0a130d3c176226..2d5bd9f100cb636634c4faa9ce9ec0d6c197c7b1 100755 (executable)
@@ -1,13 +1,14 @@
 #!/bin/bash
 
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "stop the TDC calibration")
+if [ $myvar == "256" ]; then exit; fi                            
 
+/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> TDC calibration is stopping." "EB" &
 
-ssh -X hadaq@lxhadesdaq "
  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" "<I> Eventbuilders have stopped TDC-Calibration procedure." "EB" &
+ '
+
+/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have stopped the TDC-Calibration procedure." "EB" &
 
similarity index 69%
rename from control/gui/eb/29_Prefix_Be
rename to control/gui/eb/29_BEAM_Files
index a8c9daed01436753be0cc015af27b4326f2a5922..22a3f40ef34299bc49b0b426b4c82891d7a7be20 100755 (executable)
 #   '
 #  "
 
-ssh -X hadaq@lxhadesdaq "
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "start the TDC calibration")
+if [ $myvar == "256" ]; then exit; fi                            
+
+$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> TDC calibration is starting." "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 
    '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing beam files." "EB" &
+$HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing beam files." "EB" &
 
 
similarity index 96%
rename from control/gui/eb/40_Prefix_Te
rename to control/gui/eb/52_TEST_File
index 914b3f68d8ce1b72fad84c12db4b8efba900dbc5..c8fbd437530e3d85904edddbe1790272d440b29e 100755 (executable)
@@ -17,7 +17,7 @@
 
 ssh -X hadaq@lxhadesdaq "
  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix be"
+   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 
diff --git a/control/gui/eb/60_Prefix_TC b/control/gui/eb/60_Prefix_TC
deleted file mode 100755 (executable)
index fad39e1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix tc"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart  -n 1-16 -d on -p tc
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=tc&oninit=10\"
-#   echo set prefix TC on BNET master controller
-#   sleep 2  
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing TDC-Calibration Files" "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo Setting file prefix tc
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=tc&oninit=10\"
-   echo set prefix tc on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing TDC-Calibration Files." "EB" &
-
diff --git a/control/gui/eb/60_Restart_EB b/control/gui/eb/60_Restart_EB
new file mode 100755 (executable)
index 0000000..30de264
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+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" "<I> Eventbuilders are being restarted." "EB" &
+
+xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+ssh -X hadaq@lxhadesdaq "
+  echo \"Restarting Eventbuilder 1 - 16\"
+  stoptrigger.sh
+  cd ~/trbsoft/hadesdaq/evtbuild/
+  sleep 12 && starttrigger.sh &
+  ./start_eb_gbe.sh      
+  "
+'
+
+/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been restarted with last prefix" "EB" &
+
diff --git a/control/gui/eb/70_Prefix_Ri b/control/gui/eb/70_Prefix_Ri
deleted file mode 100755 (executable)
index 0fb8d11..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix ri"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart -n 1-16  -d on -p ri
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=ri&oninit=10\"
-#   echo set prefix RI on BNET master controller
-#   sleep 2
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing RICH Files" "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix ri"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=ri&oninit=10\"
-   echo set prefix ri on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing RICH files." "EB" &
-
diff --git a/control/gui/eb/75_Prefix_Ec b/control/gui/eb/75_Prefix_Ec
deleted file mode 100755 (executable)
index b313f07..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix ec"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart  -n 1-16 -d on -p ec
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=ec&oninit=10\"
-#   echo set prefix EC on BNET master controller
-#   sleep 2
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing ECAL Files" "EB" &
-
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix ec"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=ec&oninit=10\"
-   echo set prefix ec on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing ECAL files." "EB" &
-
diff --git a/control/gui/eb/80_Prefix_St b/control/gui/eb/80_Prefix_St
deleted file mode 100755 (executable)
index f0e8255..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders  with prefix st"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart  -n 1-16 -d on -p st
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=st&oninit=10\"
-#   echo set prefix ST on BNET master controller
-#   sleep 2
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing START Files" "EB"&
-
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix st"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=st&oninit=10\"
-   echo set prefix st on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing START files." "EB" &
-
diff --git a/control/gui/eb/90_Prefix_Md b/control/gui/eb/90_Prefix_Md
deleted file mode 100755 (executable)
index 5b18dc9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix md"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart -n 1-16 -d on -p md
-#    /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=md&oninit=10\"
-#   echo set prefix MD on BNET master controller
-#   sleep 2 
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing MDC Files" "EB"&
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix md"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=md&oninit=10\"
-   echo set prefix te on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing MDC files." "EB" &
-
diff --git a/control/gui/eb/98_Prefix_Sh b/control/gui/eb/98_Prefix_Sh
deleted file mode 100755 (executable)
index 7d5457a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix sh"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart  -n 1-16 -d on -p sh
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=sh&oninit=10\"
-#   echo set prefix SH on BNET master controller
-#   sleep 2 
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing Shower sh files" "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix sh"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=sh&oninit=10\"
-   echo set prefix sh on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing shower files." "EB" &
-
diff --git a/control/gui/eb/99_Prefix_Pt b/control/gui/eb/99_Prefix_Pt
deleted file mode 100755 (executable)
index 055fb36..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# notifyall.sh "DAQ" "<I> Eventbuilders are being restarted." "EB" &
-
-# ssh -X hadaq@lxhadesdaq "
-#  xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-#   echo "Starting Eventbuilders with prefix pt"
-#   cd ~/trbsoft/hadesdaq/evtbuild/
-#   ./start_eb_gbe.pl -e restart -n 1-16 -d on -p pt
-#   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=pt&oninit=10\"
-#   echo set prefix PT on BNET master controller
-#   sleep 2 
-#   
-#   '
-#  "
-# /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing PionTracker pt files" "EB" &
-
-ssh -X hadaq@lxhadesdaq "
- xterm -geometry 80x24 -bg orange -fg black -e bash -c '
-   echo "Setting file prefix pt"
-   /usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=pt&oninit=10\"
-   echo set prefix pt on BNET master controller
-   sleep 2 
-   '
-  "
-/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are writing  PionTracker pt files." "EB" &
-
diff --git a/control/gui/expert/BLR_Reinit_FPGA b/control/gui/expert/BLR_Reinit_FPGA
new file mode 100755 (executable)
index 0000000..9ea919b
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to reprogram the BLR-FPGA \(should not have an effect on other systems\) and reload the settings for the BLR")
+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
+'
+
diff --git a/control/gui/expert/BLR_Reload_Settings b/control/gui/expert/BLR_Reload_Settings
new file mode 100755 (executable)
index 0000000..98b989b
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to reload the settings for the BLR")
+if [ $myvar == "256" ]; then exit; fi
+
+xterm  -geometry 80x24 -bg orange -fg black -e bash -c '
+command_client.pl -e etraxp107 -c "spi_trbv2_7 /home/hadaq/cts/mult_thresholds/ctsblr_thresholds"
+sleep 4
+'
+
+#ssh hadaq@lxhadesdaq "command_client.pl -e etraxp107 -c \"spi_trbv2_7 /home/hadaq/cts/mult_thresholds/ctsblr_thresholds\" "
diff --git a/control/gui/expert/Pexor_Repair b/control/gui/expert/Pexor_Repair
deleted file mode 100755 (executable)
index d59f727..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-# JAM took from startup_briccolage.sh without starting everything
-xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
-  ssh hadaq@hadesp31 "
-  export DAQOPSERVER=hadesp31;
-  echo \"  <TrbNet>  Pexor clean-up on hades31...\";
-  pkill -USR1 trbnetd 2>/dev/null; 
-  killall trbcmd 2>/dev/null;  
-  trbcmdlocal W 0x703 0x20; 
-  trbcmdlocal f 3; 
-  trbcmdlocal W 0x702 2;
-  echo \"  <TrbNet>  Doing Reset...\";
-  tryreset.pl; 
-  pkill -USR2 trbnetd;
-  pgrep trbnetd 1>/dev/null || trbnetd;
-  #trbcmdlocal reset;
-  echo \"Set default CTS setup\"
-  # following from cts/startup.script:
-  trbcmdlocal clearbit 0x0003 0xa0c0 0x20000000 #set profile B to start
-  trbcmdlocal w 0x0003 0xA0E0 0xcccccccc
-  trbcmdlocal w 0x0003 0xA0E1 0xcc
-  trbcmdlocal loadbit 0x003 0xA0C1 0x0000000F 0x00000004
-  trbcmdlocal setbit 0x0003 0xA0C2 0x01000000
-  trbcmdlocal   -f /home/hadaq/trbsoft/hadesdaq/cts/cts_settings_mon.trbcmd
-  trbcmdlocal loadbit 0x0003 0xa0f0 0xffff0000 0xfff0000
-  #All calib to EB1
-  trbcmdlocal w 0x0003 0xa0f3 0xff1
-# turn off multi event queue, as these garble the data from the TRB2s
-  stoptrigger.sh; trbcmdlocal w 0xff7f 0x8307 0 ; starttrigger.sh
-  echo \"Repairing trbnetd and pexor done\"
-  sleep 130;
-  "
-  '
diff --git a/control/gui/expert/RICH_Powercycle b/control/gui/expert/RICH_Powercycle
deleted file mode 100755 (executable)
index 4441860..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-export myvar=$(doyoureallywant.pl "to make a RICH powercycle?")
-if [ $myvar == "256" ]; then exit; fi
-
-export DAQOPSERVER=hadesp31
-trbcmd w 0xfffb 0x20 0x8000
-
diff --git a/control/gui/expert/Reboot RICH b/control/gui/expert/Reboot RICH
deleted file mode 100755 (executable)
index 4441860..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-export myvar=$(doyoureallywant.pl "to make a RICH powercycle?")
-if [ $myvar == "256" ]; then exit; fi
-
-export DAQOPSERVER=hadesp31
-trbcmd w 0xfffb 0x20 0x8000
-
diff --git a/control/gui/expert/Reload_RICH b/control/gui/expert/Reload_RICH
new file mode 100755 (executable)
index 0000000..df1f52f
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+export myvar=$(doyoureallywant.pl "to Reload the RICH?")
+if [ $myvar == "256" ]; then exit; fi
+
+export DAQOPSERVER=hadesp31
+trbcmd reload 0xfe51
+trbcmd reload 0xfe52
+
index 6f26ba6a5b71dd4d10a709fc5c0504296f213b52..3da26386aca44b7f01a520dd88fae362d5de6fec 100755 (executable)
@@ -10,11 +10,11 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   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_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_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
   echo \"Done\"
   sleep 10
index 9a92ec76ada61de7ef05fd990dc44c9393745993..7c377ad0acf8e74fad3ec4599d1d7716dd0a2fcc 100755 (executable)
@@ -4,6 +4,13 @@
 #if [ $myvar == "256" ]; then exit; fi
 #notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
 
+export DAQOPSERVER=hadesp31
+cd /home/hadaq/trbsoft/hadesdaq/control/ctsmon
+perl ./mon_cts.pl 
+sleep 1
+exit
+
+
 #xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   ssh -X hadaq@lxhadeb06 "
   source /home/hadaq/.bashrc
diff --git a/control/gui/monitor/30_EPICS_Power b/control/gui/monitor/30_EPICS_Power
new file mode 100755 (executable)
index 0000000..7da4203
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+vncviewer-tigervnc -passwd /home/hadaq/.vnc/passwd_scs  lxhaddcs03:44
index 36e882ea0ea1db1f54be1e8fca291a3507aa7faf..99f2329cdd030ba501157ece00ac77c8770e3e4c 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/bash
-vncviewer -passwd ~/.vnc/daqvncpasswd hadesdaq01:1 &
+vncviewer -passwd ~/.vnc/passwd hades30:1 &
 
diff --git a/control/gui/monitor/mumble b/control/gui/monitor/mumble
new file mode 100755 (executable)
index 0000000..57173e1
--- /dev/null
@@ -0,0 +1 @@
+mumble
diff --git a/control/gui/power/00_Powercycle_all b/control/gui/power/00_Powercycle_all
new file mode 100755 (executable)
index 0000000..5ba8ab5
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+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        
+  echo \'Starting power cycle...\'
+
+  cd /home/hadaq/hadesdaq/utils;
+  export PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl
+  ./RICH_Powercycle.pl;           
+  #./ECAL_5V_Entrance_Powercycle.sh;
+  #./ECAL_LV5_Powercycle;
+  #./HUB_Powercycle.pl;
+
+sleep 5
+"
diff --git a/control/gui/power/10_RICH_Powercycle b/control/gui/power/10_RICH_Powercycle
new file mode 100755 (executable)
index 0000000..7d4fd19
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to powercycle the RICH LV?")
+if [ $myvar == "256" ]; then exit; fi
+
+xterm  -e bash --login -c  '
+  ssh hadaq@lxhadesdaq "
+  source /home/hadaq/.bash_profile        
+  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
+  "
+'
diff --git a/control/gui/power/11_Rich_Fan_Powercycle b/control/gui/power/11_Rich_Fan_Powercycle
new file mode 100755 (executable)
index 0000000..f60ff91
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to powercycle the RICH Fans?")
+if [ $myvar == "256" ]; then exit; fi
+
+xterm -e "
+cd ../../../../hadesdaq/utils;
+./odroid_HMP_Powercycle.sh odroid1 /dev/HAMEG_HAMEG_HO720_100030280929;
+sleep 5
+"
diff --git a/control/gui/power/20_ECAL_5V_Entrance_Powercycle b/control/gui/power/20_ECAL_5V_Entrance_Powercycle
new file mode 100755 (executable)
index 0000000..09a4dcf
--- /dev/null
@@ -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/21_ECAL_LV5_Powercycle b/control/gui/power/21_ECAL_LV5_Powercycle
new file mode 100755 (executable)
index 0000000..f696d16
--- /dev/null
@@ -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;
+"
similarity index 73%
rename from control/gui/expert/Wall_Powercycle
rename to control/gui/power/30_Wall_Powercycle
index eb194ed83df2096aea0ddf82fb3c39d447ab2c82..2a16d819ea397c9f84ea64831fef7a6c4e13efd2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export myvar=$(doyoureallywant.pl "to make a MDC powercycle? There will be no further warnings!")
+export myvar=$(doyoureallywant.pl "to make a Forward Wall powercycle? There will be no further warnings!")
 if [ $myvar == "256" ]; then exit; fi
 
 xterm -e "
diff --git a/control/gui/power/40_Start_Powercycle b/control/gui/power/40_Start_Powercycle
new file mode 100755 (executable)
index 0000000..e49b61d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to powercycle the RICH Fans?")
+if [ $myvar == "256" ]; then exit; fi
+
+xterm -e "
+cd ../../../../hadesdaq/utils;
+./odroid_HMP_Powercycle.sh odroid1 /dev/HAMEG_HAMEG_HO720_020546031;
+sleep 5
+"
diff --git a/control/gui/power/90_HUBS_Powercycle b/control/gui/power/90_HUBS_Powercycle
new file mode 100755 (executable)
index 0000000..59b40e5
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+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
+"
similarity index 81%
rename from control/gui/expert/RPC_special_PwrCyc
rename to control/gui/power/RPC_special_PwrCyc
index 99c76ef9e6c95354fd5df764f8f3cc2fa469a37e..a2a4c91c5281ba102c66e79f583a4226699a23d9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 xterm -e "
-export myvar=$(doyoureallywant.pl 'to do a power cycle on Wall')
+export myvar=$(doyoureallywant.pl 'to do a power cycle on RPC')
 if [ $myvar == '256' ]; then exit; fi
 
 echo 'Sending power cycle request'
diff --git a/dcs_archive b/dcs_archive
new file mode 120000 (symlink)
index 0000000..b923b7b
--- /dev/null
@@ -0,0 +1 @@
+/home/hadaq/trbsoft/dcs/archive/
\ No newline at end of file
diff --git a/hmon/hmon_ebsummary.pl b/hmon/hmon_ebsummary.pl
new file mode 100755 (executable)
index 0000000..40b4584
--- /dev/null
@@ -0,0 +1,150 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Time::HiRes qw( gettimeofday usleep time );
+use Data::Dumper;
+use Hmon;
+use QA;
+use LWP::Simple;
+use JSON qw( decode_json ); 
+use POSIX qw/floor ceil strftime/;
+use lib '.';
+use getebjson;
+
+use DateTime;
+use DateTime::Format::ISO8601;
+
+#my $dt = DateTime::Format::ISO8601->parse_datetime('2019-02-12T13:02:03.795Z');
+#print "\n".($dt->epoch() - time());
+#print strftime("%H:%M:%S",gmtime());
+my $class;
+
+while(1){
+  my $data = getjsonhash('eb', 'Master/BNET/get.json');
+  unless($data->{Inputs}{value}) {sleep 5; next;}
+  
+  my @datainp;
+  for my $i (1.. scalar @{$data->{Inputs}{value}}) {
+    $datainp[$i] = getjsonhash('eb',"BNET-IN-$i/FirstLevel/get.json");
+    }
+  my @databui;
+  for my $i (1.. scalar @{$data->{Builders}{value}}) {
+    $databui[$i] = getjsonhash('eb',"BNET-EB-$i/HadaqCombiner/get.json");
+    }
+
+  $data->{RunIdStr}{value} =~ /(\d\d)(\d\d)(\d\d)$/;
+  my $runstart = "--";
+     $runstart = "$1:$2:$3" if $3;
+
+  my $builders = scalar @{$data->{Builders}{value}};
+  my ($filesize,$totaldata,$totalevents) = (0,0,0);
+  for my $i (1 .. $builders){
+    $filesize += $databui[$i]->{RunFileSize}{value}//0;
+    $totaldata += $databui[$i]->{HadaqData}{value}//0;
+    $totalevents += $databui[$i]->{HadaqEvents}{value}//0;
+    }
+  $filesize *= 1E6;
+  $totaldata *= 1E6;
+  my $str  = Hmon::MakeTitle(11, 8, "EB Summary",1);
+  $str .= "<div class=\"flex\">";
+  $str .= "<div style='margin:10px;background:#aaa;'>";
+  $str .= "<table><col><col style='width:150px;text-align:right;background:white;'> ";
+  
+    $class = "bgn";   
+    $class = "bor" if $data->{LostRate}{value} > 20; 
+    $class = "brd" if $data->{LostRate}{value} > $data->{EventsRate}{value}/10 && $data->{LostRate}{value} > 20; 
+    $class = "bye" if $data->{EventsRate}{value} < 2; 
+  
+  $str .= "<tr><th>Events/s<td class=\"$class\">".QA::SciNotation(ceil($data->{EventsRate}{value}));
+  $str .= "<tr><th>Data B/s<td>".QA::SciNotation($data->{DataRate}{value}*1E6)."B";
+
+    $class = "bgn";   
+    $class = "bor" if $data->{LostRate}{value} > 20; 
+    $class = "brd" if $data->{LostRate}{value} > $data->{EventsRate}{value}/10 && $data->{LostRate}{value} > 20; 
+  
+  $str .= "<tr><th>Lost Ev/s<td class=\"$class\">".QA::SciNotation(ceil($data->{LostRate}{value}//0));
+  $str .= "</table></div>";
+
+  $str .= "<div style='margin:10px;background:#aaa;'>";
+  $str .= "<table><col><col style='width:150px;text-align:right;background:white;'> ";
+  
+    $class = "bgn";
+    $class = "bye" if $data->{RunPrefix}{value} eq 'te';
+    $class = "bor" if $filesize == 0;
+  
+  $str .= "<tr><th>Run Start <td >".$runstart;
+  $str .= "<tr><th>Run Name <td class=\"$class\">".$data->{RunPrefix}{value}.$data->{RunIdStr}{value};
+  $str .= "<tr><th>File Size<td class=\"$class\">".QA::SciNotation($filesize)."B ($builders files)";
+  $str .= "</table></div>";
+  
+  $str .= "<div style='margin:10px;background:#aaa;'>";
+  $str .= "<table><col><col style='width:150px;text-align:right;background:white;'> ";
+  $str .= "<tr><th>Calib Time<td>".strftime("%d.%m. %H:%M",localtime($data->{LastCalibr}{'time'}));
+  $str .= "<tr><th>Calib Success <td>".($data->{LastCalibr}{quality}*100)."%";
+  $str .= "<tr><th>&nbsp;<td>&nbsp;";
+  $str .= "</table></div>";
+  
+  $str .= "</div>";
+  
+  $str .= "<div style='float:left;display:inline;margin:10px;background:#aaa;'>";
+  $str .= "<table><col style='width:70px;'><col style='width:80px'><col style='width:80px'><col style='width:80px'><col style='width:80px'> ";
+  $str .= "<tr><th colspan='5' style='background:white'>Input Nodes";
+  $str .= "<tr><td><th>Data B/s<th>Events/s<th colspan=\"2\">Dropped /s";
+  for my $i (1.. scalar @{$data->{Inputs}{value}}){
+  
+
+    my $class = "bgn";   
+       $class = "bye" if ($datainp[$i]->{HadaqEvents}{value}//0) < 2; 
+       $class = "bor" if ($datainp[$i]->{HadaqLostEvents}{value}//0) > 10; 
+       $class = "brd" if ($datainp[$i]->{HadaqLostEvents}{value}//0) > 100; 
+       
+    my $nodename = $data->{Inputs}{nodes}[$i-1];
+       $nodename =~ s%dabc://%%;
+       $nodename =~ s%:\d+$%%;
+    
+    $str .= "<tr><th>$nodename".
+    "<td class=\"$class\">".QA::SciNotation(($datainp[$i]->{HadaqData}{value}//0)*1E6).
+    "<td class=\"$class\">".QA::SciNotation(ceil($datainp[$i]->{HadaqEvents}{value}//0)).
+    "<td class=\"$class\">".QA::SciNotation(ceil($datainp[$i]->{HadaqLostEvents}{value}//0))."Ev ".
+    "<td class=\"$class\">".QA::SciNotation(($datainp[$i]->{HadaqDroppedData}{value}//0)*1E6)."B "
+    
+
+    ;
+    
+#     $str .= "<td class='ebinputs'>";
+#     for my $j (0 .. (scalar @{$datainp[$i]->{hubs}}) - 1) {
+#       my $inptext = sprintf("%04x",$datainp[$i]->{hubs}[$j]);
+#       $str .= "<div title=\"$inptext\">$inptext</div>";
+#       }
+    }
+  $str .= "</table></div>";
+
+  
+  $str .= "<div style='float:right;display:inline;margin:10px;background:#aaa;'>";
+  $str .= "<table class=\"eb\"><col style='width:80px;'><col style='width:80px;text-align:right;background:white;'><col style='width:80px;text-align:right;background:white;'><col style='width:80px;text-align:right;background:white;'><col style='width:50px;text-align:right;background:white;'> ";
+  $str .= "<tr><th colspan='5' style='background:white'>Building Nodes";
+  $str .= "<tr><th><th>Data Rate<th>Event Rate<th>File Size<th>Lustre";
+  for my $i (1 .. $builders){
+    my $nodename = $data->{Builders}{nodes}[$i-1];
+       $nodename =~ s%dabc://%%;
+       $nodename =~ s%:\d+$%%;
+    
+    $str .= "<tr><th>$nodename".
+            "<td>".QA::SciNotation(($databui[$i]->{HadaqData}{value}//0)*1E6).
+            "<td>".QA::SciNotation(ceil($databui[$i]->{HadaqEvents}{value}//0)).
+            "<td>".QA::SciNotation(($databui[$i]->{RunFileSize}{value}//0)*1E6).
+            "<td>&nbsp;";
+    }
+#   $str .= "<tr><th>Sum<td>".QA::SciNotation($totaldata)."<td>".QA::SciNotation($totalevents)."<td>".QA::SciNotation($filesize)."<td>"; 
+  $str .= "</table></div>";
+  
+  
+  $str .= Hmon::MakeFooter();
+  Hmon::WriteFile("EBSummary",$str);  
+
+  sleep(1);
+  }
+  
+  
+  #HadaqData HadaqEvents HadaqLostEvents HadaqDroppedData