NeXusDataFormat  1
NeXusCAPI
 All Functions Groups
Functions
General Initialisation and shutdown
C API

Functions

NXstatus NXopen (CONSTCHAR *filename, NXaccess access_method, NXhandle *pHandle)
 Open a NeXus file.
NXstatus NXreopen (NXhandle pOrigHandle, NXhandle *pNewHandle)
 Opens an existing NeXus file a second time for e.g.
NXstatus NXclose (NXhandle *pHandle)
 close a NeXus file
NXstatus NXsetcache (long newVal)
 A function for setting the default cache size for HDF-5.

Detailed Description


Function Documentation

NXstatus NXclose ( NXhandle *  pHandle)

close a NeXus file

Parameters:
pHandleA NeXus file handle as returned from NXopen. pHandle is invalid after this call.
Returns:
NX_OK on success, NX_ERROR in the case of an error.
NXstatus NXopen ( CONSTCHAR *  filename,
NXaccess  access_method,
NXhandle *  pHandle 
)

Open a NeXus file.

NXopen honours full path file names. But it also searches for files in all the paths given in the NX_LOAD_PATH environment variable. NX_LOAD_PATH is supposed to hold a list of path string separated by the platform specific path separator. For unix this is the : , for DOS the ; . Please note that crashing on an open NeXus file will result in corrupted data. Only after a NXclose or a NXflush will the data file be valid.

Parameters:
filenameThe name of the file to open
access_methodThe file access method. This can be:
  • NXACC__READ read access
  • NXACC_RDWR read write access
  • NXACC_CREATE, NXACC_CREATE4 create a new HDF-4 NeXus file
  • NXACC_CREATE5 create a new HDF-5 NeXus file
  • NXACC_CREATEXML create an XML NeXus file. see #NXaccess_mode Support for HDF-4 is deprecated.
pHandleA file handle which will be initialized upon successfull completeion of NXopen.
Returns:
NX_OK on success, NX_ERROR in the case of an error.
NXstatus NXreopen ( NXhandle  pOrigHandle,
NXhandle *  pNewHandle 
)

Opens an existing NeXus file a second time for e.g.

access from another thread.

Returns:
NX_OK on success, NX_ERROR in the case of an error.