]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
corrected help text and added direction argument, mt
authorMichael Traxler <M.Traxler@gsi.de>
Wed, 16 Jun 2021 01:00:40 +0000 (03:00 +0200)
committerMichael Traxler <M.Traxler@gsi.de>
Wed, 16 Jun 2021 01:00:40 +0000 (03:00 +0200)
thresholds/write_thresholds.pl

index e090ab613221a6b35ebffcc753ba77d4e5a85ce0..88d786d8f0b459ff91a2027149a044c6a35654e8 100755 (executable)
@@ -12,11 +12,13 @@ use POSIX qw(strftime);
 my $offset = 0;
 my $help;
 my $mode="padiwa";
+my $direction=1;
 
 my $result = GetOptions (
     "h|help" => \$help,
     "o|offset=s" => \$offset,
     "m|mode=s" => \$mode,
+    "d|direction=i" => \$direction,
     );
 
 if($help) {
@@ -36,7 +38,7 @@ if ($offset) {
   }
   else {
     die "wrong number format for offset parameter: \"$offset\"" unless $offset =~ /^\d+$/;
-    $offset = int($offset) * $sign;
+    $offset = $direction * int($offset) * $sign;
   }
 
   #print "called with offset: $offset\n";
@@ -158,7 +160,7 @@ sub send_command_error {
 sub usage {
 
   print <<EOF;
-usage: write_thresholds.pl [--help] [offset=<offset in hex or decimal>] [--mode=<"padiwa"|"cbmrich">] <filename of threshold results>
+usage: write_thresholds.pl [--help] [offset=<offset in hex or decimal>] [--mode=<"padiwa"|"cbmrich"|"dirich2">] <filename of threshold results>
 
 example:
 
@@ -170,7 +172,7 @@ increases the thresholds stored in file by the given number.
 filename: 
 has to be in the format of the output of the automatic threshold determination
 
-currently only mode "padiwa" is implemented.
+currently only mode "padiwa" and dirich2 are implemented.
 
 The script puts a timestamp of execution and the timestamp of the thresholds file to threshold_log.txt.
 The script puts the timestamp of the threshold file to billboard_info.