]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
added direction option, mt
authorMichael Traxler <M.Traxler@gsi.de>
Mon, 1 Mar 2021 22:24:54 +0000 (23:24 +0100)
committerMichael Traxler <M.Traxler@gsi.de>
Mon, 1 Mar 2021 22:24:54 +0000 (23:24 +0100)
thresholds/run_thresh_on_system.pl

index c2ae259458989871f01c32170b06fc51f5a309d2..82d79820e34d6df1ccce938576bfc9122f1baa53 100755 (executable)
@@ -17,7 +17,8 @@ my @opt_endpoints;
 my @opt_chains;
 my $opt_offset = 0;
 my $opt_polarity = 0;
-my $opt_32channel = 0;
+my $default_direction = 0;
+my $opt_32channel = 1;
 my $opt_finetune = false;
 my $opt_sequential = false;
 my $mode = "padiwa";
@@ -30,6 +31,7 @@ GetOptions ('h|help'        => \$opt_help,
             'c|chains=s'    => \@opt_chains,
             'o|offset=s'    => \$opt_offset,
             'p|polarity=i'  => \$opt_polarity,
+            'd|direction=i' => \$default_direction,
             '32|32channel'  => \$opt_32channel,
             'f|finetune'    => \$opt_finetune,
             's|sequential'    => \$opt_sequential,
@@ -79,7 +81,7 @@ my %pids;
 foreach my $endpoint (@$endpoints) {
   foreach my $chain (@$chains) {
     my $endpoint = sprintf("0x%04x", $endpoint);
-    $command = "$tool --endpoint $endpoint --offset $opt_offset --chain $chain --polarity $opt_polarity --mode=$mode $opt_32channel $opt_finetune";
+    $command = "$tool --endpoint $endpoint --offset $opt_offset --chain $chain --polarity $opt_polarity --direction=$default_direction --mode=$mode $opt_32channel $opt_finetune";
     print "command: $command\n";
 
     if($opt_sequential) {
@@ -160,11 +162,9 @@ usage:
 run_threshold_on_system.pl |options]
 
 example:
-run_threshold_on_system.pl --endpoints=0x301-0x308,0x310..0x315,0x380 --chains=0..3 --offset=4 --polarity=0
+run_threshold_on_system.pl --endpoints=0x301-0x308,0x310..0x315,0x380 --chains=0..3 --offset=4 --polarity=0 --direction=1 
 will run for endpoints 0x301-0x308 and 0x310-0x315 and 0x380 for all chains (0..3)
 
-read the code....
-
 EOF
 
 }