diff options
-rw-r--r-- | src/zdab_utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c index 12514ef..4fc267c 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -349,6 +349,21 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) 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]); + + if (ev->run < 39999) { + /* We are in the D2O or salt phase. Since the PMT positions + * file is only from the NCD phase, we don't know where the + * PMT is supposed to be so we just ignore this PMT hit. */ + pmts[id].pmt_type = PMT_INVALID; + } else if (ev->run < 67900) { + /* We are in the NCD phase and so the PMT types specified + * in the snoman.ratdb file are probably correct. */ + } else { + /* We are in the H2O phase. No idea what should happen here. */ + fprintf(stderr, "Don't know what to do with PMT type since this is the H2O phase.\n" + "You should update the code to have different PMT mappings for the different phases!\n"); + } + warned[id] = 1; } |