From cc33da5041a1167118c594e0df6ffa2033c4430f Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 8 Nov 2000 08:27:14 +0000 Subject: [PATCH] Debug output for all parameters --- hadaq/evtbuild.c | 20 +++++++++++++++++++- hadaq/memnet.c | 11 ++++++++++- hadaq/netmem.c | 18 ++++++++++++++++-- hadaq/readout.c | 10 +++++++++- 4 files changed, 54 insertions(+), 5 deletions(-) diff --git a/hadaq/evtbuild.c b/hadaq/evtbuild.c index 8f92e3a..a0ce820 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.19 2000-11-08 07:53:22 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.20 2000-11-08 08:27:14 hades Exp $"; #define _POSIX_C_SOURCE 199309L @@ -95,6 +95,23 @@ static void usage(const char *progName) msglog_usage(); } +static void argsDump(TheArgs *my) { + int i; + + msglog(LOG_DEBUG, "nrOfMsgs: %d\n", my->nrOfMsgs); + for (i = 0; i < my->slowCtrlFileCnt; i++) { + msglog(LOG_DEBUG, "slowCtrlFiles[%d]: %s\n", i, my->slowCtrlFiles[i]); + } + msglog(LOG_DEBUG, "outPath: %s\n", my->outPath); + msglog(LOG_DEBUG, "outDev: %s\n", my->outDev); + msglog(LOG_DEBUG, "runNr: %d\n", my->runNr); + msglog(LOG_DEBUG, "expId: %s\n", my->expId); + msglog(LOG_DEBUG, "priority: %d\n", my->priority); + msglog(LOG_DEBUG, "isStandalone: %d\n", my->isStandalone); + msglog(LOG_DEBUG, "queueSize: %d\n", my->queueSize); + msglog(LOG_DEBUG, "verbosity: %s\n", my->verbosity); +} + static void argsDefault(TheArgs *my) { int i; @@ -213,6 +230,7 @@ int main(int argc, char *argv[]) msglog_usage(); exit(EXIT_FAILURE); } + argsDump(theArgs); /* normalize experiment id */ theArgs->expId[0] = tolower(theArgs->expId[0]); diff --git a/hadaq/memnet.c b/hadaq/memnet.c index a3e9bde..1c6b183 100644 --- a/hadaq/memnet.c +++ b/hadaq/memnet.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/memnet.c,v 6.4 2000-11-08 07:53:23 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/memnet.c,v 6.5 2000-11-08 08:27:14 hades Exp $"; #define _XOPEN_SOURCE #include @@ -48,6 +48,14 @@ static void usage(const char *progName) msglog_usage(); } +static void argsDump(TheArgs *my) { + msglog(LOG_DEBUG, "bandWidth: %d\n", my->bandWidth); + msglog(LOG_DEBUG, "priority: %d\n", my->priority); + msglog(LOG_DEBUG, "isStandalone: %d\n", my->isStandalone); + msglog(LOG_DEBUG, "queueSize: %d\n", my->queueSize); + msglog(LOG_DEBUG, "verbosity: %s\n", my->verbosity); +} + static void argsDefault(TheArgs *my) { strcpy(my->outPath, ""); my->bandWidth = 0; @@ -122,6 +130,7 @@ int main(int argc, char *argv[]) msglog_usage(); exit(EXIT_FAILURE); } + argsDump(theArgs); if (strcmp(theArgs->outPath, "") == 0) { usage(argv[0]); diff --git a/hadaq/netmem.c b/hadaq/netmem.c index 5d4e0c2..e1b9b48 100644 --- a/hadaq/netmem.c +++ b/hadaq/netmem.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/netmem.c,v 6.9 2000-11-08 07:53:23 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/netmem.c,v 6.10 2000-11-08 08:27:14 hades Exp $"; #define _XOPEN_SOURCE #include @@ -42,11 +42,24 @@ static void usage(const char *progName) msglog_usage(); } +static void argsDump(TheArgs *my) { + int i; + + for (i = 0; i < my->inPathCnt; i++) { + msglog(LOG_DEBUG, "inPath[%d]: %s\n", i, my->inPath[i]); + } + msglog(LOG_DEBUG, "nrOfMsgs: %d\n", my->nrOfMsgs); + msglog(LOG_DEBUG, "priority: %d\n", my->priority); + msglog(LOG_DEBUG, "isStandalone: %d\n", my->isStandalone); + msglog(LOG_DEBUG, "queueSize: %d\n", my->queueSize); + msglog(LOG_DEBUG, "verbosity: %s\n", my->verbosity); +} + static void argsDefault(TheArgs *my) { int i; for (i = 0; i < MAXINPATH; i++) { - my->inPath[i] = my->inPathS + i * PARAM_MAX_NAME_LEN; + my->inPath[i] = my->inPathS[i]; } my->inPathCnt = 0; my->nrOfMsgs = 0; @@ -123,6 +136,7 @@ int main(int argc, char *argv[]) msglog_usage(); exit(EXIT_FAILURE); } + argsDump(theArgs); if (theArgs->inPathCnt == 0 || theArgs->nrOfMsgs == 0 || theArgs->inPathCnt != theArgs->nrOfMsgs) { usage(argv[0]); diff --git a/hadaq/readout.c b/hadaq/readout.c index b621fca..903755f 100644 --- a/hadaq/readout.c +++ b/hadaq/readout.c @@ -1,4 +1,4 @@ -static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/readout.c,v 6.10 2000-11-08 07:53:23 hades Exp $"; +static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/readout.c,v 6.11 2000-11-08 08:27:14 hades Exp $"; #define _POSIX_C_SOURCE 199309L #include @@ -38,6 +38,13 @@ static void usage(const char *progName) msglog_usage(); } +static void argsDump(TheArgs *my) { + msglog(LOG_DEBUG, "priority: %d\n", my->priority); + msglog(LOG_DEBUG, "isStandalone: %d\n", my->isStandalone); + msglog(LOG_DEBUG, "queueSize: %d\n", my->queueSize); + msglog(LOG_DEBUG, "verbosity: %s\n", my->verbosity); +} + static void argsDefault(TheArgs *my) { my->priority = 0; my->isStandalone = 1; @@ -104,6 +111,7 @@ void main(int argc, char *argv[]) msglog_usage(); goto bailOut0; } + argsDump(theArgs); if (NULL == (worker = Worker_initBegin(argv[0], sigHandler, theArgs->priority, theArgs->isStandalone))) { msglog(LOG_ERR, "connecting to agent: %s\n", strerror(errno)); -- 2.43.0