diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-05-23 11:22:15 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-05-23 11:22:15 -0400 |
commit | f332b293430d5641575917686d7dc128c309acf5 (patch) | |
tree | c775fc4b94d7c2ad5812bc1c125d92c2fc7c8772 /src/test-find-peaks.c | |
parent | 3ecd79253ca96645cc670b3e0ad7ee03d1bb9161 (diff) | |
download | sddm-f332b293430d5641575917686d7dc128c309acf5.tar.gz sddm-f332b293430d5641575917686d7dc128c309acf5.tar.bz2 sddm-f332b293430d5641575917686d7dc128c309acf5.zip |
add zdab-cat
This commit adds a new program called zdab-cat which is kind of like fit, but
just produces the YAML output without actually fitting anything.
Diffstat (limited to 'src/test-find-peaks.c')
-rw-r--r-- | src/test-find-peaks.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/test-find-peaks.c b/src/test-find-peaks.c index bf623b2..a825f4b 100644 --- a/src/test-find-peaks.c +++ b/src/test-find-peaks.c @@ -171,53 +171,6 @@ void plot_find_peaks(event *ev, double *pos, double *peak_theta, double *peak_ph } } -int get_event(zebraFile *f, event *ev, zebraBank *bev) -{ - /* Read all the PMT banks from the zebra file and update `ev`. - * - * Returns 0 on success, -1 on error. */ - int i, rv; - PMTBank bpmt; - zebraBank b; - int id, crate, card, channel; - - for (i = 0; i < MAX_PMTS; i++) { - ev->pmt_hits[i].hit = 0; - } - - rv = zebra_get_bank(f,&b,bev->links[KEV_PMT-1]); - - if (rv) { - fprintf(stderr, "error getting PMT bank: %s\n", zebra_err); - return -1; - } - - while (1) { - unpack_pmt(b.data, &bpmt); - card = bpmt.pin/1024; - crate = (bpmt.pin % 1024)/32; - channel = bpmt.pin % 32; - id = crate*512 + card*32 + channel; - ev->pmt_hits[id].hit = 1; - ev->pmt_hits[id].t = bpmt.pt; - ev->pmt_hits[id].qhl = bpmt.phl; - ev->pmt_hits[id].qhs = bpmt.phs; - ev->pmt_hits[id].qlx = bpmt.plx; - ev->pmt_hits[id].flags |= bpmt.pf & KPF_DIS; - - if (!b.next) break; - - rv = zebra_get_bank(f,&b,b.next); - - if (rv) { - fprintf(stderr, "error getting PMT bank: %s\n", zebra_err); - return -1; - } - } - - return 0; -} - void usage(void) { fprintf(stderr,"Usage: ./test-find-peaks [options] FILENAME\n"); |