]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
more debug, mt
authorhadaq <hadaq>
Thu, 31 Oct 2002 14:13:53 +0000 (14:13 +0000)
committerhadaq <hadaq>
Thu, 31 Oct 2002 14:13:53 +0000 (14:13 +0000)
hadaq/hwtip.c

index 0dd31cde90eeca129bf95a6fecb587c26faf471e..5515850f2cf7dc55b2ac7d6b4489f17890fa879f 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtip.c,v 1.26 2002-10-09 12:42:18 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtip.c,v 1.27 2002-10-31 14:13:53 hadaq Exp $";
 
 #include <assert.h>
 #include <string.h>
@@ -122,6 +122,7 @@ int HwTip_readSubEvt(HwTip * my, void *subEvt)
        int arrayCounter = 0,i;
        unsigned long tempArray[500];
        char str[200], buff[200];
+       unsigned long lastGeo = 0, currentGeo;
 
        header = LVme_getL(my->lvme, currAddr);
        size = header & 0xfff;
@@ -154,6 +155,21 @@ int HwTip_readSubEvt(HwTip * my, void *subEvt)
                     header, dataWord);
              errorFlag = 1;
            }
+
+           currentGeo = (dataWord >>27 ) & 0x1f;
+
+#if 0
+           if (lastGeo == 0) {
+             lastGeo=currentGeo-1;
+           }
+           if( lastGeo +1 != currentGeo ) {
+             syslog(LOG_ERR, "header: %.8x, Geo not incremental, crate: %d data: %.8x, lastGeo %d, currentGeo %d",
+                    header, crateNumber, dataWord, lastGeo, currentGeo);
+             errorFlag = 1;
+           }
+           lastGeo = currentGeo;
+#endif
+
            foundCBLTHeaderFlag = 1;
          }
          else if ( statusWord == 4 ) {
@@ -167,13 +183,14 @@ int HwTip_readSubEvt(HwTip * my, void *subEvt)
            }
 
            evtC = (tdcEventCounter &0xff);
-           /*      if( (tdcEventCounter &0xff) != trigTag) { */
-           if(  (max(evtC, trigTag) - min(evtC, trigTag) >=2) && (max(evtC, trigTag) - min(evtC, trigTag) <= 0xfe )) {
+#if 1
+           if( (tdcEventCounter &0xff) != trigTag) { 
+           /* if(  (max(evtC, trigTag) - min(evtC, trigTag) >=2) && (max(evtC, trigTag) - min(evtC, trigTag) <= 0xfe )) { */
              syslog(LOG_ERR, "header: %.8x, crate: %d, tdc_num: %d, tag != EvtCounter, (%.8x,%.8x), dataWord: %.8x ",
                     header, crateNumber, tdcCounter, trigTag, tdcEventCounter, dataWord);
              errorFlag = 1;
            }
-
+#endif
            foundCBLTTrailerFlag = 0;
            foundCBLTHeaderFlag = 0;
          }