]> jspc29.x-matter.uni-frankfurt.de Git - hades_mdc_settings.git/commitdiff
baseline finder counter for nout found baselines
authorc.wendisch <c.wendisch@gsi.de>
Fri, 2 Sep 2022 08:44:33 +0000 (10:44 +0200)
committerc.wendisch <c.wendisch@gsi.de>
Fri, 2 Sep 2022 08:44:33 +0000 (10:44 +0200)
pasttrec/pasttrec_baseline.db
scripts/pasttrec_baseline_finder.pl
serials/serials_mdcmbo.db

index 99d8dbbce870636ccc00bca14b9237dd9d5aca05..f17484602722433768e85778dc85ada6164f696c 100644 (file)
 !Pasttrec Baseline table
 #  Serial  #  PT   #   C0   #   C1   #   C2   #   C3   #   C4   #   C5   #   C6   #   C7   #
 ############################################################################################
-
-   60111        0       30      20      23      28      26      27      27      24
-   60111        1       27      22      30      27      21      29      27      19
-   60111        2       28      62      62      30      62      62      22      62
-   60111        3       22      23      19      23      62      62      24      62
-   60121        0       23      25      16      25      24      29      19      28
-   60121        1       31      25      21      24      24      25      26      28
-   60121        2       24      20      19      24      23      21      30      22
-   60121        3       18      24      26      18      19      25      21      21
-   70121        0       29      26      26      31      29      31      28      62
-   70121        1       25      28      17      16      27      28      22      15
-   70121        2       19      18      28      24      27      25      27      22
-   70121        3       23      22      25      31      12      24      28      24
-   70111        0       20      25      62      62      20      62      62      62
-   70111        1       24      62      25      62      26      24      62      18
-   70111        2       62      24      22      62      28      62      24      28
-   70111        3       62      20      23      62      21      62      19      16
-
-
-
-   60031      0       02     02     02     02     02     02     02     02
-   60031      1       03     03     03     03     03     03     03     03
-   60031      2       04     04     04     04     04     04     04     04
-   60031      3       01     01     01     01     01     01     01     01
-
-   70031      0       02     02     02     02     02     02     02     02
-   70031      1       03     03     03     03     03     03     03     03
-   70031      2       04     04     04     04     04     04     04     04
-   70031      3       01     01     01     01     01     01     01     01
-   
-   60161      0       02     02     02     02     02     02     02     02
-   60161      1       03     03     03     03     03     03     03     03
-   60161      2       04     04     04     04     04     04     04     04
-   60161      3       01     01     01     01     01     01     01     01
-
-   70161      0       02     02     02     02     02     02     02     02
-   70161      1       03     03     03     03     03     03     03     03
-   70161      2       04     04     04     04     04     04     04     04
-   70161      3       01     01     01     01     01     01     01     01
+# 
+#    60111        0       30      20      23      28      26      27      27      24
+#    60111        1       27      22      30      27      21      29      27      19
+#    60111        2       28      62      62      30      62      62      22      62
+#    60111        3       22      23      19      23      62      62      24      62
+#    60121        0       23      25      16      25      24      29      19      28
+#    60121        1       31      25      21      24      24      25      26      28
+#    60121        2       24      20      19      24      23      21      30      22
+#    60121        3       18      24      26      18      19      25      21      21
+#    70121        0       29      26      26      31      29      31      28      62
+#    70121        1       25      28      17      16      27      28      22      15
+#    70121        2       19      18      28      24      27      25      27      22
+#    70121        3       23      22      25      31      12      24      28      24
+#    70111        0       20      25      62      62      20      62      62      62
+#    70111        1       24      62      25      62      26      24      62      18
+#    70111        2       62      24      22      62      28      62      24      28
+#    70111        3       62      20      23      62      21      62      19      16
 
 
-   60011      0       02     02     02     02     02     02     02     02
-   60011      1       03     03     03     03     03     03     03     03
-   60011      2       04     04     04     04     04     04     04     04
-   60011      3       01     01     01     01     01     01     01     01
 
