From: Maps Date: Tue, 20 Aug 2019 07:32:02 +0000 (+0200) Subject: multiple changes as found in working copy X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=c35e59cc25412841457247177fc7980b283d980e;p=mvdsensorcontrol.git multiple changes as found in working copy --- diff --git a/tools/init_setup.pl b/tools/init_setup.pl index 7b95e7f..a317947 100755 --- a/tools/init_setup.pl +++ b/tools/init_setup.pl @@ -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; } diff --git a/tools/init_system.pl b/tools/init_system.pl index ff12b84..33bbcc9 100755 --- a/tools/init_system.pl +++ b/tools/init_system.pl @@ -1,6 +1,9 @@ #!/usr/bin/perl use warnings; + +#use lib "."; + use File::chdir; use XML::LibXML; # use Getopt::Long; diff --git a/tools/preview/exec_evtbuild_t.pl b/tools/preview/exec_evtbuild_t.pl index 599d83c..2d43d49 100755 --- a/tools/preview/exec_evtbuild_t.pl +++ b/tools/preview/exec_evtbuild_t.pl @@ -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"); diff --git a/tools/testgui.pl b/tools/testgui.pl index 01b063d..1718f71 100755 --- a/tools/testgui.pl +++ b/tools/testgui.pl @@ -7,6 +7,8 @@ my $me = "testgui.pl"; +use lib "."; + use strict; use warnings; use XML::LibXML; diff --git a/tools/unpacker/Makefile b/tools/unpacker/Makefile index 016d12a..45bfa56 100644 --- a/tools/unpacker/Makefile +++ b/tools/unpacker/Makefile @@ -1,4 +1,4 @@ -DABCSYS = /d/jspc22/dabc +DABCSYS = /d/jspc57/dabc include $(DABCSYS)/config/Makefile.config diff --git a/tools/unpacker/run.sh b/tools/unpacker/run.sh index 2187308..b1be4d6 100755 --- a/tools/unpacker/run.sh +++ b/tools/unpacker/run.sh @@ -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 diff --git a/tools/xml2ini.pl b/tools/xml2ini.pl index cba5898..3f16197 100755 --- a/tools/xml2ini.pl +++ b/tools/xml2ini.pl @@ -2,6 +2,9 @@ use strict; use warnings; + +use lib "."; + use XML::LibXML; use POSIX; use Getopt::Long;