processfields_fd: write number of frequencies into a hdf5 attribute

pull/1/head
Thorsten Liebig 2011-02-03 10:39:15 +01:00
parent aacd0964fb
commit 6024eb1e91
1 changed files with 8 additions and 0 deletions

View File

@ -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;