-#    60081      0       0x17     0x16     0x0a     0x1b     0x12     0x18     0x15     0x0e
-#    60081      0       0x1e     0x1e     0x1e     0x1e     0x1e     0x1e     0x1e     0x1e
-#    60081      1       0x14     0x18     0x10     0x16     0x15     0x15     0x16     0x18
-#    60081      2       0x18     0x19     0x15     0x0f     0x1b     0x18     0x19     0x1a
-#    60081      3       0x13     0x14     0x15     0x18     0x18     0x17     0x1b     0x16
+#    60031      0       02     02     02     02     02     02     02     02
+#    60031      1       03     03     03     03     03     03     03     03
+#    60031      2       04     04     04     04     04     04     04     04
+#    60031      3       01     01     01     01     01     01     01     01
 # 
-#    70081      0       0x00     0x16     0x0a     0x1b     0x12     0x16     0x15     0x0e
-#    70081      1       0x14     0x18     0x10     0x16     0x15     0x15     0x16     0x18
-#    70081      2       0x18     0x19     0x15     0x0f     0x1b     0x18     0x19     0x1a
-#    70081      3       0x13     0x14     0x15     0x18     0x18     0x17     0x1b     0x16
-#    
+#    70031      0       02     02     02     02     02     02     02     02
+#    70031      1       03     03     03     03     03     03     03     03
+#    70031      2       04     04     04     04     04     04     04     04
+#    70031      3       01     01     01     01     01     01     01     01
 #    
-#    60121      0       0x00     0x16     0x0a     0x1b     0x12     0x16     0x15     0x0e
-#    60121      1       0x14     0x18     0x10     0x16     0x15     0x15     0x16     0x18
-#    60121      2       0x18     0x19     0x15     0x0f     0x1b     0x18     0x19     0x1a
-#    60121      3       0x13     0x14     0x15     0x18     0x18     0x17     0x1b     0x16
+#    60161      0       02     02     02     02     02     02     02     02
+#    60161      1       03     03     03     03     03     03     03     03
+#    60161      2       04     04     04     04     04     04     04     04
+#    60161      3       01     01     01     01     01     01     01     01
+# 
+#    70161      0       02     02     02     02     02     02     02     02
+#    70161      1       03     03     03     03     03     03     03     03
+#    70161      2       04     04     04     04     04     04     04     04
+#    70161      3       01     01     01     01     01     01     01     01
+# 
+   60011        0       21      16      16      18      19      23      16      21
+   60011        1       18      18      17      16      17      13      14      00
+   60011        2       20      22      21      15      15      18      19      23
+   60011        3       16      20      18      14      21      23      20      23
+   60021        0       25      23      28      00      21      00      24      24
+   60021        1       25      17      15      23      25      18      22      21
+   60021        2       16      13      15      13      20      23      24      20
+   60021        3       19      19      19      14      18      21      19      15
+   70021        0       19      28      17      28      20      29      15      20
+   70021        1       16      17      19      17      15      20      18      18
+   70021        2       20      18      24      16      18      18      17      14
+   70021        3       14      24      19      23      18      20      25      16
+   60091        0       21      21      14      18      20      21      20      18
+   60091        1       20      26      22      20      18      29      24      29
+   60091        2       27      19      19      18      16      24      20      16
+   60091        3       19      28      15      24      20      17      17      21
+   70091        0       22      23      14      21      21      17      23      13
+   70091        1       25      20      14      18      15      19      22      15
+   70091        2       18      21      18      23      24      20      22      25
+   70091        3       25      22      23      24      23      19      20      22
+   60101        0       14      18      19      20      14      17      16      14
+   60101        1       26      22      25      20      20      23      27      20
+   60101        2       17      14      15      18      16      19      17      18
+   60101        3       21      24      21      22      18      19      26      19
+   70101        0       21      20      12      19      14      20      14      24
+   70101        1       17      25      18      20      18      22      19      18
+   70101        2       24      19      19      22      22      14      22      21
+   70101        3       24      26      22      19      18      20      21      21
+   60111        0       28      18      21      27      24      25      28      22
+   60111        1       25      20      28      24      18      26      25      16
+   60111        2       26      27      24      28      23      19      20      22
+   60111        3       20      21      17      21      22      24      21      27
+   70111        0       18      23      21      27      18      30      25      23
+   70111        1       22      17      22      23      23      22      28      16
+   70111        2       17      22      20      17      26      25      22      26
+   70111        3       27      17      20      21      18      29      16      14
+   60121        0       21      23      14      23      22      26      17      26
+   60121        1       31      23      19      22      22      22      24      26
+   60121        2       22      17      17      21      21      19      27      20
+   60121        3       16      22      24      16      17      22      18      19
+   70121        0       00      23      24      00      27      28      00      31
+   70121        1       23      26      15      14      25      25      20      13
+   70121        2       17      16      26      22      25      23      24      20
+   70121        3       21      20      23      30      10      22      26      22
index 87251c5ef8eab90c3d3671c18c57d3d0d74cf687..00935da67a250e72ab765b25e9e7ff25b7f3b6a5 100755 (executable)
@@ -5,6 +5,7 @@ use FileHandle;
 use Getopt::Long;
 use Data::Dumper;
 use HADES::TrbNet;
