aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/zdab_utils.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c
index b26dd78..12514ef 100644
--- a/src/zdab_utils.c
+++ b/src/zdab_utils.c
@@ -98,6 +98,9 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev)
for (i = 0; i < MAX_PMTS; i++) {
ev->pmt_hits[i].hit = 0;
+
+ /* Clear any flags except for PMT_DQXX. */
+ ev->pmt_hits[i].flags &= PMT_FLAG_DQXX;
}
unpack_ev(bev->data, &ev_bank);
@@ -169,12 +172,6 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev)
ev->pmt_hits[id].pt1 = bpmt.pt;
}
- /* Clear the PMT_FLAG_DIS bit. */
- ev->pmt_hits[id].flags &= ~PMT_FLAG_DIS;
-
- /* Clear the PMT_FLAG_CHARGE bit. */
- ev->pmt_hits[id].flags &= ~PMT_FLAG_CHARGE;
-
/* Make sure we have good calibrations. Technically, we should only
* have to check the KPF_DIS bit since according to the SNOMAN
* docs: