From 34b3d958d10e39da3d19d1f93b9f4330776253e1 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 23 Sep 2019 09:16:46 -0500 Subject: add sub_run variable to the events array in the HDF5 file This commit adds the sub_run variable to the ev array in the HDF5 output file and updates plot-energy to order the events using the run and sub_run variables. This fixes a potential issue where I was sorting by GTID before, but the GTID can wrap around and so isn't guaranteed to put the events in the right order. --- src/zdab-cat.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/zdab-cat.c') diff --git a/src/zdab-cat.c b/src/zdab-cat.c index dfb295a..7b0b714 100644 --- a/src/zdab-cat.c +++ b/src/zdab-cat.c @@ -170,6 +170,7 @@ int main(int argc, char **argv) * instead of a MAST record. */ continue; } else { + continue; fprintf(stderr, "logical record starts with unknown bank '%s'\n", bmast.name); goto err; } @@ -323,6 +324,7 @@ skip_mc: if (output) { hdf5_events[nevents].run = ev.run; + hdf5_events[nevents].sub_run = ev.sub_run; hdf5_events[nevents].evn = bmc.evn; hdf5_events[nevents].gtr = ev.trigger_time; hdf5_events[nevents].nhit = ev.nhit; -- cgit