aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-08-14 15:37:18 -0500
committertlatorre <tlatorre@uchicago.edu>2018-08-14 15:37:18 -0500
commit6333ef3816498199744fcd0021f12b1c15a4f6e8 (patch)
treed6ea7e07fec05be95093325bbe400d2eff9164ee
parent46928c6b2f9439fb0664cf01e820c568feae8ec1 (diff)
downloadsddm-6333ef3816498199744fcd0021f12b1c15a4f6e8.tar.gz
sddm-6333ef3816498199744fcd0021f12b1c15a4f6e8.tar.bz2
sddm-6333ef3816498199744fcd0021f12b1c15a4f6e8.zip
update pmt hit array in event struct to be MAX_PMTS long
-rw-r--r--src/event.h3
-rw-r--r--src/fit.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/event.h b/src/event.h
index ecb498d..b530347 100644
--- a/src/event.h
+++ b/src/event.h
@@ -2,6 +2,7 @@
#define EVENT_H
#include <stdint.h>
+#include "pmt.h"
/* Struct to hold all data from a single event used for fitting. */
@@ -17,7 +18,7 @@ typedef struct pmt_hit {
typedef struct event {
int run;
uint32_t gtid;
- pmt_hit pmt_hits[10000];
+ pmt_hit pmt_hits[MAX_PMTS];
} event;
#endif
diff --git a/src/fit.c b/src/fit.c
index bf4d018..a977fd5 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -131,7 +131,7 @@ int main(int argc, char **argv)
load_pmt_info();
- for (i = 0; i < 10000; i++) {
+ for (i = 0; i < MAX_PMTS; i++) {
ev.pmt_hits[i].hit = 0;
ev.pmt_hits[i].flags = 0;
}
@@ -186,7 +186,7 @@ int main(int argc, char **argv)
ev.run = bev.run;
ev.gtid = bev.gtr_id;
- for (i = 0; i < 10000; i++) {
+ for (i = 0; i < MAX_PMTS; i++) {
ev.pmt_hits[i].hit = 0;
}
}