From 706e71a48be0855e46054508b43711ca966859d8 Mon Sep 17 00:00:00 2001 From: Brown <2mx@ornl.gov> Date: Thu, 11 Nov 2021 10:17:41 -0500 Subject: [PATCH] add headers for pipeline pass --- sammy/src/io/hdf5IO.cpp | 4 +++- sammy/src/io/hdf5IO.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sammy/src/io/hdf5IO.cpp b/sammy/src/io/hdf5IO.cpp index 61ef22f55..8b971c181 100644 --- a/sammy/src/io/hdf5IO.cpp +++ b/sammy/src/io/hdf5IO.cpp @@ -25,7 +25,9 @@ namespace sammy { char sect9[9][MAX_NAME_LEN] = {}; // HDF5 accepts set-size double arrays for datasets: copy over - double dset_data[data.size()][data[0].size()]; + const size_t ns = head.numSection; + const size_t nc = head.numChan; + double dset_data[ns][nc]; for( size_t i=0;i<data.size();++i ){ std::copy(data[i].begin(),data[i].end(), dset_data[i]); } diff --git a/sammy/src/io/hdf5IO.h b/sammy/src/io/hdf5IO.h index 3868b230d..860534d5e 100644 --- a/sammy/src/io/hdf5IO.h +++ b/sammy/src/io/hdf5IO.h @@ -4,6 +4,8 @@ #include <vector> #include <fstream> // ifstream #include <iostream> +#include <cstring> +#include <stdexcept> #include "odfIO.h" #include "H5Cpp.h" -- GitLab