]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
added QT-guis
authorhadaq@CountingHouse <hadaq@CountingHouse>
Tue, 14 May 2013 16:28:18 +0000 (18:28 +0200)
committerhadaq@CountingHouse <hadaq@CountingHouse>
Tue, 14 May 2013 16:28:18 +0000 (18:28 +0200)
130 files changed:
README.txt
control/gui/Buttons2.pm [new file with mode: 0644]
control/gui/call_programs2.pl [new file with mode: 0755]
control/gui/call_programs_local.sh [new file with mode: 0755]
control/gui/call_programs_wrapper.sh [new file with mode: 0755]
control/gui/close_window.png [new file with mode: 0644]
control/gui/daq/10_Start_DAQ [new file with mode: 0755]
control/gui/daq/10_Start_DAQ.png [new file with mode: 0644]
control/gui/daq/15_Start_Stop_Trigger [new file with mode: 0755]
control/gui/daq/15_Start_Stop_Trigger.png [new file with mode: 0644]
control/gui/daq/20_Reprogram_FPGA [new file with mode: 0755]
control/gui/daq/20_Reprogram_FPGA.png [new file with mode: 0644]
control/gui/daq/30_Reboot_OEP [new file with mode: 0755]
control/gui/daq/30_Reboot_OEP.png [new file with mode: 0644]
control/gui/daq/35_Reboot_MDCHub [new file with mode: 0755]
control/gui/daq/40_ReSync_Missing_OEP [new file with mode: 0755]
control/gui/daq/40_ReSync_Missing_OEP.png [new file with mode: 0644]
control/gui/eb/10_Restart_EB [new file with mode: 0755]
control/gui/eb/10_Restart_EB.png [new file with mode: 0644]
control/gui/eb/20_____Stop_EB [new file with mode: 0755]
control/gui/eb/20_____Stop_EB.png [new file with mode: 0644]
control/gui/eb/29_Prefix_Be [new file with mode: 0755]
control/gui/eb/30_Prefix_NoFile [new file with mode: 0755]
control/gui/eb/40_Prefix_Te [new file with mode: 0755]
control/gui/eb/50_Prefix_Co [new file with mode: 0755]
control/gui/eb/70_Prefix_Ri [new file with mode: 0755]
control/gui/eb/80_Prefix_St [new file with mode: 0755]
control/gui/eb/90_Prefix_Md [new file with mode: 0755]
control/gui/expert/90_MDC_HighVoltageRamp [new file with mode: 0755]
control/gui/expert/CTS_Scope [new file with mode: 0755]
control/gui/expert/MDC_LV_Powercycle [new file with mode: 0755]
control/gui/expert/MDC_LV_Turn_On_ALL_Relais [new file with mode: 0755]
control/gui/expert/RICH_Powercycle [new file with mode: 0644]
control/gui/expert/RPC_special_PwrCyc [new file with mode: 0755]
control/gui/expert/Reboot RICH [new file with mode: 0644]
control/gui/expert/Reload_RPC_Thresholds [new file with mode: 0755]
control/gui/expert/Restart_EB_IOC [new file with mode: 0755]
control/gui/expert/Restart_Hmon [new file with mode: 0755]
control/gui/expert/Start_Speech_Output [new file with mode: 0755]
control/gui/expert/Stop_Speech_Output [new file with mode: 0755]
control/gui/expert/Wall_Powercycle [new file with mode: 0755]
control/gui/hades.gif [new file with mode: 0644]
control/gui/hades.png [new file with mode: 0644]
control/gui/monitor/10_CTS_Mon [new file with mode: 0755]
control/gui/monitor/10_CTS_Mon.png [new file with mode: 0644]
control/gui/monitor/20_Hmon [new file with mode: 0755]
control/gui/monitor/20_Hmon.png [new file with mode: 0644]
control/gui/monitor/28_Epics [new file with mode: 0755]
control/gui/monitor/28_Epics.png [new file with mode: 0644]
control/gui/monitor/30_Epics_EB [new file with mode: 0755]
control/gui/monitor/30_Epics_EB.png [new file with mode: 0644]
control/gui/monitor/80_Daq_VNC [new file with mode: 0755]
control/gui/monitor/90_Chat [new file with mode: 0755]
control/gui/monitor/90_Chat.png [new file with mode: 0644]
control/mdcHVgui/Buttons2.pm [new file with mode: 0755]
control/mdcHVgui/S1/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S1/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S1/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S1/Plane_4 [new file with mode: 0755]
control/mdcHVgui/S2/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S2/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S2/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S2/Plane_4 [new file with mode: 0755]
control/mdcHVgui/S3/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S3/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S3/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S3/Plane_4 [new file with mode: 0755]
control/mdcHVgui/S4/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S4/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S4/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S4/Plane_4 [new file with mode: 0755]
control/mdcHVgui/S5/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S5/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S5/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S5/Plane_4 [new file with mode: 0755]
control/mdcHVgui/S6/Plane_1 [new file with mode: 0755]
control/mdcHVgui/S6/Plane_2 [new file with mode: 0755]
control/mdcHVgui/S6/Plane_3 [new file with mode: 0755]
control/mdcHVgui/S6/Plane_4 [new file with mode: 0755]
control/mdcHVgui/call_programs2.pl [new file with mode: 0755]
control/mdcLVgui/Buttons2.pm [new file with mode: 0755]
control/mdcLVgui/S0/200x [new file with mode: 0755]
control/mdcLVgui/S0/210x [new file with mode: 0755]
control/mdcLVgui/S0/220x [new file with mode: 0755]
control/mdcLVgui/S0/230x [new file with mode: 0755]
control/mdcLVgui/S0/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S0/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S0/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S0/Plane_3 [new file with mode: 0755]
control/mdcLVgui/S1/201x [new file with mode: 0755]
control/mdcLVgui/S1/211x [new file with mode: 0755]
control/mdcLVgui/S1/221x [new file with mode: 0755]
control/mdcLVgui/S1/231x [new file with mode: 0755]
control/mdcLVgui/S1/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S1/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S1/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S1/Plane_3 [new file with mode: 0755]
control/mdcLVgui/S2/202x [new file with mode: 0755]
control/mdcLVgui/S2/212x [new file with mode: 0755]
control/mdcLVgui/S2/222x [new file with mode: 0755]
control/mdcLVgui/S2/232x [new file with mode: 0755]
control/mdcLVgui/S2/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S2/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S2/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S2/Plane_3 [new file with mode: 0755]
control/mdcLVgui/S3/203x [new file with mode: 0755]
control/mdcLVgui/S3/213x [new file with mode: 0755]
control/mdcLVgui/S3/223x [new file with mode: 0755]
control/mdcLVgui/S3/233x [new file with mode: 0755]
control/mdcLVgui/S3/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S3/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S3/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S3/Plane_3 [new file with mode: 0755]
control/mdcLVgui/S4/204x [new file with mode: 0755]
control/mdcLVgui/S4/214x [new file with mode: 0755]
control/mdcLVgui/S4/224x [new file with mode: 0755]
control/mdcLVgui/S4/234x [new file with mode: 0755]
control/mdcLVgui/S4/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S4/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S4/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S4/Plane_3 [new file with mode: 0755]
control/mdcLVgui/S5/205x [new file with mode: 0755]
control/mdcLVgui/S5/215x [new file with mode: 0755]
control/mdcLVgui/S5/225x [new file with mode: 0755]
control/mdcLVgui/S5/235x [new file with mode: 0755]
control/mdcLVgui/S5/Plane_0 [new file with mode: 0755]
control/mdcLVgui/S5/Plane_1 [new file with mode: 0755]
control/mdcLVgui/S5/Plane_2 [new file with mode: 0755]
control/mdcLVgui/S5/Plane_3 [new file with mode: 0755]
control/mdcLVgui/call_programs2.pl [new file with mode: 0755]

index 9094f5335a35f89c533448479cfd312790a3bcaa..e0fb804c836f116569a80ece031a68b887e58c92 100644 (file)
@@ -5,13 +5,13 @@ The repository for all Hades DAQ tools, configurations and start-up scripts.
 Directories from CVS inspected and partially moved to git:
 
 tools
+control  
 
 
 
 
 Directories to check:
 
-control  
 cts  
 evtbuild  
 hub  
