NXgetgroupID
Ray Osborn
ROsborn at anl.gov
Thu Jun 24 23:06:35 BST 1999
I've been working on a F90 interface to the NeXus API, including some
utility extensions. I needed to use NXgetgroupID, but found its current
form puzzling. At the moment, it returns the tag and Vgroup ID number
rather than the Vgroup's tag/reference pair. The Vgroup ID number will not
be unique, but will change every time a group is closed and reopened,
whereas the tag/reference pair uniquely identifies the group.
Is this what was intended? I would find it extremely useful if the code in
NAPI.C were changed to
NXstatus
NXgetgroupID (NXhandle fileid, NXlink* sRes)
{
pNexusFile pFile;
pFile = NXIassert (fileid);
if (pFile->iCurrentVG == 0) {
sRes->iTag = NX_ERROR;
return NX_ERROR;
} else {
sRes->iTag = DFTAG_VG;
sRes->iRef = VQueryref(pFile->iCurrentVG);
return NX_OK;
}
/* not reached */
sRes->iTag = NX_ERROR;
return NX_ERROR;
}
At the moment, the above contains
sRes->iRef = pFile->iCurrentVG;
Does anyone have any objections to making this change? I've checked that
the change works for what I need it to do. It also seems much more logical
to me.
Regards,
Ray
--
Dr Ray Osborn Tel: +1 (630) 252-9011
Materials Science Division Fax: +1 (630) 252-7777
Argonne National Laboratory E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845
More information about the NeXus-developers
mailing list