]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
proper statistics of lost events
authorhades <hades>
Wed, 1 Sep 1999 12:03:06 +0000 (12:03 +0000)
committerhades <hades>
Wed, 1 Sep 1999 12:03:06 +0000 (12:03 +0000)
hadaq/evtbuild.c

index c83dc9f8e7defa0e37e7147e816d8645d18b0785..f0cd4592bac00ef88536d6ab4f305be512b250b1 100644 (file)
@@ -1,4 +1,4 @@
-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.2 1999-09-01 09:06:10 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.3 1999-09-01 12:03:06 hades Exp $";
 
 #define _XOPEN_SOURCE
 #include <unistd.h>
@@ -284,7 +284,7 @@ int main(int argc, char *argv[])
        }
        deleteEvt(evt);
 
-       currTrigNr = 0;
+       currTrigNr = 0xffffffff;
        while (setjmp(terminateJmp) == 0) {
                int tryNext;
 
@@ -307,6 +307,10 @@ int main(int argc, char *argv[])
                                msglog(LOG_DEBUG, "hadTuQueue[%d]: %p = subEvt: %s\n", i, subEvt, SubEvt_2charP(subEvt));
 #endif
                                if (i == 0 && currNrOfSubEvts == 0) {
+                                       /* upper 24 bit of trigNr should be a sequence */
+                                       (*evtsDiscarded) += (SubEvt_trigNr(subEvt) >> 8)
+                                               - ((currTrigNr + 0x100) >> 8);
+
                                        currTrigNr = SubEvt_trigNr(subEvt);
                                }
                                if (SubEvt_id(subEvt) == SubEvtId_trigCode) {