diff --git a/control/gui/Buttons2.pm b/control/gui/Buttons2.pm
new file mode 100644 (file)
index 0000000..de2d459
--- /dev/null
@@ -0,0 +1,378 @@
+package Buttons2;
+
+use strict;
+use warnings;
+
+use QtCore4 ;
+use QtGui4;
+
+use Data::Dumper;
+use QtCore4::debug qw(ambiguous);
+
+
+#use Qt::isa qw(Qt::Widget);
+#use QtCore4::isa qw(Qt::Widget);
+#use QtCore4;
+
+use QtCore4::isa qw( Qt::Widget );
+
+use QtCore4::slots
+    hide_expert_checked => ['int'];
+
+
+sub groupBox_3 {
+    return shift->{groupBox_3};
+}
+
+sub hide_expert_checked {
+    my ( $state)  = @_;
+
+    if($state == Qt::Unchecked()) {
+      this->{self}->{groupBox_4}->hide();
+    }
+    else {
+      this->{self}->{groupBox_4}->show();
+    }
+}
+
+
+use Data::Dumper;
+
+
+
+# # make slots
+my $str;
+$str = "use QtCore4::slots\n slotQuitPressed => [], ";
+foreach my $i (0..150) {
+  $str .= " slot". $i . "Pressed => [], ";
+}
+$str .= "slotdummyPressed => [];";
+
+#print "will eval command: $str\n";
+eval $str;
+#print "error: $@\n";
+
+
+# }
+
+
+
+sub NEW {
+    my ( $class, $mainWindow ) = @_;
+    $class->SUPER::NEW($mainWindow);
+
+    my $self = bless {}, $class;
+
+    this->{self} = $self;
+
+    $self->{ra_buttons} = [];
+
+    #print "self: "; print Dumper $self;
+    #print "this: "; print Dumper this;
+
+    #my $self = $mainWindow;
+    if ( !defined $mainWindow->objectName() ) {
+        $mainWindow->setObjectName( "mainWindow" );
+    }
+    #$mainWindow->resize( 800, 600 );
+    #$mainWindow->resize( 400, 300 );
+
+    #$self->{hide_expert_checked} = hide_expert_checked;
+
+    my $centralwidget = Qt::Widget( $mainWindow );
+    $self->{centralwidget} = $centralwidget;
+    $centralwidget->setObjectName( "centralwidget" );
+
+    my $vl_mw = Qt::VBoxLayout( $centralwidget );
+
+#    my $layoutWidget = Qt::Widget( $centralwidget );
+#    $self->{layoutWidget} = $layoutWidget;
+#    $layoutWidget->setObjectName( "layoutWidget" );
+    #$layoutWidget->setGeometry( Qt::Rect(30, 110, 723, 418) );
+#    my $horizontalLayout = Qt::HBoxLayout( $centralwidget );
+    my $horizontalLayout = Qt::HBoxLayout( );
+    $self->{horizontalLayout} = $horizontalLayout;
+    $horizontalLayout->setObjectName( "horizontalLayout" );
+    $horizontalLayout->setContentsMargins(0, 0, 0, 0 );
+
+    #$horizontalLayout->addStretch(1);
+
+    my $groupBox_1 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_1} = $groupBox_1;
+    $groupBox_1->setObjectName( "groupBox_1" );
+    my $vl_gb1 = Qt::VBoxLayout( $groupBox_1 );
+    $self->{vl_gb1} = $vl_gb1;
+    $vl_gb1->setObjectName( "vl_gb1" );
+
+
+
+    $horizontalLayout->addWidget( $groupBox_1 );
+
+
+    my $groupBox_2 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_2} = $groupBox_2;
+    $groupBox_2->setObjectName( "groupBox_2" );
+    my $vl_gb2 = Qt::VBoxLayout( $groupBox_2 );
+    $self->{vl_gb2} = $vl_gb2;
+    $vl_gb2->setObjectName( "vl_gb2" );
+
+    $horizontalLayout->addWidget( $groupBox_2 );
+
+    my $groupBox_3 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_3} = $groupBox_3;
+    $groupBox_3->setObjectName( "groupBox_3" );
+    my $vl_gb3 = Qt::VBoxLayout( $groupBox_3 );
+    $self->{vl_gb3} = $vl_gb3;
+    $vl_gb3->setObjectName( "vl_gb3" );
+
+    $horizontalLayout->addWidget( $groupBox_3 );
+
+
+
+    my $groupBox_4 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_4} = $groupBox_4;
+    $groupBox_4->setObjectName( "groupBox_4" );
+
+    #$groupBox_3->setCheckable(1);
+    #$groupBox_3->setChecked(0);
+    $groupBox_4->hide();
+
+
+    my $vl_gb4 = Qt::VBoxLayout( $groupBox_4 );
+    $self->{vl_gb4} = $vl_gb4;
+    $vl_gb4->setObjectName( "vl_gb4" );
+
+    $horizontalLayout->addWidget( $groupBox_4 );
+
+
+
+    my $vl_top = Qt::VBoxLayout( );
+    $self->{vl_top} = $vl_top;
+    $vl_top->setObjectName( "vl_top" );
+    $vl_top->setContentsMargins(0, 0, 0, 0 );
+
+    $vl_mw->addLayout($vl_top);
+    $vl_mw->addLayout($horizontalLayout);
+
+
+#    my $pushButton = Qt::PushButton( $centralwidget );
+#    $self->{pushButton} = $pushButton;
+#    $pushButton->setObjectName( "pushButton" );
+
+#    my $sizePolicy = Qt::SizePolicy( Qt::SizePolicy::Minimum(), Qt::SizePolicy::Fixed() );
+#    $self->{$sizePolicy} = $sizePolicy;
+#    $sizePolicy->setHorizontalStretch( 0 );
+#    $sizePolicy->setVerticalStretch( 0 );
+#    $sizePolicy->setHeightForWidth( $pushButton->sizePolicy()->hasHeightForWidth() );
+#    $pushButton->setSizePolicy( $sizePolicy );
+#    $pushButton->setMinimumSize( Qt::Size(0, 0) );
+#    my $icon = Qt::Icon;
+#    $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+#    $icon->addPixmap(Qt::Pixmap("close_window.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+    #$icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-system-login.png"), Qt::Icon::Normal(), Qt::Icon::On() );
+#    $pushButton->setIcon( $icon );
+#    $pushButton->setIconSize( Qt::Size(50, 50) );
+
+#    $vl_top->addWidget( $pushButton );
+
+    my $checkBox = Qt::CheckBox( $centralwidget );
+    $self->{checkBox} = $checkBox;
+    $checkBox->setObjectName( "checkBox" );
+
+    $vl_top->addWidget( $checkBox );
+
+    $mainWindow->setCentralWidget( $centralwidget );
+    my $menubar = Qt::MenuBar( $mainWindow );
+    $self->{menubar} = $menubar;
+    $menubar->setObjectName( "menubar" );
+    #$menubar->setGeometry( Qt::Rect(0, 0, 800, 25) );
+    $mainWindow->setMenuBar( $menubar );
+    my $statusbar = Qt::StatusBar( $mainWindow );
+    $self->{statusbar} = $statusbar;
+    $statusbar->setObjectName( "statusbar" );
+    $mainWindow->setStatusBar( $statusbar );
+
+    $self->retranslateUi( $mainWindow );
+
+
+    my $cur_button_number = 0;
+
+    my $dir;
+    my $buttons = [];
+
+
+    $dir = "daq";
+    make_buttons($self, $dir, \$cur_button_number, $groupBox_1, $vl_gb1);
+    #print "cur_button: $cur_button_number\n";
+
+    $dir = "monitor";
+    make_buttons($self, $dir, \$cur_button_number, $groupBox_2, $vl_gb2);
+    #print "cur_button: $cur_button_number\n";
+
+    $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);
+    #print "cur_button: $cur_button_number\n";
+
+    #$layoutWidget->updateGeometry();
+
+
+#    Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+
+
+    Qt::Object::connect($checkBox, SIGNAL 'stateChanged(int)' ,
+                      this, SLOT 'hide_expert_checked(int)' );
+
+    Qt::MetaObject::connectSlotsByName( $mainWindow );
+
+    return $self;
+
+}
+
+
+sub retranslateUi {
+    my ( $self, $mainWindow ) = @_;
+    $mainWindow->setWindowTitle( Qt::Application::translate( 'MainWindow', "DAQ-Control", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_1}->setTitle( Qt::Application::translate( 'MainWindow', "DAQ-Operator", undef, Qt::Application::UnicodeUTF8() ) );
+    $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->{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() ) );
+
+
+} # retranslateUi
+
+
+
+
+sub make_buttons {
+  (my $self, my $dir, my $r_current_button_number, my $bgrp, my $layout) = @_;
+
+  #print  $bgrp;
+  #print "current number_; $r_current_button_number\n";
+
+  my $c = qq"find $dir -maxdepth 1 -type f| sort";
+  my @f = qx($c);
+
+  my $i = $$r_current_button_number;
+
+  my $button_list=[];
+
+  foreach (@f) {
+    next if /.png$/i;
+    chomp;
+    s/.*\///;
+    next if /\~$/;
+    push @$button_list, $_;
+    my $br = $self->{ra_buttons};
+    push @{$br}, $_;
+  }
+
+
+
+
+  foreach my $cur_button_name (@$button_list) {
+
+
+    next if ($cur_button_name =~ /.png$/);
+#    my $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+    my $icon_path = "$dir/$cur_button_name" . ".png";
+#    print "path: $icon_path_file \n";
+#    my $fh_icon;
+#    my $res = open($fh_icon, "<", $icon_path_file);
+#    my @file  = <$fh_icon>;
+#    $fh_icon->close();
+
+    #/usr/share/icons/hicolor/48x48/apps/
+#    my ($icon_name) = grep /Icon=/, @file;
+#    $icon_name =~ s/Icon=//;
+#    my $icon_path = "/usr/share/icons/hicolor/48x48/apps/$icon_name";
+#    print "got icon path: $icon_path \n";
+
+
+    my $name = $cur_button_name;
+    $name =~ s/^\d+_//;
+    $name =~ s/_/ /g;
+
+
+    my $com = qq|
+my \$pb$i = Qt::PushButton("$cur_button_name", \$bgrp);
+\$self->{pb$i} = \$pb$i;
+\$layout->addWidget( \$pb$i );
+\$pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef,
+                                               Qt::Application::UnicodeUTF8() ) );
+
+my \$icon$i = Qt::Icon;
+\$icon$i->addPixmap(Qt::Pixmap(\"$icon_path\"), Qt::Icon::Normal(), Qt::Icon::Off() );
+
+\$pb$i->setIcon( \$icon$i );
+\$pb$i->setIconSize( Qt::Size(50, 50) );
+
+|;
+
+
+#    my $pb_$i = Qt::PushButton("$_", \$bgrp);
+#   $self->{pb$i} = $pb_$i;
+#    $layout->addWidget( $pb_$i );
+#    $pushButton->setIcon( $icon );
+#    $pushButton->setIconSize( Qt::Size(50, 50) );
+#    $pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef, Qt::Application::UnicodeUTF8() ) );
+
+
+#/usr/share/icons/hicolor/48x48/apps/yast-bootloader.png
+
+    #   print "command1: $com\n";
+
+    #print "command: $com\n";
+    eval $com;
+    print "$@\n" if ($@);
+
+
+#my $iconstr = "$icon" . "$i";
+
+$com = qq |
+|;
+
+
+
+    #Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+    $com = qq|Qt::Object::connect(\$self->{pb$i}, SIGNAL 'clicked()', this, SLOT 'slot| . $i . qq|Pressed()');|;
+    #print "command2: $com\n";
+    eval $com;
+    print "error: " , $@ , "\n" if ($@);
+
+    make_subroutine($i, $dir);
+
+    $i++;
+    #last if $i >=10;
+  }
+
+  $$r_current_button_number = $i;
+}
+
+
+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(\$c); }|;
+#    my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|;
+#system(\$c); }|;
+    #print "sub: $str\n";
+    eval $str;
+}
+
+
+# sub slotQuitPressed {
+#     exit;
+# }
+
+#sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); }
+
+
+1;
diff --git a/control/gui/call_programs2.pl b/control/gui/call_programs2.pl
new file mode 100755 (executable)
index 0000000..360b8c8
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+package main;
+
+use warnings;
+use strict;
+use QtCore4;
+use QtGui4;
+use Buttons2;
+
+sub main {
+
+  my $a = Qt::Application(\@ARGV);
+  my $w = Qt::MainWindow;
+  my $u = Buttons2($w);
+  $w->show();
+  exit $a->exec();
+}
+
+
+main();
+
diff --git a/control/gui/call_programs_local.sh b/control/gui/call_programs_local.sh
new file mode 100755 (executable)
index 0000000..5166f91
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+cd /home/hadaq/trbsoft/daq/control/gui/
+/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0 &
+
+#cd /home/hadaq/trbsoft/daq/control/gui/
+#/home/hadaq/trbsoft/daq/control/gui/call_programs.pl -geometry -0-0
diff --git a/control/gui/call_programs_wrapper.sh b/control/gui/call_programs_wrapper.sh
new file mode 100755 (executable)
index 0000000..247482a
--- /dev/null
@@ -0,0 +1,5 @@
+ssh -X hadesdaq02 "cd /home/hadaq/trbsoft/daq/control/gui/
+/home/hadaq/trbsoft/daq/control/gui/call_programs2.pl -geometry -0-0" &
+
+#cd /home/hadaq/trbsoft/daq/control/gui/
+#/home/hadaq/trbsoft/daq/control/gui/call_programs.pl -geometry -0-0
diff --git a/control/gui/close_window.png b/control/gui/close_window.png
new file mode 100644 (file)
index 0000000..a351f32
Binary files /dev/null and b/control/gui/close_window.png differ
diff --git a/control/gui/daq/10_Start_DAQ b/control/gui/daq/10_Start_DAQ
new file mode 100755 (executable)
index 0000000..16d4681
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to restart the DAQ")
+if [ $myvar == "256" ]; then exit; fi
+
+#notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
+
+
+xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+  ssh -X hadaq@lxhadesdaq "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to lxhadesdaq...\"
+  echo \"  <Startup> Starting DAQ with default settings...\"
+  cd /home/hadaq/trbsoft/daq/main/
+  time bash ./startup_briccolage.sh
+  sleep 10
+"
+'
+
+#notifyall.sh "DAQ" "<I> DAQ has been started." "STARTUP" &
+
diff --git a/control/gui/daq/10_Start_DAQ.png b/control/gui/daq/10_Start_DAQ.png
new file mode 100644 (file)
index 0000000..8b4771c
Binary files /dev/null and b/control/gui/daq/10_Start_DAQ.png differ
diff --git a/control/gui/daq/15_Start_Stop_Trigger b/control/gui/daq/15_Start_Stop_Trigger
new file mode 100755 (executable)
index 0000000..b96f215
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+use warnings;
+use HADES::TrbNet;
+$ENV{'DAQOPSERVER'} = "hades31";
+trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror();
+my $rh = trb_register_read(0x0003, 0xa0c0) or print trb_strerror() and die;
+
+if($rh->{3} & 0x400) {
+  system("trbcmd clearbit 0x0003 0xa0c0 0x400");
+  }
+else {
+  system("trbcmd setbit 0x0003 0xa0c0 0x400");
+  }
+  
\ No newline at end of file
diff --git a/control/gui/daq/15_Start_Stop_Trigger.png b/control/gui/daq/15_Start_Stop_Trigger.png
new file mode 100644 (file)
index 0000000..745cf75
Binary files /dev/null and b/control/gui/daq/15_Start_Stop_Trigger.png differ
diff --git a/control/gui/daq/20_Reprogram_FPGA b/control/gui/daq/20_Reprogram_FPGA
new file mode 100755 (executable)
index 0000000..f9a76b8
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to reprogramm the FPGAs")
+
+if [ $myvar == "256" ]; then exit; fi
+
+killall logerrors.pl
+
+notifyall.sh "DAQ" "<I> FPGA are being reprogrammed." "STARTUP" &
+
+ssh -X hadaq@lxhadesdaq "
+ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+  cd ~/trbsoft/daq/main/
+  ./startup.pl -f main_hades.script -o file  -m TOF -m RPC -m WALL -m RICH -m SHOWER -m STARTCTS -m MDC -m MDCDATASET --eb off
+  echo "First config run"
+  bash startup_briccolage.sh
+  '
+"
+notifyall.sh "DAQ" "<I> FPGA have been programmed and DAQ is started." "STARTUP" &
+
diff --git a/control/gui/daq/20_Reprogram_FPGA.png b/control/gui/daq/20_Reprogram_FPGA.png
new file mode 100644 (file)
index 0000000..043814c
Binary files /dev/null and b/control/gui/daq/20_Reprogram_FPGA.png differ
diff --git a/control/gui/daq/30_Reboot_OEP b/control/gui/daq/30_Reboot_OEP
new file mode 100755 (executable)
index 0000000..f997de3
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+ssh -X hadaq@lxhadesdaq "
+xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+~/bin/rebootoep_x11.sh
+'
+"
+
+notifyall.sh "DAQ" "<I> OEPs rebooted" "MDC"&
+
diff --git a/control/gui/daq/30_Reboot_OEP.png b/control/gui/daq/30_Reboot_OEP.png
new file mode 100644 (file)
index 0000000..f013b42
Binary files /dev/null and b/control/gui/daq/30_Reboot_OEP.png differ
diff --git a/control/gui/daq/35_Reboot_MDCHub b/control/gui/daq/35_Reboot_MDCHub
new file mode 100755 (executable)
index 0000000..48824cd
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+# ssh -X hadaq@lxhadesdaq "
+# xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+#  echo ping
+#  /home/hadaq/bin/command_client.pl -e etraxp023 -c '
+
+export myvar=$(doyoureallywant.pl "to reboot the MDC-Hubs")
+if [ $myvar == "256" ]; then exit; fi
+
+trbcmd reset
+rebootfpga.sh 0xfe11
+sleep 10;
+#daqop set flash 1 oep; daqop reboot oep
+#  '
+#  "
+notifyall.sh "DAQ" "<I> MDC-Hubs rebooted" "MDC"&
+
diff --git a/control/gui/daq/40_ReSync_Missing_OEP b/control/gui/daq/40_ReSync_Missing_OEP
new file mode 100755 (executable)
index 0000000..e264cbb
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+ssh -X hadaq@lxhadesdaq "
+xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+reviveoep.pl
+  '
+ "
+
diff --git a/control/gui/daq/40_ReSync_Missing_OEP.png b/control/gui/daq/40_ReSync_Missing_OEP.png
new file mode 100644 (file)
index 0000000..95dc659
Binary files /dev/null and b/control/gui/daq/40_ReSync_Missing_OEP.png differ
diff --git a/control/gui/eb/10_Restart_EB b/control/gui/eb/10_Restart_EB
new file mode 100755 (executable)
index 0000000..46ba53d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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 "Restarting Eventbuilder 1 - 16"
+  stoptrigger.sh
+  cd ~/trbsoft/daq/evtbuild/
+  sleep 5 && starttrigger.sh &
+  ./start_eb_gbe.sh
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been restarted with last prefix" "EB" &
+
diff --git a/control/gui/eb/10_Restart_EB.png b/control/gui/eb/10_Restart_EB.png
new file mode 100644 (file)
index 0000000..7b3568d
Binary files /dev/null and b/control/gui/eb/10_Restart_EB.png differ
diff --git a/control/gui/eb/20_____Stop_EB b/control/gui/eb/20_____Stop_EB
new file mode 100755 (executable)
index 0000000..e0f1509
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# notifyall.sh "DAQ" "<I> Eventbuilders are being stopped." "EB" &
+
+ssh -X hadaq@lxhadesdaq "
+ xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  echo "Stopping Eventbuilder 1 - 16"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e stop -n 1-16
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been stopped" "EB" &
diff --git a/control/gui/eb/20_____Stop_EB.png b/control/gui/eb/20_____Stop_EB.png
new file mode 100644 (file)
index 0000000..cd4fd05
Binary files /dev/null and b/control/gui/eb/20_____Stop_EB.png differ
diff --git a/control/gui/eb/29_Prefix_Be b/control/gui/eb/29_Prefix_Be
new file mode 100755 (executable)
index 0000000..17f11d1
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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 Eventbuilder 1 - 16 with file prefix be"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p be
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing beam files." "EB" &
+
+
diff --git a/control/gui/eb/30_Prefix_NoFile b/control/gui/eb/30_Prefix_NoFile
new file mode 100755 (executable)
index 0000000..daa39ed
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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 Eventbuilder 1 - 16, writing NO FILES"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d off -p '--'
+ '
+"
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. NO FILES are being written" "EB" &
+
diff --git a/control/gui/eb/40_Prefix_Te b/control/gui/eb/40_Prefix_Te
new file mode 100755 (executable)
index 0000000..5bcefd2
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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 Eventbuilder 1 - 16 with prefix te"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing test files" "EB" &
+
diff --git a/control/gui/eb/50_Prefix_Co b/control/gui/eb/50_Prefix_Co
new file mode 100755 (executable)
index 0000000..eacd5c1
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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 Eventbuilder 1 - 16 with prefix co"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p co
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing Cosmics Files" "EB" &
+
diff --git a/control/gui/eb/70_Prefix_Ri b/control/gui/eb/70_Prefix_Ri
new file mode 100755 (executable)
index 0000000..2a974d8
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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 Eventbuilder 1 - 16 with prefix ri"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p ri
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing RICH Files" "EB" &
+
diff --git a/control/gui/eb/80_Prefix_St b/control/gui/eb/80_Prefix_St
new file mode 100755 (executable)
index 0000000..8b05701
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+ssh -X hadaq@lxhadesdaq "
+ xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  echo "Starting Eventbuilder 1 - 16 with prefix st"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p st
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing START Files" "EB"&
+
diff --git a/control/gui/eb/90_Prefix_Md b/control/gui/eb/90_Prefix_Md
new file mode 100755 (executable)
index 0000000..b933e23
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+ssh -X hadaq@lxhadesdaq "
+ xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  echo "Starting Eventbuilder 1 - 16 with prefix md"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -e restart -n 1-16 -d on -p md
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders have been started. Writing MDC Files" "EB"&
+
diff --git a/control/gui/expert/90_MDC_HighVoltageRamp b/control/gui/expert/90_MDC_HighVoltageRamp
new file mode 100755 (executable)
index 0000000..730b731
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+export myvar=$(doyoureallywant.pl "to RAMP DOWN High Voltage!")
+if [ $myvar == "256" ]; then exit; fi
+
+cd /home/hadaq/trbsoft/daq/control/mdcHVgui/
+/home/hadaq/trbsoft/daq/control/mdcHVgui/call_programs2.pl
+
diff --git a/control/gui/expert/CTS_Scope b/control/gui/expert/CTS_Scope
new file mode 100755 (executable)
index 0000000..d3101b2
--- /dev/null
@@ -0,0 +1,3 @@
+#rdesktop hadvm04.gsi.de -g 1500x950 -k de -uscs -phadesctrl
+rdesktop hadvm01.gsi.de -g 1500x950 -k de -uorcad -p6\$ectors
+
diff --git a/control/gui/expert/MDC_LV_Powercycle b/control/gui/expert/MDC_LV_Powercycle
new file mode 100755 (executable)
index 0000000..4893b3c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+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/daq/control/mdcLVgui/
+/home/hadaq/trbsoft/daq/control/mdcLVgui/call_programs2.pl
+
diff --git a/control/gui/expert/MDC_LV_Turn_On_ALL_Relais b/control/gui/expert/MDC_LV_Turn_On_ALL_Relais
new file mode 100755 (executable)
index 0000000..82f1517
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+xterm -e 'echo "Enabling the MDC-LV-Relais. Wait 4 Seconds..."; sleep 4' &
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 0'"
+sleep 2
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 0'"
+sleep 2
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 0'"
+
+xterm -e 'echo "Now you should have 157 A and 151 A
+on the +3V and -3V rails of the MDC LV (EPICS LV, crates.adl). 
+Just close this window when you read and understood the message."; sleep 200'
diff --git a/control/gui/expert/RICH_Powercycle b/control/gui/expert/RICH_Powercycle
new file mode 100644 (file)
index 0000000..4441860
--- /dev/null
@@ -0,0 +1,7 @@
+#!/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/RPC_special_PwrCyc b/control/gui/expert/RPC_special_PwrCyc
new file mode 100755 (executable)
index 0000000..99c76ef
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+xterm -e "
+export myvar=$(doyoureallywant.pl 'to do a power cycle on Wall')
+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
+"
diff --git a/control/gui/expert/Reboot RICH b/control/gui/expert/Reboot RICH
new file mode 100644 (file)
index 0000000..4441860
--- /dev/null
@@ -0,0 +1,7 @@
+#!/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_RPC_Thresholds b/control/gui/expert/Reload_RPC_Thresholds
new file mode 100755 (executable)
index 0000000..65390de
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+
+
+ssh -X lxhadesdaq "
+xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  echo Reloading RPC thresholds
+  cd /home/hadaq/rpc/utilities/
+  ./setTriggerBoardSX.sh
+  ./setThresholdsAll.sh
+  sleep 5
+'
+"
+notifyall.sh "DAQ" "<I> RPC-Thresholds have been reloaded." "RPC" &
\ No newline at end of file
diff --git a/control/gui/expert/Restart_EB_IOC b/control/gui/expert/Restart_EB_IOC
new file mode 100755 (executable)
index 0000000..c6879a5
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ssh -X hadaq@lxhadesdaq "
+ xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  echo "Starting Eventbuilder Control Interface"
+  cd ~/trbsoft/daq/evtbuild/
+  ./start_eb_gbe.pl -i start -n 1-16
+  '
+ "
+notifyall.sh "DAQ" "<I> Eventbuilders IOC have been started." "EB" &
+
+
diff --git a/control/gui/expert/Restart_Hmon b/control/gui/expert/Restart_Hmon
new file mode 100755 (executable)
index 0000000..3fad5b4
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+xterm -geometry 80x24 -bg orange -fg black -e bash -c '
+  ssh -X hadaq@hadesp33 "
+  echo Re-starting Hmon
+  cd ~/trbsoft/daq/tools/hmon/
+  ./stopall.sh
+  ./start.sh 1>/dev/null 2>/dev/null
+  echo "Hmon has been restartet"
+  sleep 5
+ "
+  '
+
+
+
diff --git a/control/gui/expert/Start_Speech_Output b/control/gui/expert/Start_Speech_Output
new file mode 100755 (executable)
index 0000000..9f8f29f
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+ssh hadaq@hades33 "killall -USR2 speakdaemon.pl"
+
+
+
diff --git a/control/gui/expert/Stop_Speech_Output b/control/gui/expert/Stop_Speech_Output
new file mode 100755 (executable)
index 0000000..b03ebef
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+#ssh hadaq@hades33 "killall -USR1 speakdaemon.pl"
+
+ssh hadaq@hades33 "killall -USR1 speakdaemon.pl; pkill -f espeak"
+
+
diff --git a/control/gui/expert/Wall_Powercycle b/control/gui/expert/Wall_Powercycle
new file mode 100755 (executable)
index 0000000..5ba00cb
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+xterm -e "
+export myvar=$(doyoureallywant.pl 'to do a power cycle on Wall')
+if [ $myvar == '256' ]; then exit; fi
+
+echo 'Sending power cycle request'
+wget -O /dev/null --http-password kaese --http-user admin -d http://haepcp06/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
+"
diff --git a/control/gui/hades.gif b/control/gui/hades.gif
new file mode 100644 (file)
index 0000000..7e2c78f
Binary files /dev/null and b/control/gui/hades.gif differ
diff --git a/control/gui/hades.png b/control/gui/hades.png
new file mode 100644 (file)
index 0000000..9aeacc5
Binary files /dev/null and b/control/gui/hades.png differ
diff --git a/control/gui/monitor/10_CTS_Mon b/control/gui/monitor/10_CTS_Mon
new file mode 100755 (executable)
index 0000000..710c250
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#export myvar=$(doyoureallywant.pl "to restart the DAQ")
+#if [ $myvar == "256" ]; then exit; fi
+#notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
+
+#xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+#   ssh -X hadaq@hadesdaq02 "
+  source /home/hadaq/.bashrc
+  export DAQOPSERVER=hadesp31
+  cd /home/hadaq/trbsoft/daq/evtbuild
+  perl ./mon_cts.pl 
+#  sleep 1
+#"
+#'
+
+#sleep 1
+#notifyall.sh "DAQ" "<I> DAQ has been started." "STARTUP" &
+
diff --git a/control/gui/monitor/10_CTS_Mon.png b/control/gui/monitor/10_CTS_Mon.png
new file mode 100644 (file)
index 0000000..996d431
Binary files /dev/null and b/control/gui/monitor/10_CTS_Mon.png differ
diff --git a/control/gui/monitor/20_Hmon b/control/gui/monitor/20_Hmon
new file mode 100755 (executable)
index 0000000..faccd51
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+#ssh -X hades30 " firefox -p Hmon  http://hadesdaq02/mon"
+MOZ_NO_REMOTE=1 firefox -p Hmon  http://hades33/mon
+
diff --git a/control/gui/monitor/20_Hmon.png b/control/gui/monitor/20_Hmon.png
new file mode 100644 (file)
index 0000000..08cd1f8
Binary files /dev/null and b/control/gui/monitor/20_Hmon.png differ
diff --git a/control/gui/monitor/28_Epics b/control/gui/monitor/28_Epics
new file mode 100755 (executable)
index 0000000..688b615
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+ssh -X -l scs hadesdaq02 '. /home/scs/.profile; medm -x hades.adl' 
diff --git a/control/gui/monitor/28_Epics.png b/control/gui/monitor/28_Epics.png
new file mode 100644 (file)
index 0000000..477b8dc
Binary files /dev/null and b/control/gui/monitor/28_Epics.png differ
diff --git a/control/gui/monitor/30_Epics_EB b/control/gui/monitor/30_Epics_EB
new file mode 100755 (executable)
index 0000000..5a0bd8d
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+ssh -X scs@hadesdaq02  'export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/scs/epics/extensions/bin/linux-x86/medm -x -macro "SUBSYSNUM=24" ~/operator/ebmainctrl.adl'
diff --git a/control/gui/monitor/30_Epics_EB.png b/control/gui/monitor/30_Epics_EB.png
new file mode 100644 (file)
index 0000000..bc25fc1
Binary files /dev/null and b/control/gui/monitor/30_Epics_EB.png differ
diff --git a/control/gui/monitor/80_Daq_VNC b/control/gui/monitor/80_Daq_VNC
new file mode 100755 (executable)
index 0000000..7066e8c
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+vncviewer -passwd ~/.vnc/daqvncpasswd lxhadesdaq:1 &
+
diff --git a/control/gui/monitor/90_Chat b/control/gui/monitor/90_Chat
new file mode 100755 (executable)
index 0000000..377eeca
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+xterm -T "HADES Chat" -geometry 80x30-0+0 -e ~/bin/hades_chat
+#xterm -T "HADES Chat" -geometry 80x30-0+0 -e 'source /home/hadaq/.bashrc; ~/bin/hades_chat'
diff --git a/control/gui/monitor/90_Chat.png b/control/gui/monitor/90_Chat.png
new file mode 100644 (file)
index 0000000..24487cf
Binary files /dev/null and b/control/gui/monitor/90_Chat.png differ
diff --git a/control/mdcHVgui/Buttons2.pm b/control/mdcHVgui/Buttons2.pm
new file mode 100755 (executable)
index 0000000..1b78d68
--- /dev/null
@@ -0,0 +1,399 @@
+package Buttons2;
+
+use strict;
+use warnings;
+
+use QtCore4 ;
+use QtGui4;
+
+use Data::Dumper;
+use QtCore4::debug qw(ambiguous);
+
+
+#use Qt::isa qw(Qt::Widget);
+#use QtCore4::isa qw(Qt::Widget);
+#use QtCore4;
+
+use QtCore4::isa qw( Qt::Widget );
+
+use QtCore4::slots
+    hide_expert_checked => ['int'];
+
+
+sub groupBox_3 {
+    return shift->{groupBox_3};
+}
+
+sub hide_expert_checked {
+    my ( $state)  = @_;
+
+    if($state == Qt::Unchecked()) {
+      this->{self}->{groupBox_4}->hide();
+    }
+    else {
+      this->{self}->{groupBox_4}->show();
+    }
+}
+
+
+use Data::Dumper;
+
+
+
+# # make slots
+my $str;
+$str = "use QtCore4::slots\n slotQuitPressed => [], ";
+foreach my $i (0..150) {
+  $str .= " slot". $i . "Pressed => [], ";
+}
+$str .= "slotdummyPressed => [];";
+
+#print "will eval command: $str\n";
+eval $str;
+#print "error: $@\n";
+
+
+# }
+
+
+
+sub NEW {
+    my ( $class, $mainWindow ) = @_;
+    $class->SUPER::NEW($mainWindow);
+
+    my $self = bless {}, $class;
+
+    this->{self} = $self;
+
+    $self->{ra_buttons} = [];
+
+    #print "self: "; print Dumper $self;
+    #print "this: "; print Dumper this;
+
+    #my $self = $mainWindow;
+    if ( !defined $mainWindow->objectName() ) {
+        $mainWindow->setObjectName( "mainWindow" );
+    }
+    #$mainWindow->resize( 800, 600 );
+    #$mainWindow->resize( 400, 300 );
+
+    #$self->{hide_expert_checked} = hide_expert_checked;
+
+    my $centralwidget = Qt::Widget( $mainWindow );
+    $self->{centralwidget} = $centralwidget;
+    $centralwidget->setObjectName( "centralwidget" );
+
+    my $vl_mw = Qt::VBoxLayout( $centralwidget );
+
+#    my $layoutWidget = Qt::Widget( $centralwidget );
+#    $self->{layoutWidget} = $layoutWidget;
+#    $layoutWidget->setObjectName( "layoutWidget" );
+    #$layoutWidget->setGeometry( Qt::Rect(30, 110, 723, 418) );
+#    my $horizontalLayout = Qt::HBoxLayout( $centralwidget );
+    my $horizontalLayout = Qt::HBoxLayout( );
+    $self->{horizontalLayout} = $horizontalLayout;
+    $horizontalLayout->setObjectName( "horizontalLayout" );
+    $horizontalLayout->setContentsMargins(0, 0, 0, 0 );
+
+    #$horizontalLayout->addStretch(1);
+
+    my $groupBox_1 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_1} = $groupBox_1;
+    $groupBox_1->setObjectName( "groupBox_1" );
+    my $vl_gb1 = Qt::VBoxLayout( $groupBox_1 );
+    $self->{vl_gb1} = $vl_gb1;
+    $vl_gb1->setObjectName( "vl_gb1" );
+
+
+
+    $horizontalLayout->addWidget( $groupBox_1 );
+
+
+    my $groupBox_2 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_2} = $groupBox_2;
+    $groupBox_2->setObjectName( "groupBox_2" );
+    my $vl_gb2 = Qt::VBoxLayout( $groupBox_2 );
+    $self->{vl_gb2} = $vl_gb2;
+    $vl_gb2->setObjectName( "vl_gb2" );
+
+    $horizontalLayout->addWidget( $groupBox_2 );
+
+    my $groupBox_3 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_3} = $groupBox_3;
+    $groupBox_3->setObjectName( "groupBox_3" );
+    my $vl_gb3 = Qt::VBoxLayout( $groupBox_3 );
+    $self->{vl_gb3} = $vl_gb3;
+    $vl_gb3->setObjectName( "vl_gb3" );
+
+    $horizontalLayout->addWidget( $groupBox_3 );
+
+    my $groupBox_4 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_4} = $groupBox_4;
+    $groupBox_4->setObjectName( "groupBox_4" );
+    my $vl_gb4 = Qt::VBoxLayout( $groupBox_4 );
+    $self->{vl_gb4} = $vl_gb4;
+    $vl_gb4->setObjectName( "vl_gb4" );
+
+    $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 $groupBox_6 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_6} = $groupBox_6;
+    $groupBox_6->setObjectName( "groupBox_6" );
+    my $vl_gb6 = Qt::VBoxLayout( $groupBox_6 );
+    $self->{vl_gb6} = $vl_gb6;
+    $vl_gb6->setObjectName( "vl_gb6" );
+
+    $horizontalLayout->addWidget( $groupBox_6 );
+
+
+
+#     my $groupBox_4 = Qt::GroupBox( $centralwidget );
+#     $self->{groupBox_4} = $groupBox_4;
+#     $groupBox_4->setObjectName( "groupBox_4" );
+# 
+#     #$groupBox_3->setCheckable(1);
+#     #$groupBox_3->setChecked(0);
+#     $groupBox_4->hide();
+# 
+# 
+#     my $vl_gb4 = Qt::VBoxLayout( $groupBox_4 );
+#     $self->{vl_gb4} = $vl_gb4;
+#     $vl_gb4->setObjectName( "vl_gb4" );
+# 
+#     $horizontalLayout->addWidget( $groupBox_4 );
+# 
+# 
+# 
+    my $vl_top = Qt::VBoxLayout( );
+    $self->{vl_top} = $vl_top;
+    $vl_top->setObjectName( "vl_top" );
+    $vl_top->setContentsMargins(0, 0, 0, 0 );
+
+    $vl_mw->addLayout($vl_top);
+    $vl_mw->addLayout($horizontalLayout);
+# 
+# 
+# #    my $pushButton = Qt::PushButton( $centralwidget );
+# #    $self->{pushButton} = $pushButton;
+# #    $pushButton->setObjectName( "pushButton" );
+# 
+# #    my $sizePolicy = Qt::SizePolicy( Qt::SizePolicy::Minimum(), Qt::SizePolicy::Fixed() );
+# #    $self->{$sizePolicy} = $sizePolicy;
+# #    $sizePolicy->setHorizontalStretch( 0 );
+# #    $sizePolicy->setVerticalStretch( 0 );
+# #    $sizePolicy->setHeightForWidth( $pushButton->sizePolicy()->hasHeightForWidth() );
+# #    $pushButton->setSizePolicy( $sizePolicy );
+# #    $pushButton->setMinimumSize( Qt::Size(0, 0) );
+# #    my $icon = Qt::Icon;
+# #    $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+# #    $icon->addPixmap(Qt::Pixmap("close_window.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+#     #$icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-system-login.png"), Qt::Icon::Normal(), Qt::Icon::On() );
+# #    $pushButton->setIcon( $icon );
+# #    $pushButton->setIconSize( Qt::Size(50, 50) );
+# 
+# #    $vl_top->addWidget( $pushButton );
+# 
+#     my $checkBox = Qt::CheckBox( $centralwidget );
+#     $self->{checkBox} = $checkBox;
+#     $checkBox->setObjectName( "checkBox" );
+# 
+#     $vl_top->addWidget( $checkBox );
+
+    $mainWindow->setCentralWidget( $centralwidget );
+    my $menubar = Qt::MenuBar( $mainWindow );
+    $self->{menubar} = $menubar;
+    $menubar->setObjectName( "menubar" );
+    #$menubar->setGeometry( Qt::Rect(0, 0, 800, 25) );
+    $mainWindow->setMenuBar( $menubar );
+    my $statusbar = Qt::StatusBar( $mainWindow );
+    $self->{statusbar} = $statusbar;
+    $statusbar->setObjectName( "statusbar" );
+    $mainWindow->setStatusBar( $statusbar );
+
+    $self->retranslateUi( $mainWindow );
+
+
+    my $cur_button_number = 0;
+
+    my $dir;
+    my $buttons = [];
+
+
+    make_buttons($self, "S1", \$cur_button_number, $groupBox_1, $vl_gb1);
+    make_buttons($self, "S2", \$cur_button_number, $groupBox_2, $vl_gb2);
+    make_buttons($self, "S3", \$cur_button_number, $groupBox_3, $vl_gb3);
+    make_buttons($self, "S4", \$cur_button_number, $groupBox_4, $vl_gb4);
+    make_buttons($self, "S5", \$cur_button_number, $groupBox_5, $vl_gb5);
+    make_buttons($self, "S6", \$cur_button_number, $groupBox_6, $vl_gb6);
+    #print "cur_button: $cur_button_number\n";
+
+    #$layoutWidget->updateGeometry();
+
+
+#    Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+
+
+#     Qt::Object::connect($checkBox, SIGNAL 'stateChanged(int)' ,
+#                     this, SLOT 'hide_expert_checked(int)' );
+
+    Qt::MetaObject::connectSlotsByName( $mainWindow );
+
+    return $self;
+
+}
+
+
+sub retranslateUi {
+    my ( $self, $mainWindow ) = @_;
+    $mainWindow->setWindowTitle( Qt::Application::translate( 'MainWindow', "MDC High Voltage Ramping", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_1}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 1", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_2}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 2", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_3}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 3", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_4}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 4", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_5}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 5", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_6}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 6", 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() ) );
+
+
+} # retranslateUi
+
+
+
+
+sub make_buttons {
+  (my $self, my $dir, my $r_current_button_number, my $bgrp, my $layout) = @_;
+
+  #print  $bgrp;
+  #print "current number_; $r_current_button_number\n";
+
+  my $c = qq"find $dir -maxdepth 1 -type f| sort";
+  my @f = qx($c);
+
+  my $i = $$r_current_button_number;
+
+  my $button_list=[];
+
+  foreach (@f) {
+    next if /.png$/i;
+    chomp;
+    s/.*\///;
+    next if /\~$/;
+    push @$button_list, $_;
+    my $br = $self->{ra_buttons};
+    push @{$br}, $_;
+  }
+
+
+
+
+  foreach my $cur_button_name (@$button_list) {
+
+
+    next if ($cur_button_name =~ /.png$/);
+#    my $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+    my $icon_path = "$dir/$cur_button_name" . ".png";
+#    print "path: $icon_path_file \n";
+#    my $fh_icon;
+#    my $res = open($fh_icon, "<", $icon_path_file);
+#    my @file  = <$fh_icon>;
+#    $fh_icon->close();
+
+    #/usr/share/icons/hicolor/48x48/apps/
+#    my ($icon_name) = grep /Icon=/, @file;
+#    $icon_name =~ s/Icon=//;
+#    my $icon_path = "/usr/share/icons/hicolor/48x48/apps/$icon_name";
+#    print "got icon path: $icon_path \n";
+
+
+    my $name = $cur_button_name;
+    $name =~ s/^\d+_//;
+    $name =~ s/_/ /g;
+
+
+    my $com = qq|
+my \$pb$i = Qt::PushButton("$cur_button_name", \$bgrp);
+\$self->{pb$i} = \$pb$i;
+\$layout->addWidget( \$pb$i );
+\$pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef,
+                                               Qt::Application::UnicodeUTF8() ) );
+
+my \$icon$i = Qt::Icon;
+\$icon$i->addPixmap(Qt::Pixmap(\"$icon_path\"), Qt::Icon::Normal(), Qt::Icon::Off() );
+
+\$pb$i->setIcon( \$icon$i );
+\$pb$i->setIconSize( Qt::Size(50, 50) );
+
+|;
+
+
+#    my $pb_$i = Qt::PushButton("$_", \$bgrp);
+#   $self->{pb$i} = $pb_$i;
+#    $layout->addWidget( $pb_$i );
+#    $pushButton->setIcon( $icon );
+#    $pushButton->setIconSize( Qt::Size(50, 50) );
+#    $pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef, Qt::Application::UnicodeUTF8() ) );
+
+
+#/usr/share/icons/hicolor/48x48/apps/yast-bootloader.png
+
+    #   print "command1: $com\n";
+
+    #print "command: $com\n";
+    eval $com;
+    print "$@\n" if ($@);
+
+
+#my $iconstr = "$icon" . "$i";
+
+$com = qq |
+|;
+
+
+
+    #Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+    $com = qq|Qt::Object::connect(\$self->{pb$i}, SIGNAL 'clicked()', this, SLOT 'slot| . $i . qq|Pressed()');|;
+    #print "command2: $com\n";
+    eval $com;
+    print "error: " , $@ , "\n" if ($@);
+
+    make_subroutine($i, $dir);
+
+    $i++;
+    #last if $i >=10;
+  }
+
+  $$r_current_button_number = $i;
+}
+
+
+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(\$c); }|;
+#    my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|;
+#system(\$c); }|;
+    #print "sub: $str\n";
+    eval $str;
+}
+
+
+# sub slotQuitPressed {
+#     exit;
+# }
+
+#sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); }
+
+
+1;
diff --git a/control/mdcHVgui/S1/Plane_1 b/control/mdcHVgui/S1/Plane_1
new file mode 100755 (executable)
index 0000000..f9933bf
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..987f338
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..4b87a31
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..ff61089
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..fba21e0
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..b9a8d22
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..9b68358
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..b6c1cbd
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..d3a8876
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..b282f91
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..f7b96ef
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..2148e5e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..1a89d0f
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..dd7e0a4
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..c71eef6
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..ff91576
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..c11bd40
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..34caeb5
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..195d1c5
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..6afbb24
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..f444d4c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..e95cc9e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..4873ff0
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  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
new file mode 100755 (executable)
index 0000000..a1d3f6b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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 "
+  source /home/hadaq/.bashrc
+  echo \"  <Startup> Connected to hadesdaq02...\"
+  cd /home/hadaq/trbsoft/mdc/
+  ./mdc_ramping.pl 4 6
+  sleep 5
+"
+'
+
+
diff --git a/control/mdcHVgui/call_programs2.pl b/control/mdcHVgui/call_programs2.pl
new file mode 100755 (executable)
index 0000000..360b8c8
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+package main;
+
+use warnings;
+use strict;
+use QtCore4;
+use QtGui4;
+use Buttons2;
+
+sub main {
+
+  my $a = Qt::Application(\@ARGV);
+  my $w = Qt::MainWindow;
+  my $u = Buttons2($w);
+  $w->show();
+  exit $a->exec();
+}
+
+
+main();
+
diff --git a/control/mdcLVgui/Buttons2.pm b/control/mdcLVgui/Buttons2.pm
new file mode 100755 (executable)
index 0000000..9bd65f0
--- /dev/null
@@ -0,0 +1,399 @@
+package Buttons2;
+
+use strict;
+use warnings;
+
+use QtCore4 ;
+use QtGui4;
+
+use Data::Dumper;
+use QtCore4::debug qw(ambiguous);
+
+
+#use Qt::isa qw(Qt::Widget);
+#use QtCore4::isa qw(Qt::Widget);
+#use QtCore4;
+
+use QtCore4::isa qw( Qt::Widget );
+
+use QtCore4::slots
+    hide_expert_checked => ['int'];
+
+
+sub groupBox_3 {
+    return shift->{groupBox_3};
+}
+
+sub hide_expert_checked {
+    my ( $state)  = @_;
+
+    if($state == Qt::Unchecked()) {
+      this->{self}->{groupBox_4}->hide();
+    }
+    else {
+      this->{self}->{groupBox_4}->show();
+    }
+}
+
+
+use Data::Dumper;
+
+
+
+# # make slots
+my $str;
+$str = "use QtCore4::slots\n slotQuitPressed => [], ";
+foreach my $i (0..150) {
+  $str .= " slot". $i . "Pressed => [], ";
+}
+$str .= "slotdummyPressed => [];";
+
+#print "will eval command: $str\n";
+eval $str;
+#print "error: $@\n";
+
+
+# }
+
+
+
+sub NEW {
+    my ( $class, $mainWindow ) = @_;
+    $class->SUPER::NEW($mainWindow);
+
+    my $self = bless {}, $class;
+
+    this->{self} = $self;
+
+    $self->{ra_buttons} = [];
+
+    #print "self: "; print Dumper $self;
+    #print "this: "; print Dumper this;
+
+    #my $self = $mainWindow;
+    if ( !defined $mainWindow->objectName() ) {
+        $mainWindow->setObjectName( "mainWindow" );
+    }
+    #$mainWindow->resize( 800, 600 );
+    #$mainWindow->resize( 400, 300 );
+
+    #$self->{hide_expert_checked} = hide_expert_checked;
+
+    my $centralwidget = Qt::Widget( $mainWindow );
+    $self->{centralwidget} = $centralwidget;
+    $centralwidget->setObjectName( "centralwidget" );
+
+    my $vl_mw = Qt::VBoxLayout( $centralwidget );
+
+#    my $layoutWidget = Qt::Widget( $centralwidget );
+#    $self->{layoutWidget} = $layoutWidget;
+#    $layoutWidget->setObjectName( "layoutWidget" );
+    #$layoutWidget->setGeometry( Qt::Rect(30, 110, 723, 418) );
+#    my $horizontalLayout = Qt::HBoxLayout( $centralwidget );
+    my $horizontalLayout = Qt::HBoxLayout( );
+    $self->{horizontalLayout} = $horizontalLayout;
+    $horizontalLayout->setObjectName( "horizontalLayout" );
+    $horizontalLayout->setContentsMargins(0, 0, 0, 0 );
+
+    #$horizontalLayout->addStretch(1);
+
+    my $groupBox_1 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_1} = $groupBox_1;
+    $groupBox_1->setObjectName( "groupBox_1" );
+    my $vl_gb1 = Qt::VBoxLayout( $groupBox_1 );
+    $self->{vl_gb1} = $vl_gb1;
+    $vl_gb1->setObjectName( "vl_gb1" );
+
+
+
+    $horizontalLayout->addWidget( $groupBox_1 );
+
+
+    my $groupBox_2 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_2} = $groupBox_2;
+    $groupBox_2->setObjectName( "groupBox_2" );
+    my $vl_gb2 = Qt::VBoxLayout( $groupBox_2 );
+    $self->{vl_gb2} = $vl_gb2;
+    $vl_gb2->setObjectName( "vl_gb2" );
+
+    $horizontalLayout->addWidget( $groupBox_2 );
+
+    my $groupBox_3 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_3} = $groupBox_3;
+    $groupBox_3->setObjectName( "groupBox_3" );
+    my $vl_gb3 = Qt::VBoxLayout( $groupBox_3 );
+    $self->{vl_gb3} = $vl_gb3;
+    $vl_gb3->setObjectName( "vl_gb3" );
+
+    $horizontalLayout->addWidget( $groupBox_3 );
+
+    my $groupBox_4 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_4} = $groupBox_4;
+    $groupBox_4->setObjectName( "groupBox_4" );
+    my $vl_gb4 = Qt::VBoxLayout( $groupBox_4 );
+    $self->{vl_gb4} = $vl_gb4;
+    $vl_gb4->setObjectName( "vl_gb4" );
+
+    $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 $groupBox_6 = Qt::GroupBox( $centralwidget );
+    $self->{groupBox_6} = $groupBox_6;
+    $groupBox_6->setObjectName( "groupBox_6" );
+    my $vl_gb6 = Qt::VBoxLayout( $groupBox_6 );
+    $self->{vl_gb6} = $vl_gb6;
+    $vl_gb6->setObjectName( "vl_gb6" );
+
+    $horizontalLayout->addWidget( $groupBox_6 );
+
+
+
+#     my $groupBox_4 = Qt::GroupBox( $centralwidget );
+#     $self->{groupBox_4} = $groupBox_4;
+#     $groupBox_4->setObjectName( "groupBox_4" );
+# 
+#     #$groupBox_3->setCheckable(1);
+#     #$groupBox_3->setChecked(0);
+#     $groupBox_4->hide();
+# 
+# 
+#     my $vl_gb4 = Qt::VBoxLayout( $groupBox_4 );
+#     $self->{vl_gb4} = $vl_gb4;
+#     $vl_gb4->setObjectName( "vl_gb4" );
+# 
+#     $horizontalLayout->addWidget( $groupBox_4 );
+# 
+# 
+# 
+    my $vl_top = Qt::VBoxLayout( );
+    $self->{vl_top} = $vl_top;
+    $vl_top->setObjectName( "vl_top" );
+    $vl_top->setContentsMargins(0, 0, 0, 0 );
+
+    $vl_mw->addLayout($vl_top);
+    $vl_mw->addLayout($horizontalLayout);
+# 
+# 
+# #    my $pushButton = Qt::PushButton( $centralwidget );
+# #    $self->{pushButton} = $pushButton;
+# #    $pushButton->setObjectName( "pushButton" );
+# 
+# #    my $sizePolicy = Qt::SizePolicy( Qt::SizePolicy::Minimum(), Qt::SizePolicy::Fixed() );
+# #    $self->{$sizePolicy} = $sizePolicy;
+# #    $sizePolicy->setHorizontalStretch( 0 );
+# #    $sizePolicy->setVerticalStretch( 0 );
+# #    $sizePolicy->setHeightForWidth( $pushButton->sizePolicy()->hasHeightForWidth() );
+# #    $pushButton->setSizePolicy( $sizePolicy );
+# #    $pushButton->setMinimumSize( Qt::Size(0, 0) );
+# #    my $icon = Qt::Icon;
+# #    $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+# #    $icon->addPixmap(Qt::Pixmap("close_window.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+#     #$icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-system-login.png"), Qt::Icon::Normal(), Qt::Icon::On() );
+# #    $pushButton->setIcon( $icon );
+# #    $pushButton->setIconSize( Qt::Size(50, 50) );
+# 
+# #    $vl_top->addWidget( $pushButton );
+# 
+#     my $checkBox = Qt::CheckBox( $centralwidget );
+#     $self->{checkBox} = $checkBox;
+#     $checkBox->setObjectName( "checkBox" );
+# 
+#     $vl_top->addWidget( $checkBox );
+
+    $mainWindow->setCentralWidget( $centralwidget );
+    my $menubar = Qt::MenuBar( $mainWindow );
+    $self->{menubar} = $menubar;
+    $menubar->setObjectName( "menubar" );
+    #$menubar->setGeometry( Qt::Rect(0, 0, 800, 25) );
+    $mainWindow->setMenuBar( $menubar );
+    my $statusbar = Qt::StatusBar( $mainWindow );
+    $self->{statusbar} = $statusbar;
+    $statusbar->setObjectName( "statusbar" );
+    $mainWindow->setStatusBar( $statusbar );
+
+    $self->retranslateUi( $mainWindow );
+
+
+    my $cur_button_number = 0;
+
+    my $dir;
+    my $buttons = [];
+
+
+    make_buttons($self, "S0", \$cur_button_number, $groupBox_1, $vl_gb1);
+    make_buttons($self, "S1", \$cur_button_number, $groupBox_2, $vl_gb2);
+    make_buttons($self, "S2", \$cur_button_number, $groupBox_3, $vl_gb3);
+    make_buttons($self, "S3", \$cur_button_number, $groupBox_4, $vl_gb4);
+    make_buttons($self, "S4", \$cur_button_number, $groupBox_5, $vl_gb5);
+    make_buttons($self, "S5", \$cur_button_number, $groupBox_6, $vl_gb6);
+    #print "cur_button: $cur_button_number\n";
+
+    #$layoutWidget->updateGeometry();
+
+
+#    Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+
+
+#     Qt::Object::connect($checkBox, SIGNAL 'stateChanged(int)' ,
+#                     this, SLOT 'hide_expert_checked(int)' );
+
+    Qt::MetaObject::connectSlotsByName( $mainWindow );
+
+    return $self;
+
+}
+
+
+sub retranslateUi {
+    my ( $self, $mainWindow ) = @_;
+    $mainWindow->setWindowTitle( Qt::Application::translate( 'MainWindow', "MDC LV Powercycle", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_1}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 0", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_2}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 1", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_3}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 2", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_4}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 3", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_5}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 4", undef, Qt::Application::UnicodeUTF8() ) );
+    $self->{groupBox_6}->setTitle( Qt::Application::translate( 'MainWindow', "Sector 5", 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() ) );
+
+
+} # retranslateUi
+
+
+
+
+sub make_buttons {
+  (my $self, my $dir, my $r_current_button_number, my $bgrp, my $layout) = @_;
+
+  #print  $bgrp;
+  #print "current number_; $r_current_button_number\n";
+
+  my $c = qq"find $dir -maxdepth 1 -type f| sort";
+  my @f = qx($c);
+
+  my $i = $$r_current_button_number;
+
+  my $button_list=[];
+
+  foreach (@f) {
+    next if /.png$/i;
+    chomp;
+    s/.*\///;
+    next if /\~$/;
+    push @$button_list, $_;
+    my $br = $self->{ra_buttons};
+    push @{$br}, $_;
+  }
+
+
+
+
+  foreach my $cur_button_name (@$button_list) {
+
+
+    next if ($cur_button_name =~ /.png$/);
+#    my $icon->addPixmap(Qt::Pixmap("/usr/share/icons/oxygen/64x64/apps/preferences-desktop-icons.png"), Qt::Icon::Normal(), Qt::Icon::Off() );
+    my $icon_path = "$dir/$cur_button_name" . ".png";
+#    print "path: $icon_path_file \n";
+#    my $fh_icon;
+#    my $res = open($fh_icon, "<", $icon_path_file);
+#    my @file  = <$fh_icon>;
+#    $fh_icon->close();
+
+    #/usr/share/icons/hicolor/48x48/apps/
+#    my ($icon_name) = grep /Icon=/, @file;
+#    $icon_name =~ s/Icon=//;
+#    my $icon_path = "/usr/share/icons/hicolor/48x48/apps/$icon_name";
+#    print "got icon path: $icon_path \n";
+
+
+    my $name = $cur_button_name;
+    $name =~ s/^\d+_//;
+    $name =~ s/_/ /g;
+
+
+    my $com = qq|
+my \$pb$i = Qt::PushButton("$cur_button_name", \$bgrp);
+\$self->{pb$i} = \$pb$i;
+\$layout->addWidget( \$pb$i );
+\$pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef,
+                                               Qt::Application::UnicodeUTF8() ) );
+
+my \$icon$i = Qt::Icon;
+\$icon$i->addPixmap(Qt::Pixmap(\"$icon_path\"), Qt::Icon::Normal(), Qt::Icon::Off() );
+
+\$pb$i->setIcon( \$icon$i );
+\$pb$i->setIconSize( Qt::Size(50, 50) );
+
+|;
+
+
+#    my $pb_$i = Qt::PushButton("$_", \$bgrp);
+#   $self->{pb$i} = $pb_$i;
+#    $layout->addWidget( $pb_$i );
+#    $pushButton->setIcon( $icon );
+#    $pushButton->setIconSize( Qt::Size(50, 50) );
+#    $pb$i->setText (  Qt::Application::translate( 'MainWindow', "$name", undef, Qt::Application::UnicodeUTF8() ) );
+
+
+#/usr/share/icons/hicolor/48x48/apps/yast-bootloader.png
+
+    #   print "command1: $com\n";
+
+    #print "command: $com\n";
+    eval $com;
+    print "$@\n" if ($@);
+
+
+#my $iconstr = "$icon" . "$i";
+
+$com = qq |
+|;
+
+
+
+    #Qt::Object::connect($pushButton, SIGNAL 'clicked()' , $mainWindow, SLOT 'close()' );
+    $com = qq|Qt::Object::connect(\$self->{pb$i}, SIGNAL 'clicked()', this, SLOT 'slot| . $i . qq|Pressed()');|;
+    #print "command2: $com\n";
+    eval $com;
+    print "error: " , $@ , "\n" if ($@);
+
+    make_subroutine($i, $dir);
+
+    $i++;
+    #last if $i >=10;
+  }
+
+  $$r_current_button_number = $i;
+}
+
+
+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 \\<I\\> Powercycle in '.$dir.'/'.this->{self}->{ra_buttons}->[$i]); system(\$c); }|;
+#    my $str = qq|sub slot| . $i . qq|Pressed { print "$i pressed\n"; }|;
+#system(\$c); }|;
+    #print "sub: $str\n";
+    eval $str;
+}
+
+
+# sub slotQuitPressed {
+#     exit;
+# }
+
+#sub slot0Pressed { my $c = buttons->[0]; $c = "cd ../control; ./$c"; print "will execute: $c\n"; qx($c); }
+
+
+1;
diff --git a/control/mdcLVgui/S0/200x b/control/mdcLVgui/S0/200x
new file mode 100755 (executable)
index 0000000..5804121
--- /dev/null
@@ -0,0 +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
diff --git a/control/mdcLVgui/S0/210x b/control/mdcLVgui/S0/210x
new file mode 100755 (executable)
index 0000000..46f2eb7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S0/220x b/control/mdcLVgui/S0/220x
new file mode 100755 (executable)
index 0000000..422f613
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
+
diff --git a/control/mdcLVgui/S0/230x b/control/mdcLVgui/S0/230x
new file mode 100755 (executable)
index 0000000..3400905
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
+
+
diff --git a/control/mdcLVgui/S0/Plane_0 b/control/mdcLVgui/S0/Plane_0
new file mode 100755 (executable)
index 0000000..5804121
--- /dev/null
@@ -0,0 +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
diff --git a/control/mdcLVgui/S0/Plane_1 b/control/mdcLVgui/S0/Plane_1
new file mode 100755 (executable)
index 0000000..46f2eb7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S0/Plane_2 b/control/mdcLVgui/S0/Plane_2
new file mode 100755 (executable)
index 0000000..422f613
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
+
diff --git a/control/mdcLVgui/S0/Plane_3 b/control/mdcLVgui/S0/Plane_3
new file mode 100755 (executable)
index 0000000..3400905
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
+
+
diff --git a/control/mdcLVgui/S1/201x b/control/mdcLVgui/S1/201x
new file mode 100755 (executable)
index 0000000..3799388
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S1/211x b/control/mdcLVgui/S1/211x
new file mode 100755 (executable)
index 0000000..ee55a3c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S1/221x b/control/mdcLVgui/S1/221x
new file mode 100755 (executable)
index 0000000..b81ec71
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
+
diff --git a/control/mdcLVgui/S1/231x b/control/mdcLVgui/S1/231x
new file mode 100755 (executable)
index 0000000..6d24b1e
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
+
+
diff --git a/control/mdcLVgui/S1/Plane_0 b/control/mdcLVgui/S1/Plane_0
new file mode 100755 (executable)
index 0000000..3799388
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S1/Plane_1 b/control/mdcLVgui/S1/Plane_1
new file mode 100755 (executable)
index 0000000..ee55a3c
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S1/Plane_2 b/control/mdcLVgui/S1/Plane_2
new file mode 100755 (executable)
index 0000000..b81ec71
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
+
diff --git a/control/mdcLVgui/S1/Plane_3 b/control/mdcLVgui/S1/Plane_3
new file mode 100755 (executable)
index 0000000..6d24b1e
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
+
+
diff --git a/control/mdcLVgui/S2/202x b/control/mdcLVgui/S2/202x
new file mode 100755 (executable)
index 0000000..387e6c1
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S2/212x b/control/mdcLVgui/S2/212x
new file mode 100755 (executable)
index 0000000..a4896e3
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S2/222x b/control/mdcLVgui/S2/222x
new file mode 100755 (executable)
index 0000000..f0affe5
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
+
diff --git a/control/mdcLVgui/S2/232x b/control/mdcLVgui/S2/232x
new file mode 100755 (executable)
index 0000000..ce0233f
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
+
+
diff --git a/control/mdcLVgui/S2/Plane_0 b/control/mdcLVgui/S2/Plane_0
new file mode 100755 (executable)
index 0000000..387e6c1
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S2/Plane_1 b/control/mdcLVgui/S2/Plane_1
new file mode 100755 (executable)
index 0000000..a4896e3
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S2/Plane_2 b/control/mdcLVgui/S2/Plane_2
new file mode 100755 (executable)
index 0000000..f0affe5
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
+
diff --git a/control/mdcLVgui/S2/Plane_3 b/control/mdcLVgui/S2/Plane_3
new file mode 100755 (executable)
index 0000000..ce0233f
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
+
+
diff --git a/control/mdcLVgui/S3/203x b/control/mdcLVgui/S3/203x
new file mode 100755 (executable)
index 0000000..f4ad3fb
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S3/213x b/control/mdcLVgui/S3/213x
new file mode 100755 (executable)
index 0000000..8959932
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S3/223x b/control/mdcLVgui/S3/223x
new file mode 100755 (executable)
index 0000000..bdeb03c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
+
diff --git a/control/mdcLVgui/S3/233x b/control/mdcLVgui/S3/233x
new file mode 100755 (executable)
index 0000000..cbdca2a
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
+
+
diff --git a/control/mdcLVgui/S3/Plane_0 b/control/mdcLVgui/S3/Plane_0
new file mode 100755 (executable)
index 0000000..f4ad3fb
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S3/Plane_1 b/control/mdcLVgui/S3/Plane_1
new file mode 100755 (executable)
index 0000000..8959932
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S3/Plane_2 b/control/mdcLVgui/S3/Plane_2
new file mode 100755 (executable)
index 0000000..bdeb03c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
+
diff --git a/control/mdcLVgui/S3/Plane_3 b/control/mdcLVgui/S3/Plane_3
new file mode 100755 (executable)
index 0000000..cbdca2a
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
+
+
diff --git a/control/mdcLVgui/S4/204x b/control/mdcLVgui/S4/204x
new file mode 100755 (executable)
index 0000000..b2342bf
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S4/214x b/control/mdcLVgui/S4/214x
new file mode 100755 (executable)
index 0000000..912ebf7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S4/224x b/control/mdcLVgui/S4/224x
new file mode 100755 (executable)
index 0000000..a0d620b
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
+
diff --git a/control/mdcLVgui/S4/234x b/control/mdcLVgui/S4/234x
new file mode 100755 (executable)
index 0000000..06b44fc
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
+
+
diff --git a/control/mdcLVgui/S4/Plane_0 b/control/mdcLVgui/S4/Plane_0
new file mode 100755 (executable)
index 0000000..b2342bf
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S4/Plane_1 b/control/mdcLVgui/S4/Plane_1
new file mode 100755 (executable)
index 0000000..912ebf7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S4/Plane_2 b/control/mdcLVgui/S4/Plane_2
new file mode 100755 (executable)
index 0000000..a0d620b
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
+
diff --git a/control/mdcLVgui/S4/Plane_3 b/control/mdcLVgui/S4/Plane_3
new file mode 100755 (executable)
index 0000000..06b44fc
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 1'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
+
+
diff --git a/control/mdcLVgui/S5/205x b/control/mdcLVgui/S5/205x
new file mode 100755 (executable)
index 0000000..f1b9351
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S5/215x b/control/mdcLVgui/S5/215x
new file mode 100755 (executable)
index 0000000..79e7b67
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S5/225x b/control/mdcLVgui/S5/225x
new file mode 100755 (executable)
index 0000000..25b042f
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
+
diff --git a/control/mdcLVgui/S5/235x b/control/mdcLVgui/S5/235x
new file mode 100755 (executable)
index 0000000..42783d3
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
+
+
diff --git a/control/mdcLVgui/S5/Plane_0 b/control/mdcLVgui/S5/Plane_0
new file mode 100755 (executable)
index 0000000..f1b9351
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S5/Plane_1 b/control/mdcLVgui/S5/Plane_1
new file mode 100755 (executable)
index 0000000..79e7b67
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S5/Plane_2 b/control/mdcLVgui/S5/Plane_2
new file mode 100755 (executable)
index 0000000..25b042f
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
+
diff --git a/control/mdcLVgui/S5/Plane_3 b/control/mdcLVgui/S5/Plane_3
new file mode 100755 (executable)
index 0000000..42783d3
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 2'"
+sleep 5
+command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
+
+
diff --git a/control/mdcLVgui/call_programs2.pl b/control/mdcLVgui/call_programs2.pl
new file mode 100755 (executable)
index 0000000..360b8c8
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+package main;
+
+use warnings;
+use strict;
+use QtCore4;
+use QtGui4;
+use Buttons2;
+
+sub main {
+
+  my $a = Qt::Application(\@ARGV);
+  my $w = Qt::MainWindow;
+  my $u = Buttons2($w);
+  $w->show();
+  exit $a->exec();
+}
+
+
+main();
+