From 6024eb1e91ccedc59d78cffd2d8947bf3e1d6f2b Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 3 Feb 2011 10:39:15 +0100 Subject: [PATCH] processfields_fd: write number of frequencies into a hdf5 attribute --- Common/processfields_fd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Common/processfields_fd.cpp b/Common/processfields_fd.cpp index 68227dc..5878b02 100644 --- a/Common/processfields_fd.cpp +++ b/Common/processfields_fd.cpp @@ -57,6 +57,14 @@ void ProcessFieldsFD::InitProcess() H5::Group* group = new H5::Group( file->createGroup( "/FieldData" )); delete group; group = new H5::Group( file->createGroup( "/FieldData/FD" )); + + //set number of frequencies + hsize_t t_dimsf[] = {1}; + H5::DataSpace t_dataspace( 1, t_dimsf ); + H5::Attribute attr = group->createAttribute("Number_of_Frequencies",H5::PredType::NATIVE_INT,t_dataspace); + int count = m_FD_Samples.size(); + attr.write( H5::PredType::NATIVE_INT , &count); + delete group; delete file;