-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.97 2009-12-14 10:28:38 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.98 2010-01-27 17:10:34 hadaq Exp $";
#define _POSIX_C_SOURCE 199309L
#define SYSLOG_NAMES
char verbosity[PARAM_MAX_VALUE_LEN];
unsigned long evtId;
unsigned long maxFileSz;
- unsigned short no_rpc;
+ unsigned short online;
unsigned int resdownscale;
unsigned int resnumevents;
char respath[PARAM_MAX_VALUE_LEN];
syslog(LOG_ERR, "Usage: [--shmname shmem_name] extension of shared memory name to be opened");
syslog(LOG_ERR, "Usage: [-a (agent)] [-p priority] [-I evtId]");
syslog(LOG_ERR, "Usage: [-v debug|info|notice|warning|err|alert|crit|emerg]");
- syslog(LOG_ERR, "Usage: [--norpc]");
+ syslog(LOG_ERR, "Usage: [--online 0|1] online service: 0=off, 1=on (default off)");
syslog(LOG_ERR, "Usage: [--filesize max_size] maximum size of output file in MB");
syslog(LOG_ERR, "Usage: [--resdownscale downscale_factor] downscale factor for the res events");
syslog(LOG_ERR, "Usage: [--resnumevents evt_num] maximum number of events in a resfile");
syslog(LOG_DEBUG, "secsizelimit: %ld", my->secsizelimit);
syslog(LOG_DEBUG, "ressizelimit: %d", my->ressizelimit);
}
- if (my->no_rpc == 1) {
- syslog(LOG_DEBUG, "no rpc is set");
+ if (my->online == 0) {
+ syslog(LOG_DEBUG, "no online service");
}
if (my->write_data == 1) {
syslog(LOG_DEBUG, "sec_path: %s", my->sec_path);
strcpy(my->verbosity, "info");
my->evtId = 0;
my->maxFileSz = (1.5 * 1024 * 1024 * 1024UL - 1);
- my->no_rpc = 0;
+ my->online = 0; /* 0=off, 1=on */
my->write_data = 0;
my->resdownscale = 0;
my->resdown_offset = 0;
int option_index = 0;
static struct option long_options[] = {
- {"norpc", 0, 0, 't'},
+ {"online", 1, 0, 't'},
{"filesize", 1, 0, 'z'},
{"resdownscale", 1, 0, 'e'},
{"resnumevents", 1, 0, 'n'},
{"ignore", 0, 0, 'i'},
{0, 0, 0, 0}
};
- i = getopt_long(argc, argv, "am:f:r:o:d:q:p:v:x:I:tz:e:n:h:w:tz:e:n:Hs:l:R:A:bEL:S:B:O:i", long_options, &option_index);
+ i = getopt_long(argc, argv, "am:f:r:o:d:q:p:v:x:I:t:z:e:n:h:w:tz:e:n:Hs:l:R:A:bEL:S:B:O:i", long_options, &option_index);
if (i == -1)
break;
switch (i) {
case 'I':
my->evtId = strtoul(optarg, NULL, 0);
break;
- case 't': /* norpc - no arg */
- my->no_rpc = 1;
+ case 't': /* online: 0=off, 1=on */
+ my->online = strtoul(optarg, NULL, 0);
break;
case 'z': /* from MBytes to Bytes */
my->maxFileSz = (1024 * 1024UL * strtoul(optarg, NULL, 0));
static void statsDump(TheArgs *theArgs, TheStats *my, int interval)
{
static unsigned long lastEC;
+
static unsigned long lastEE;
static unsigned long lastTE;
static unsigned long lastED;
Param_storeInt(p, n, "ressizelimit", my->ressizelimit);
}
- if (my->no_rpc == 1) {
- Param_storeInt(p, n, "rpc", my->no_rpc);
+ if (my->online == 1) {
+ Param_storeInt(p, n, "rpc", my->online);
}
if (my->write_data == 1) {
Param_storeString(p, n, "sec_path", my->sec_path);
fprintf(stderr, "<I> evtbuild.c, rfio_fopen(): trying to open connection to Data Mover: %s\n", rfioBase);
/* fRemote = rfio_fopen( rfioBase, "wb" ); */
- fRemote = rfio_fopen_gsidaq(rfioBase, "wb", 2, theArgs->rfioLustrePath, 1, 10, 1);
+ fRemote = rfio_fopen_gsidaq(rfioBase, "wb", 1, theArgs->rfioLustrePath, 1, 10, 1);
if (fRemote == NULL) {
syslog(LOG_ERR, "%s, %d: trying to open connection to Data Mover %s: %s",
exit(EXIT_FAILURE);
}
- if (theArgs->no_rpc)
+ if (theArgs->online == 0)
syslog(LOG_WARNING, "DISABLE of online service");
else if (-1 == initOnline())
syslog(LOG_WARNING, "unable to initialize online service");