From: hadaq Date: Sat, 9 May 2015 19:01:05 +0000 (+0200) Subject: added verbose more, mt X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=50998c3d42c8cb349df47c26b4eef4ebf6de712a;p=daqtools.git added verbose more, mt --- diff --git a/users/gsi_dirc/prepare_padiwas_invert_leds.pl b/users/gsi_dirc/prepare_padiwas_invert_leds.pl index b7cd5bb..bc4cc55 100755 --- a/users/gsi_dirc/prepare_padiwas_invert_leds.pl +++ b/users/gsi_dirc/prepare_padiwas_invert_leds.pl @@ -42,16 +42,20 @@ my $pm = Parallel::ForkManager->new($MAX_PROCESSES); my $str_endpoints= join " ", @opt_endpoints; print "current padiwa range: $str_endpoints\n"; + print "\tsetting padiwa invert-setting to $opt_invert "; execute_command("invert $opt_invert"); $pm->wait_all_children; print "\n"; +#print "result of invert\n"; +#execute_command("invert", "verbose"); +#exit -print "\tturn off all leds "; -execute_command("led 0x10"); -$pm->wait_all_children; -print "\n"; +# print "\tturn off all leds "; +# execute_command("led 0x10"); +# $pm->wait_all_children; +# print "\n"; print "\tset temp compensation to 0x02c0 "; @@ -72,7 +76,7 @@ exit; sub execute_command { - (my $padiwa_command) = @_; + (my $padiwa_command, my $verbosity) = @_; foreach my $cur_endpoint (@$endpoints) { my $pid = $pm->start and next; @@ -80,9 +84,11 @@ sub execute_command { #print "$cur_endpoint "; for my $chain (0..2) { - my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $cur_endpoint $chain $padiwa_command >/dev/null"; + my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $cur_endpoint $chain $padiwa_command"; + if (!$verbosity) { $c.= " >/dev/null" }; #print $c . "\n"; - qx($c); die "could not execute command $c" if $?; + my $res = qx($c); die "could not execute command $c" if $?; + if($verbosity) { print "$res"; } } $pm->finish; # Terminates the child process