aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zdab-cat.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/zdab-cat.c b/src/zdab-cat.c
index d891c78..1cd2d63 100644
--- a/src/zdab-cat.c
+++ b/src/zdab-cat.c
@@ -37,6 +37,7 @@ void usage(void)
{
fprintf(stderr,"Usage: ./zdab-cat [options] FILENAME\n");
fprintf(stderr," -o output file (default: stdout)\n");
+ fprintf(stderr," --skip-second-event only fit the first event after a MAST bank\n");
fprintf(stderr," -h display this help message\n");
exit(1);
}
@@ -54,12 +55,18 @@ int main(int argc, char **argv)
char *filename = NULL;
char *output = NULL;
FILE *fout = stdout;
+ int skip_second_event = 0;
size_t nhit;
int last_run;
char dqxx_file[256];
for (i = 1; i < argc; i++) {
- if (argv[i][0] == '-') {
+ if (strlen(argv[i]) >= 2 && !strncmp(argv[i], "--", 2)) {
+ if (!strcmp(argv[i]+2,"skip-second-event")) {
+ skip_second_event = 1;
+ continue;
+ }
+ } else if (argv[i][0] == '-') {
switch (argv[i][1]) {
case 'o':
output = argv[++i];
@@ -303,7 +310,7 @@ skip_mc:
/* Note the origin link for the first EV bank points back to the
* structural link location in the MAST bank. These links are super
* confusing! */
- if (b.orig == f->first_bank - KMAST_EV) break;
+ if ((b.orig == f->first_bank - KMAST_EV) || skip_second_event) break;
rv = zebra_get_bank(f,&b,b.orig);