]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
multiple changes as found in working copy
authorMaps <maps@ikf>
Tue, 20 Aug 2019 07:32:02 +0000 (09:32 +0200)
committerMaps <maps@ikf>
Tue, 20 Aug 2019 07:32:02 +0000 (09:32 +0200)
tools/init_setup.pl
tools/init_system.pl
tools/preview/exec_evtbuild_t.pl
tools/testgui.pl
tools/unpacker/Makefile
tools/unpacker/run.sh
tools/xml2ini.pl

index 7b95e7f7a364ce8bd12bec4a09db4cc5fdf710f2..a31794781be2f42d3547f61e4cd202b1a9c6fe7b 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/perl 
 
 use warnings;
+
+use lib ".";
+
 use File::chdir;
 use XML::LibXML;
 use Getopt::Long;
@@ -129,7 +132,7 @@ foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) {
       }
 
       foreach my $cfg ($cursensor->findnodes('JtagConf')) {
-        print STDERR "      Found config\n" if $verbose;
+        print STDERR "      Found config ".$cfg->textContent()."\n" if $verbose;
         push(@{$JtagCommands->{$ctrladdr}},"./ui.pl -b $ctrlname -o ".$cfg->textContent());
         }
       }
@@ -150,7 +153,7 @@ foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) {
       
       
     foreach my $cfg ($curchain->findnodes('JtagConf')) {
-      print STDERR "    Found config\n" if $verbose;
+      print STDERR "    Found config ".$cfg->textContent()."\n" if $verbose;
       push(@{$JtagCommands->{$ctrladdr}},"./ui.pl -b $ctrlname -c $chainname -o ".$cfg->textContent());
       }
     
@@ -158,7 +161,7 @@ foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) {
     sensorini(\@sfile);
     }
   foreach my $cfg ($curctrl->findnodes('JtagConf')) {
-    print STDERR "  Found config\n" if $verbose;
+    print STDERR "  Found config ".$cfg->textContent()."\n" if $verbose;
     push(@{$JtagCommands->{$ctrladdr}},"./ui.pl -b $ctrlname -o ".$cfg->textContent());
     }
   } # end of curctl loop
@@ -167,6 +170,7 @@ foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) {
   
   
 # configure Converter Boards
+print STDERR "Starting to configure Converter Boards\n" if $verbose;
 local $CWD = XMLDBPATH;
 delete $ENV{'QUERY_STRING'}; # make sure put.pl is used in a command line and not in a web context
 foreach my $cmd (@CbCommands){
@@ -177,17 +181,21 @@ foreach my $cmd (@CbCommands){
   execute("echo put.pl $entity $addr $fieldname $value");
   execute("./put.pl $entity $addr $fieldname $value");
 }
+print STDERR "Done configuring Converter Boards\n" if $verbose;
   
 
+print STDERR "Taking care of JtagCommands\n" if $verbose;
 foreach my $ctrladdr (keys %$JtagCommands) {
 
   ###############################
   ## Write ini files
   ###############################  
+  print STDERR "Creating file ".$defaultIniPath."/boards.ini\n" if $verbose;
   my $boardsinifile = FileHandle->new($defaultIniPath."/boards.ini", 'w');
   print $boardsinifile $boardsini->{$ctrladdr};
   $boardsinifile->close();
     
+  print STDERR "Creating file ".$defaultIniPath."/chains.ini\n" if $verbose;
   my $chainsinifile = FileHandle->new($defaultIniPath."/chains.ini", 'w');
   print $chainsinifile $chainsini->{$ctrladdr};
   $chainsinifile->close();
@@ -199,9 +207,12 @@ foreach my $ctrladdr (keys %$JtagCommands) {
 
   local $CWD = $ENV{'JTAGPATH'};
   foreach my $cmd (@{$JtagCommands->{$ctrladdr}}) {
-    execute($cmd);
+    print STDERR "Executing the following command now:\n".$cmd."\n" if $verbose;
+    print execute($cmd);
+    #execute($cmd);
     }
 }
+print STDERR "Done taking care of JtagCommands\n" if $verbose;
 execute("trbcmd w 0xfe4d 0xb00b 1"); #Enable start sensors on next reference time
 execute("trbcmd setbit 0x$cts 0xa101 0x1");# enable CTS trigger source
 execute("trbcmd w 0xfe4d 0xb00b 1"); #Enable start sensors on next reference time
@@ -213,9 +224,11 @@ execute("trbcmd w 0xfe4d 0xb00b 1"); #Enable start sensors on next reference tim
 ## Just another execute sub
 ###############################
 sub execute {
+ # my $cmd = $_[0]." 2>&1";
   my @o;
   @o = qx($_[0]) unless $dryrun;
   print "Not running> $_[0]\n" if $dryrun;
+#  print "running> $_[0]\n" if !$dryrun;
   printreturn(@o) if $verbose;
   }
  
index ff12b84265decb38b9583446343213c2975a355c..33bbcc92f3eb9247190f775d86564b15d3154fe9 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/perl
 
 use warnings;
+
+#use lib ".";
+
 use File::chdir;
 use XML::LibXML;
 # use Getopt::Long;
index 599d83cb9657eee3d64645cccaea8129f60bd8f1..2d43d49db64a2448c1538549a0e666fa0cd5e500 100755 (executable)
@@ -70,6 +70,7 @@ else {
 
 chdir($opt_path);
 
+system("which daq_evtbuild");
 $thr1 = threads->new(\&execute, "timeout -k 2 -s SIGINT ".($time+1.5)." daq_evtbuild -m $c -q 32 -d file -x te -Se -S $opt_system");
 sleep 1;
 $thr2 = threads->new(\&execute, "timeout -k 2 -s SIGINT ".$time." daq_netmem -m $c -q 32 $portoption -S $opt_system");
index 01b063dd8b2989c1a6adff2f4e8b987c240ca763..1718f710338ba76304648e15493d03546d3fd272 100755 (executable)
@@ -7,6 +7,8 @@
 
 my $me = "testgui.pl";
 
+use lib ".";
+
 use strict;
 use warnings;
 use XML::LibXML;
index 016d12a985d25319f19d7087a5ac8f2f4ba86525..45bfa56e63e99351c20c2e3541325610a75805a3 100644 (file)
@@ -1,4 +1,4 @@
-DABCSYS = /d/jspc22/dabc
+DABCSYS = /d/jspc57/dabc
 
 include $(DABCSYS)/config/Makefile.config
 
index 21873084f2cd92d26d19b0efe28537dcfaa26f5b..b1be4d63a6b14c0bb8106a44467ee96bbd21fb95 100755 (executable)
@@ -1,2 +1,2 @@
-export LD_LIBRARY_PATH=/d/jspc22/dabc/lib/:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=/d/jspc57/dabc/lib/:$LD_LIBRARY_PATH
 time ./unpacker/unpacker $1 $2 $3
index cba58988a9f65c9de487918abbe89b9abe8f068f..3f16197c944939ea97110f00c8080d100d8a8a30 100755 (executable)
@@ -2,6 +2,9 @@
 
 use strict;
 use warnings;
+
+use lib ".";
+
 use XML::LibXML;
 use POSIX;
 use Getopt::Long;