diff options
Diffstat (limited to 'src/zdab_utils.c')
-rw-r--r-- | src/zdab_utils.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c index 7c3d2ae..27ea086 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -80,6 +80,7 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) static char *pmt_names[] = {"PMT","OWL","LG","FECD","BUTT","NECK"}; char pmt_type_string[256]; EVBank ev_bank; + static int warned[MAX_PMTS]; for (i = 0; i < MAX_PMTS; i++) { ev->pmt_hits[i].hit = 0; @@ -235,12 +236,7 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) ev->pmt_hits[id].flags |= PMT_FLAG_CHARGE; } - if (pmts[id].pmt_type != pmt_types[i]) { - get_pmt_type_string(pmts[id].pmt_type,pmt_type_string); - fprintf(stderr, "%i/%i/%i has PMT type %s but expected %s based on bank\n", crate, card, channel, pmt_type_string, pmt_names[i]); - } - - /* The above check prints out a warning on a handful of channels: + /* The following check prints out a warning on a handful of channels: * * 3/15/9 has PMT type NECK but expected OWL based on bank * 18/0/14 has PMT type INVALID but expected BUTT based on bank @@ -297,14 +293,15 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) * > > > --- * > > > Stan Seibert * - * I also looked at the run in XSNOED and it looks like 3/15/9 - * should be an OWL PMT and not a neck PMT. - * - * Based on the email and the fact that 3/15/9 *should* be an OWL - * PMT, I am going to assume that the database that SNOMAN uses to - * figure out the PMT types is correct and so reassign the PMT type - * based on that. */ - pmts[id].pmt_type = pmt_types[i]; + * Based on the email and the fact that ccc_type.for was never + * updated, we'll assume that the PMT type in snoman.ratdb is + * correct. */ + + if (pmts[id].pmt_type != pmt_types[i] && !warned[id]) { + get_pmt_type_string(pmts[id].pmt_type,pmt_type_string); + fprintf(stderr, "%i/%i/%i has PMT type %s but expected %s based on bank\n", crate, card, channel, pmt_type_string, pmt_names[i]); + warned[id] = 1; + } if (!b.next) break; |