aboutsummaryrefslogtreecommitdiff
path: root/src/fit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fit.c')
-rw-r--r--src/fit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fit.c b/src/fit.c
index 4635ccf..2b20683 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -18,6 +18,7 @@
#include "pdg.h"
#include "optics.h"
#include "vector.h"
+#include "pmt_response.h"
#define EV_RECORD 0x45562020 // 'EV ' (as written to ZDAB file)
@@ -419,6 +420,16 @@ int main(int argc, char **argv)
exit(1);
}
+ if (load_file(db, "pmt_response.dat")) {
+ fprintf(stderr, "failed to load pmt_response.dat: %s\n", db_err);
+ exit(1);
+ }
+
+ if (pmt_response_init(db)) {
+ fprintf(stderr, "failed to initialize PMTR bank: %s\n", pmtr_err);
+ exit(1);
+ }
+
while (1) {
rv = next_bank(f, &b);
@@ -476,6 +487,7 @@ int main(int argc, char **argv)
}
free_interpolation();
+ pmt_response_free();
db_free(db);