From: hadaq Date: Tue, 7 Dec 2010 17:33:16 +0000 (+0000) Subject: Debug option fixed. Sergey. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d57566ec8b1d789f71763d5901ba55512d2c9200;p=daqdata.git Debug option fixed. Sergey. --- diff --git a/hadaq/evtbuild.c b/hadaq/evtbuild.c index 6efb247..7d5c45c 100644 --- a/hadaq/evtbuild.c +++ b/hadaq/evtbuild.c @@ -1,4 +1,4 @@ -static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.143 2010-11-24 15:02:11 hadaq Exp $"; +static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.144 2010-12-07 17:33:16 hadaq Exp $"; #define _POSIX_C_SOURCE 199309L #define SYSLOG_NAMES @@ -144,7 +144,7 @@ static void usage(const char *progName) syslog(LOG_ERR, " [--lustre path_to_lustre] Output path for writing data on the Lustre cluster (if mounted)."); syslog(LOG_ERR, " [--orapath path] Path to eb_runinfo2ora.txt for writing data to Oracle."); syslog(LOG_ERR, " [--ignore] Ignore trigger mismatch conditions."); - syslog(LOG_ERR, " [--maxtrigmismatch number] Maximum number of triggers allowed for missmatch."); + syslog(LOG_ERR, " [--maxtrigmismatch number] Maximum number of triggers allowed for mismatch."); syslog(LOG_ERR, " [--multidisk diskNr] Write data to a disk number provided by daq_disks via shared memory."); syslog(LOG_ERR, " The very first file will be written to diskNr provided via --multidisk option."); @@ -1237,8 +1237,10 @@ int main(int argc, char *argv[]) HadTuQueue_pop(hadTuQueue[i]); step = 1; } else if (trigNr < currTrigNr) { - if (theArgs->debugOptsCnt) + if (theArgs->debugOptsCnt) { brokenEvtCnt = Debug_fill(theArgs, theStats, theDebug, i, "pop"); + evtBrokenFlag = 1; + } /* BUGBUG subevt discarded, not in statistic */ HadTuQueue_pop(hadTuQueue[i]); @@ -1246,13 +1248,15 @@ int main(int argc, char *argv[]) popCnt++; if (popCnt > 10000) { - Debug_printPopTrigMismatch(theArgs, theStats, theDebug, i); + if (theArgs->debugOptsCnt) + Debug_printPopTrigMismatch(theArgs, theStats, theDebug, i); goto bailOut1; } } else { - if (theArgs->debugOptsCnt) + if (theArgs->debugOptsCnt) { brokenEvtCnt = Debug_fill(theArgs, theStats, theDebug, i, "broken"); - + evtBrokenFlag = 1; + } evtIsBroken = 1; } if (HadTuQueue_empty(hadTuQueue[i])) { @@ -1266,6 +1270,7 @@ int main(int argc, char *argv[]) if (theArgs->debugOptsCnt) { if (evtBrokenFlag) { Debug_print(theArgs, theStats, theDebug); + evtBrokenFlag = 0; } int iq; for (iq = 0; iq < theArgs->nrOfMsgs; iq++) @@ -1285,7 +1290,7 @@ int main(int argc, char *argv[]) Evt_setDataError(evt); (*theStats->evtsTagError)++; - /* Check if triggger missmatch is large enough to exit */ + /* Check if triger mismatch is large enough to exit */ if (isMismatchCritical(theArgs, theStats)) { Debug_printBrokenTrigMismatch(theArgs, theStats); goto bailOut1; @@ -1314,7 +1319,7 @@ int main(int argc, char *argv[]) } else { (*theStats->evtsDiscarded)++; - /* Check if triggger missmatch is large enough to exit */ + /* Check if triger mismatch is large enough to exit */ if (isMismatchCritical(theArgs, theStats)) { Debug_printBrokenTrigMismatch(theArgs, theStats); goto bailOut1;