]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
status
authorhadaq@countinghouse <hadaq@CountingHouse>
Thu, 28 Aug 2014 15:19:35 +0000 (17:19 +0200)
committerhadaq@countinghouse <hadaq@CountingHouse>
Thu, 28 Aug 2014 15:19:35 +0000 (17:19 +0200)
hmon/hmon_spill.pl

index 18d15318d90904504f3d5f99cd69889ad7b36451..5a81dc0942a9d650e2aa9a012b06a7f8a1454f9e 100755 (executable)
@@ -63,18 +63,18 @@ while (1) {
     $lastspill = $outofspill;
     $outofspill = ($rh_result->{QA::CTSAddress} || 0) & 0x10;
     $spilllength++ ; #if($outofspill);
-    $rh_result = trb_register_read(0x3000, 0x01) or $trbneterr = 1; #sleep 5 and next;
+    $rh_result = trb_register_read(0x0002, 0x01) or $trbneterr = 1; #sleep 5 and next;
     # 0x3000 => a reliable guy to ask about rates
     
     if($trbneterr == 0) {
-       my $res = $rh_result->{0x3000} & 0xffff;
+       my $res = $rh_result->{0x0002} & 0xffff;
        $evtrate = $res >= $lastres ? $res - $lastres : ($res + 2**16) - $lastres;
        $events += $evtrate;
         $midlastres = $res;
         usleep(500000);
 
-        $rh_result = trb_register_read(0x3000, 0x01) or $trbneterr = 1; #sleep 5 and next;
-       $res = $rh_result->{0x3000} & 0xffff;
+        $rh_result = trb_register_read(0x0002, 0x01) or $trbneterr = 1; #sleep 5 and next;
+       $res = $rh_result->{0x0002} & 0xffff;
        my $evtrate2 = $res >= $midlastres ? $res - $midlastres : ($res + 2**16) - $midlastres;
        $events += $evtrate2;
         $evtrate += $evtrate2;
@@ -116,16 +116,10 @@ while (1) {
               QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum",
                           "No Spills", "No Spills detected at the moment");  
             
-            if($spilllength > 30 && !($spilllength%30)) {
+            if($spilllength >= 25 && !($spilllength%25)) {
               if($data->{'prefix'}->{val} eq 'be') {
                 Hmon::Speak('nobeam', "No beam");
                 }
-#               elsif($data->{'prefix'}->{val} eq 'co') {
-#                 Hmon::Speak('nobeam', "No beam, but cosmics are there anyways.");
-#                 }
-#               else {
-#                 Hmon::Speak('nobeam', "No beam, but nobody cares because test files are written.");
-#                 }
               }
        }