]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
small adjustments of termination condition in case of too many lost subevents. JAM
authorhadaq <hadaq>
Sun, 14 Aug 2011 14:18:39 +0000 (14:18 +0000)
committerhadaq <hadaq>
Sun, 14 Aug 2011 14:18:39 +0000 (14:18 +0000)
hadaq/evtbuild.c

index 05cd5c66f769856da0b535e0302c2045ca908eb8..d8efa84bca0e8afc7b2aaadac569b39bf7ebd3fa 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.152 2011-08-12 20:49:45 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.153 2011-08-14 14:18:39 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #define SYSLOG_NAMES
@@ -53,8 +53,8 @@ static RFILE *fRemote = NULL;
 #define DAQVERSION 2                   /* needed by Hydra unpackers */
 
 #define RUNID_INFO_DT  600             /* time in s until not available runid info is logged  */
-#define LOST_SUBEVT_LIMIT 10000        /* number of popped subevents per trigger sequence until warning */
-#define LOST_SUBEVT_TERM  10   /* terminate after this number of lost sub warnings per trigger sequence */
+#define LOST_SUBEVT_LIMIT 50000        /* number of popped subevents per trigger sequence until warning */
+#define LOST_SUBEVT_TERM  20   /* terminate after this number of lost sub warnings per trigger sequence */
 
 #define NEVTIDS 64UL                   /* must be 2^n */
 #define NEVTIDS_IN_FILE 0UL            /* must be 2^n */
@@ -275,7 +275,7 @@ unsigned long getRunId(TheArgs *my)
                        if (myRunId == 0) {
                                t = time(NULL);
                                dT = t - t0;
-                               if (dT > RUNID_INFO_DT) {
+                               if (dT >= RUNID_INFO_DT) {
                                        snprintf(msg, 255, "<I> getRunId: Still waiting for runId from EPICS IOC after %d s...", dT);
                                        storeLogInfo(my, msg);
                                        printf("%s \n", msg);
@@ -1277,6 +1277,9 @@ int main(int argc, char *argv[])
                                }
                                HadTuQueue_pop(hadTuQueue[i]);
                                step = 1;
+                               popCnt = 0;
+                               popTermCnt = 0; /*reset for each message channel */
+
                        } else if (trigNr < currTrigNr) {
                                if (theArgs->debugOptsCnt) {
                                        brokenEvtCnt = Debug_fill(theArgs, theStats, theDebug, i, "pop");