+use Time::HiRes;
 
 my $DEBUG = 0;       #print debug messages
 my $LOAD_DIRECT = 1; #load settings and initialize 
@@ -13,7 +14,7 @@ my $WRITE_FILES = 1; #write configration files
 my @default_settings = (0x50010,    #1:0 peaking 10ns, 3:2 gain 4mV, 4 internal bandgap
                         0x5011e,    #2:0 tail1 R 27k, 5:3 tail1 C 10pF
                         0x50215,    #2:0 tail1 R 23k, 5:3 tail1 C 0.9pF
-                        0x50302,    #6:0 global threshold 5=10mV
+                        0x50300,    #6:0 global threshold 5=10mV
                         0x50400,0x50500,0x50600,0x50700,0x50800,0x50900,0x50a00,0x50b00,
                         0,0,0,0);
 
@@ -89,7 +90,7 @@ foreach my $i (0..31) {
   print("Set baseline $i\n");
   set_baseline($i);
   $counters = trb_register_read_mem(0xfe91,0xdfc0,0,32);
-  sleep(1);
+  Time::HiRes::sleep(0.2);
   $counters2 = trb_register_read_mem(0xfe91,0xdfc0,0,32);
   
   foreach my $b (keys %{$counters}) {
@@ -101,7 +102,7 @@ foreach my $i (0..31) {
     }
   }
 
-  
+$numOfFailures=0;
 foreach my $b (keys %{$rates}) {
   foreach my $c (0..31) {
     my $sum=0; my $tot=0;
@@ -110,11 +111,12 @@ foreach my $b (keys %{$rates}) {
       $tot += $rates->{$b}[$c][$i];
       }
     $baselines->{$b}[$c] = $sum/($tot||1);  
-    if($tot==0) {$baselines->{$b}[$c]=0x63;}
+    if($tot==0) {$baselines->{$b}[$c]=0x00; $numOfFailures++; }
     }
   }
 print Dumper $baselines;  
 
+
 foreach my $b (sort keys %{$rates}) {
   foreach my $p (0..3) {
     printf("   %i\t%i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\n",
@@ -130,4 +132,4 @@ foreach my $b (sort keys %{$rates}) {
       );
     }
   }
-  
+printf(" No baseline found for %i channels. \n", $numOfFailures);
index 972c656848a25bfddb85d82672c28290edbf422e..807ab6aad21a227af8e613fec56b27df2cd3dd6d 100644 (file)
@@ -7,18 +7,34 @@
 60011 0x0000f34c001f2941
 70011
 
-80021 0x0000e4b3001f2941
-60021 0x0000f34c001f2941
-70021 0x00009c7d00202941
+80021 0x0000e6cf001f2941  
+60021 0x0000f069001f2941  
+70021 0x0000fdd3001f2941  
 
 80031 0x000065a100202941
 60031 0x000099bd00202941
 70031 0x0000dfab001f2941
 
+80041
+
+80051
+
+80061
+
+80071
+
 80081 0x000009d700762941  
 60081 0x000090d700752941
 70081 0x0000766e00752941
 
+80091  0x0000023000752941  
+60091  0x00001e4a00752941  
+70091  0x0000064e00752941  
+
+80101 0x000060a900752941  
+60101 0x0000432d00752941
+70101 0x000090d200752941
 80111 0x0000904400752941  
 60111 0x000024b200752941
 70111 0x00003be300752941
 60121 0x0000028200752941
 70121 0x0000ede000742941
 
+80131
+
+80141
+
+80151
+
 80161 0x000084d200202941 
 60161 0x00004f3800202941
 70161 0x0000e820001f2941
@@ -36,3 +58,5 @@
 
 
 
+
+