コード例 #1
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
int H5PrimaryStatsDataDelegate::readVectorOfArrays(hid_t pid, VectorOfFloatArray colData)
{
  int err = 0;

  for (VectorOfFloatArray::iterator iter = colData.begin(); iter != colData.end(); ++iter )
  {
    FloatArrayType::Pointer d = *iter;
    err = d->readH5Data(pid);
    if (err < 0) { return err; }
  }

  return err;
}
コード例 #2
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
int H5PrimaryStatsDataDelegate::readDistributionData(hid_t pid,
                                              const std::string &hdf5GroupName,
                                              VectorOfFloatArray colData)
{
  int err = 0;
  hid_t disId = H5Utilities::openHDF5Object(pid, hdf5GroupName);
  if(disId < 0)
  {
    return -1;
  }

  for (VectorOfFloatArray::iterator iter = colData.begin(); iter != colData.end(); ++iter)
  {
    FloatArrayType::Pointer d = *iter;
    err |= d->readH5Data(disId);
  }

  err |= H5Utilities::closeHDF5Object(disId);
  return err;
}