LAL  7.5.0.1-08ee4f4
Low-Level Routines

Detailed Description

Low-level routines for reading/writing HDF5 files.

These routines are basic routines for accessing HDF5 files. The mid-level and high-level routines, which are based on these routines, are typically more convenient routines to use.

File/Group Routines

void XLALH5FileClose (LALH5File UNUSED *file)
 Closes a LALH5File. More...
 
LALH5FileXLALH5FileOpen (const char UNUSED *path, const char UNUSED *mode)
 Opens a LALH5File. More...
 
LALH5FileXLALH5GroupOpen (LALH5File UNUSED *file, const char UNUSED *name)
 Opens a group in a LALH5File. More...
 
int XLALH5FileCheckGroupExists (const LALH5File UNUSED *file, const char UNUSED *name)
 Checks for existence of a group in a LALH5File. More...
 
int XLALH5FileCheckDatasetExists (const LALH5File UNUSED *file, const char UNUSED *name)
 Checks for existence of a dataset in a LALH5File. More...
 
int XLALH5CheckGroupExists (LALH5File UNUSED *file, const char UNUSED *name)
 DEPRECATED: Checks for existence of a Group in a LALH5File object LALH5File. More...
 
size_t XLALH5FileQueryNGroups (const LALH5File UNUSED *file)
 Gets the number of groups contained in a LALH5File. More...
 
int XLALH5FileQueryGroupName (char UNUSED *name, size_t UNUSED size, const LALH5File UNUSED *file, int UNUSED pos)
 Gets the name of a group contained in a LALH5File. More...
 
size_t XLALH5FileQueryNDatasets (const LALH5File UNUSED *file)
 Gets the number of datasets contained in a LALH5File. More...
 
int XLALH5FileQueryDatasetName (char UNUSED *name, size_t UNUSED size, const LALH5File UNUSED *file, int UNUSED pos)
 Gets the name of a dataset contained in a LALH5File. More...
 
int XLALH5FileGetDatasetNames (LALH5File UNUSED *file, char UNUSED ***names, UINT4 UNUSED *N)
 DEPRECATED: Gets dataset names from a LALH5File. More...
 

Dataset Routines

void XLALH5DatasetFree (LALH5Dataset UNUSED *dset)
 Frees a LALH5Dataset. More...
 
LALH5DatasetXLALH5DatasetAlloc (LALH5File UNUSED *file, const char UNUSED *name, LALTYPECODE UNUSED dtype, UINT4Vector UNUSED *dimLength)
 Allocates a multi-dimensional LALH5Dataset. More...
 
LALH5DatasetXLALH5DatasetAlloc1D (LALH5File UNUSED *file, const char UNUSED *name, LALTYPECODE UNUSED dtype, size_t UNUSED length)
 Allocates a 1-dimensional LALH5Dataset. More...
 
LALH5DatasetXLALH5DatasetAllocStringData (LALH5File UNUSED *file, const char UNUSED *name, size_t UNUSED length)
 Allocates a variable-length string LALH5Dataset. More...
 
int XLALH5DatasetWrite (LALH5Dataset UNUSED *dset, void UNUSED *data)
 Writes data to a LALH5Dataset. More...
 
LALH5DatasetXLALH5DatasetRead (LALH5File UNUSED *file, const char UNUSED *name)
 Reads a LALH5Dataset. More...
 
int XLALH5DatasetCheckStringData (LALH5Dataset UNUSED *dset)
 Checks if a LALH5Dataset contains variable length string data. More...
 
size_t XLALH5DatasetQueryNPoints (LALH5Dataset UNUSED *dset)
 Gets the number of points in a LALH5Dataset. More...
 
size_t XLALH5DatasetQueryNBytes (LALH5Dataset UNUSED *dset)
 Gets the number of bytes in a LALH5Dataset. More...
 
LALTYPECODE XLALH5DatasetQueryType (LALH5Dataset UNUSED *dset)
 Gets the type of data in a LALH5Dataset. More...
 
int XLALH5DatasetQueryNDim (LALH5Dataset UNUSED *dset)
 Gets the number of dimensions of the dataspace in a LALH5Dataset. More...
 
UINT4VectorXLALH5DatasetQueryDims (LALH5Dataset UNUSED *dset)
 Gets the dimensions of the dataspace in a LALH5Dataset. More...
 
int XLALH5DatasetQueryData (void UNUSED *data, LALH5Dataset UNUSED *dset)
 Gets the data contained in a LALH5Dataset. More...
 

Attribute Routines

These routines allow for reading or writing attributes to LALH5File or LALH5Dataset objects. To use these, the pointer to the object should be cast to a LALH5Generic type as in the following example.

LALH5File *file = XLALH5FileOpen("example.h5", "r");
LALH5Dataset *dset = XLALH5DatasetRead(file, "example_dataset");
size_t num_file_attrs;
size_t num_dset_attrs;
num_dset_attrs = XLALH5AttributeQueryN((LALH5Generic)dset);
LALH5Dataset * XLALH5DatasetRead(LALH5File *file, const char *name)
struct tagLALH5File LALH5File
Incomplete type for a HDF5 file.
Definition: H5FileIO.h:93
size_t XLALH5AttributeQueryN(const LALH5Generic object)
struct tagLALH5Dataset LALH5Dataset
Incomplete type for a HDF5 dataset.
Definition: H5FileIO.h:102
LALH5File * XLALH5FileOpen(const char *path, const char *mode)
Incomplete type for a pointer to an HDF5 file or group or dataset.
Definition: H5FileIO.h:110
size_t XLALH5AttributeCheckExists (const LALH5Generic UNUSED object, const char UNUSED *name)
 Checks for existence of an attribute associated with a LALH5File or LALH5Dataset. More...
 
size_t XLALH5AttributeQueryN (const LALH5Generic UNUSED object)
 Gets the number of attributes associated with a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryName (char UNUSED *name, size_t UNUSED size, const LALH5Generic UNUSED object, int UNUSED pos)
 Gets the name of an attribute associated with a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeAddScalar (LALH5Generic UNUSED object, const char UNUSED *key, const void UNUSED *value, LALTYPECODE UNUSED dtype)
 Adds a scalar attribute to a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeAddString (LALH5Generic UNUSED object, const char UNUSED *key, const char UNUSED *value)
 Adds a string attribute to a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeAddLIGOTimeGPS (LALH5Generic UNUSED object, const char UNUSED *key, const LIGOTimeGPS UNUSED *value)
 Adds a LIGOTimeGPS attribute to a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeAddEnumArray1D (LALH5Generic UNUSED object, const char UNUSED *enumnames[], const int UNUSED enumvals[], size_t UNUSED nenum, const char UNUSED *key, const int UNUSED value[], size_t UNUSED length)
 Adds a 1d enum array attribute to a LALH5File or LALH5Dataset. More...
 
LALTYPECODE XLALH5AttributeQueryScalarType (const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the datatype of an attribute in a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryScalarValue (void UNUSED *value, const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the value of a scalar attribute in a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryStringValue (char UNUSED *value, size_t UNUSED size, const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the value of a string attribute in a LALH5File or LALH5Dataset. More...
 
LIGOTimeGPSXLALH5AttributeQueryLIGOTimeGPSValue (LIGOTimeGPS UNUSED *value, const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the value of a LIGOTimeGPS attribute in a LALH5File or LALH5Dataset. More...
 
size_t XLALH5AttributeQueryEnumArray1DLength (const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the length of a 1D enum array attribute in a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryEnumArray1DValue (int UNUSED value[], const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the values in a 1D enum array attribute in a LALH5File or LALH5Dataset. More...
 
size_t XLALH5AttributeQueryNEnum (const LALH5Generic UNUSED object, const char UNUSED *key)
 Gets the number of constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryEnumName (char UNUSED *name, size_t UNUSED size, const LALH5Generic UNUSED object, const char UNUSED *key, int UNUSED pos)
 Gets the name of a constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset. More...
 
int XLALH5AttributeQueryEnumValue (const LALH5Generic UNUSED object, const char UNUSED *key, int UNUSED pos)
 Gets the value of a constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset. More...
 

File Attribute Routines

Deprecated:
Use the general Attribute Routines instead.
int XLALH5FileAddScalarAttribute (LALH5File UNUSED *file, const char UNUSED *key, const void UNUSED *value, LALTYPECODE UNUSED dtype)
 DEPRECATED: Adds a scalar attribute to a LALH5File. More...
 
int XLALH5FileGetAttributeNames (LALH5File UNUSED *file, char UNUSED ***names, UINT4 UNUSED *N)
 DEPRECATED: Gets attribute names from a LALH5File. More...
 
int XLALH5FileAddStringAttribute (LALH5File UNUSED *file, const char UNUSED *key, const char UNUSED *value)
 DEPRECATED: Adds a string attribute to a LALH5File. More...
 
int XLALH5FileAddLIGOTimeGPSAttribute (LALH5File UNUSED *file, const char UNUSED *key, const LIGOTimeGPS UNUSED *value)
 DEPRECATED: Adds a LIGOTimeGPS attribute to a LALH5File. More...
 
LALTYPECODE XLALH5FileQueryScalarAttributeType (LALH5File UNUSED *file, const char UNUSED *key)
 DEPRECATED: Gets the datatype of an attribute in a LALH5File. More...
 
int XLALH5FileQueryScalarAttributeValue (void UNUSED *value, LALH5File UNUSED *file, const char UNUSED *key)
 DEPRECATED: Gets the value of a scalar attribute in a LALH5File. More...
 
int XLALH5FileQueryStringAttributeValue (char UNUSED *value, size_t UNUSED size, LALH5File UNUSED *file, const char UNUSED *key)
 DEPRECATED: Gets the value of a string attribute in a LALH5File. More...
 
LIGOTimeGPSXLALH5FileQueryLIGOTimeGPSAttributeValue (LIGOTimeGPS UNUSED *value, LALH5File UNUSED *file, const char UNUSED *key)
 DEPRECATED: Gets the value of a LIGOTimeGPS attribute in a LALH5File. More...
 

Dataset Attribute Routines

Deprecated:
Use the general Attribute Routines instead.
int XLALH5DatasetAddScalarAttribute (LALH5Dataset UNUSED *dset, const char UNUSED *key, const void UNUSED *value, LALTYPECODE UNUSED dtype)
 DEPRECATED: Adds a scalar attribute to a LALH5Dataset. More...
 
int XLALH5DatasetAddStringAttribute (LALH5Dataset UNUSED *dset, const char UNUSED *key, const char UNUSED *value)
 DEPRECATED: Adds a string attribute to a LALH5Dataset. More...
 
int XLALH5DatasetAddLIGOTimeGPSAttribute (LALH5Dataset UNUSED *dset, const char UNUSED *key, const LIGOTimeGPS UNUSED *value)
 DEPRECATED: Adds a LIGOTimeGPS attribute to a LALH5Dataset. More...
 
LALTYPECODE XLALH5DatasetQueryScalarAttributeType (LALH5Dataset UNUSED *dset, const char UNUSED *key)
 DEPRECATED: Gets the datatype of an attribute in a LALH5Dataset. More...
 
int XLALH5DatasetQueryScalarAttributeValue (void UNUSED *value, LALH5Dataset UNUSED *dset, const char UNUSED *key)
 DEPRECATED: Gets the value of a scalar attribute in a LALH5Dataset. More...
 
int XLALH5DatasetQueryStringAttributeValue (char UNUSED *value, size_t UNUSED size, LALH5Dataset UNUSED *dset, const char UNUSED *key)
 DEPRECATED: Gets the value of a string attribute in a LALH5Dataset. More...
 
LIGOTimeGPSXLALH5DatasetQueryLIGOTimeGPSAttributeValue (LIGOTimeGPS UNUSED *value, LALH5Dataset UNUSED *dset, const char UNUSED *key)
 DEPRECATED: Gets the value of a LIGOTimeGPS attribute in a LALH5Dataset. More...
 

Function Documentation

◆ XLALH5FileClose()

void XLALH5FileClose ( LALH5File UNUSED *  file)

Closes a LALH5File.

This routine closes a LALH5File and deallocates resources associated with it. If the file was opened for writing, this routine also renames the temporary file as the actual file.

Parameters
fileA pointer to a LALH5File structure to close.

Definition at line 386 of file H5FileIOLowLevel.c.

◆ XLALH5FileOpen()

LALH5File* XLALH5FileOpen ( const char UNUSED *  path,
const char UNUSED *  mode 
)

Opens a LALH5File.

Opens a HDF5 file with pathname path and creates a LALH5File structure associated with it.

The mode parameter points to a string that determines whether the file is being opened for reading and writing. Allowed strings are:

r
Open file for reading.
w
Truncate to zero length or create file for writing.

If a file is opened for writing then data is initially written to a temporary file, and this file is renamed once the LALH5File structure is closed with XLALH5FileClose().

Parameters
pathPointer to a string containing the path of the file to open.
modeMode to open the file, either "r" or "w".
Returns
A pointer to a LALH5File structure associated with the specified HDF5 file.
Return values
NULLAn error occurred opening the file.

Definition at line 444 of file H5FileIOLowLevel.c.

◆ XLALH5GroupOpen()

LALH5File* XLALH5GroupOpen ( LALH5File UNUSED *  file,
const char UNUSED *  name 
)

Opens a group in a LALH5File.

Opens a HDF5 group with name name contained in the HDF5 file associated with the LALH5File file. If the HDF5 file is being read, the specified group must exist in that file. If the HDF5 file is being written, the specified group is created within the file.

Parameters
filePointer to a LALH5File structure in which to open the group.
namePointer to a string with the name of the group to open.
Returns
A pointer to a LALH5File structure associated with the specified group within a HDF5 file.
Return values
NULLAn error occurred opening the group.

Definition at line 474 of file H5FileIOLowLevel.c.

◆ XLALH5FileCheckGroupExists()

int XLALH5FileCheckGroupExists ( const LALH5File UNUSED *  file,
const char UNUSED *  name 
)

Checks for existence of a group in a LALH5File.

Checks if group with name name exists in the HDF5 file associated with the LALH5File file file. If the group exists the return code is 1. If the group does not exist a return code value of 0 is used.

Attention
Read failure results in a returned value of 0.
Parameters
filePointer to a LALH5File structure to check for group.
namePointer to a string with the name of the group to check.
Return values
0Group does not exist or failure.
1Group exists.

Definition at line 524 of file H5FileIOLowLevel.c.

◆ XLALH5FileCheckDatasetExists()

int XLALH5FileCheckDatasetExists ( const LALH5File UNUSED *  file,
const char UNUSED *  name 
)

Checks for existence of a dataset in a LALH5File.

Checks if dataset with name name exists in the HDF5 file associated with the LALH5File file file. If the dataset exists the return code is 1. If the dataset does not exist a return code value of 0 is used.

Attention
Read failure results in a returned value of 0.
Parameters
filePointer to a LALH5File structure to check for dataset.
namePointer to a string with the name of the dataset to check.
Return values
0Dataset does not exist or failure.
1Dataset exists.

Definition at line 552 of file H5FileIOLowLevel.c.

◆ XLALH5CheckGroupExists()

int XLALH5CheckGroupExists ( LALH5File UNUSED *  file,
const char UNUSED *  name 
)

DEPRECATED: Checks for existence of a Group in a LALH5File object LALH5File.

Checks if group with name exists in the HDF5 files associated with the LALH5File file. If the group exists the return code is 1 if the group does not exist a return code value of 0 is used.

Deprecated:
Use XLALH5FileCheckGroupExists instead.
Parameters
filePointer to a LALH5File structure to check for group in
namePointer to a string with the name of the group to check.
Returns
int, 1 if group exists. 0 if not.

Definition at line 617 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryNGroups()

size_t XLALH5FileQueryNGroups ( const LALH5File UNUSED *  file)

Gets the number of groups contained in a LALH5File.

This routines returns the number of groups contained in a an LALH5File file which can be either a file or a group. This routine does not recursively count subgroups of the groups found.

Parameters
filePointer to a LALH5File file or group to be queried.
Returns
The number of groups contained in the file or group.
Return values
-1Failure.

Definition at line 646 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryGroupName()

int XLALH5FileQueryGroupName ( char UNUSED *  name,
size_t UNUSED  size,
const LALH5File UNUSED *  file,
int UNUSED  pos 
)

Gets the name of a group contained in a LALH5File.

This routines gets the name of a group contained in a LALH5File file which can be either a file or a group. The index pos identifies which group's name is returned. The result is written into the buffer pointed to by name, the size of which is size bytes. If name is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer name.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer name should be allocated to be one byte larger.
Parameters
namePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
filePointer to a LALH5File file or group to be queried.
posThe index identifying which group contained in the file.
Return values
0Success.
-1Failure.

Definition at line 698 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryNDatasets()

size_t XLALH5FileQueryNDatasets ( const LALH5File UNUSED *  file)

Gets the number of datasets contained in a LALH5File.

This routines returns the number of datasets contained in a an LALH5File file which can be either a file or a group.

Parameters
filePointer to a LALH5File file or group to be queried.
Returns
The number of datasets contained in the file or group.
Return values
-1Failure.

Definition at line 749 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryDatasetName()

int XLALH5FileQueryDatasetName ( char UNUSED *  name,
size_t UNUSED  size,
const LALH5File UNUSED *  file,
int UNUSED  pos 
)

Gets the name of a dataset contained in a LALH5File.

This routines gets the name of a dataset contained in a LALH5File file which can be either a file or a group. The index pos identifies which dataset's name is returned. The result is written into the buffer pointed to by name, the size of which is size bytes. If name is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer name.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer name should be allocated to be one byte larger.
Parameters
namePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
filePointer to a LALH5File file or group to be queried.
posThe index identifying which dataset contained in the file.
Return values
0Success.
-1Failure.

Definition at line 801 of file H5FileIOLowLevel.c.

◆ XLALH5FileGetDatasetNames()

int XLALH5FileGetDatasetNames ( LALH5File UNUSED *  file,
char UNUSED ***  names,
UINT4 UNUSED *  N 
)

DEPRECATED: Gets dataset names from a LALH5File.

This routine returns the names of all datasets in a LALH5File.

Deprecated:
Use XLALH5AttributeQueryN() and XLALH5AttributeQueryName() instead.
Parameters
namesPointer a list of strings to be returned to the user. Memory should be freed by the caller.
NPointer to a UINT4 where the number of datasets will be recorded
fileLALH5File from which to read datasets
Return values
0Success.
-1Failure.

Definition at line 857 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetFree()

void XLALH5DatasetFree ( LALH5Dataset UNUSED *  dset)

Frees a LALH5Dataset.

Closes a HDF5 dataset associated with the LALH5Dataset dset and deallocates memory of the LALH5Dataset structure.

Parameters
dsetPointer to a LALH5Dataset structure to close.

Definition at line 918 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAlloc()

LALH5Dataset* XLALH5DatasetAlloc ( LALH5File UNUSED *  file,
const char UNUSED *  name,
LALTYPECODE UNUSED  dtype,
UINT4Vector UNUSED *  dimLength 
)

Allocates a multi-dimensional LALH5Dataset.

Creates a new HDF5 dataset with name name within a HDF5 file associated with the LALH5File file structure and allocates a LALH5Dataset structure associated with the dataset. The type of data to be stored in the dataset is given by the LALTYPECODE dtype and the rank array dimensions of the dataset is given by the UINT4Vector dimLength.

The LALH5File file passed to this routine must be a file opened for writing.

Parameters
filePointer to a LALH5File structure in which to create the dataset.
namePointer to a string with the name of the dataset to create.
dtypeLALTYPECODE value specifying the data type.
dimLengthPointer to a UINT4Vector specifying the dataspace dimensions.
Returns
A pointer to a LALH5Dataset structure associated with the specified dataset within a HDF5 file.
Return values
NULLAn error occurred creating the dataset.

Definition at line 955 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAlloc1D()

LALH5Dataset* XLALH5DatasetAlloc1D ( LALH5File UNUSED *  file,
const char UNUSED *  name,
LALTYPECODE UNUSED  dtype,
size_t UNUSED  length 
)

Allocates a 1-dimensional LALH5Dataset.

Creates a new HDF5 dataset with name name within a HDF5 file associated with the LALH5File file structure and allocates a LALH5Dataset structure associated with the dataset. The type of data to be stored in the dataset is given by the LALTYPECODE dtype and the number of points in the dataset is given by the length parameter.

The LALH5File file passed to this routine must be a file opened for writing.

Parameters
filePointer to a LALH5File structure in which to create the dataset.
namePointer to a string with the name of the dataset to create.
dtypeLALTYPECODE value specifying the data type.
lengthThe number of points of data in the dataset.
Returns
A pointer to a LALH5Dataset structure associated with the specified dataset within a HDF5 file.
Return values
NULLAn error occurred creating the dataset.

Definition at line 1039 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAllocStringData()

LALH5Dataset* XLALH5DatasetAllocStringData ( LALH5File UNUSED *  file,
const char UNUSED *  name,
size_t UNUSED  length 
)

Allocates a variable-length string LALH5Dataset.

Creates a new HDF5 dataset with name name within a HDF5 file associated with the LALH5File file structure and allocates a LALH5Dataset structure associated with the dataset. The type of data to be stored in the dataset is variable length strings and the number of strings in the dataset is given by the length parameter.

The LALH5File file passed to this routine must be a file opened for writing.

Parameters
filePointer to a LALH5File structure in which to create the dataset.
namePointer to a string with the name of the dataset to create.
lengthThe number of variable length strings in the dataset.
Returns
A pointer to a LALH5Dataset structure associated with the specified dataset within a HDF5 file.
Return values
NULLAn error occurred creating the dataset.

Definition at line 1110 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetWrite()

int XLALH5DatasetWrite ( LALH5Dataset UNUSED *  dset,
void UNUSED *  data 
)

Writes data to a LALH5Dataset.

Writes the data contained in data to a HDF5 dataset associated with the LALH5Dataset dset structure.

Parameters
dsetPointer to a LALH5Dataset structure to which to write the data.
dataPointer to the data buffer to be written.
Return values
0Success.
-1Failure.

Definition at line 1176 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetRead()

LALH5Dataset* XLALH5DatasetRead ( LALH5File UNUSED *  file,
const char UNUSED *  name 
)

Reads a LALH5Dataset.

Opens an existing HDF5 dataset with name name within a HDF5 file associated with the LALH5File file structure and allocates a LALH5Dataset structure associated with the dataset.

The LALH5File file passed to this routine must be a file opened for reading.

Parameters
filePointer to a LALH5File structure containing the dataset to be opened.
namePointer to a string with the name of the dataset to open.
Returns
A pointer to a LALH5Dataset structure associated with the specified dataset within a HDF5 file.
Return values
NULLAn error occurred creating the dataset.

Definition at line 1206 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetCheckStringData()

int XLALH5DatasetCheckStringData ( LALH5Dataset UNUSED *  dset)

Checks if a LALH5Dataset contains variable length string data.

Parameters
dsetPointer to a LALH5Dataset to be checked.
Return values
1LALH5Dataset is of variable length string type
0LALH5Dataset is not of variable length string type
-1Failure.

Definition at line 1266 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryNPoints()

size_t XLALH5DatasetQueryNPoints ( LALH5Dataset UNUSED *  dset)

Gets the number of points in a LALH5Dataset.

Parameters
dsetPointer to a LALH5Dataset to be queried.
Returns
The number of points in the HDF5 dataset associated with the specified LALH5Dataset.
Return values
(size_t)(-1)Failure.

Definition at line 1282 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryNBytes()

size_t XLALH5DatasetQueryNBytes ( LALH5Dataset UNUSED *  dset)

Gets the number of bytes in a LALH5Dataset.

Parameters
dsetPointer to a LALH5Dataset to be queried.
Returns
The number of bytes in the HDF5 dataset associated with the specified LALH5Dataset. This is the number of bytes required to hold the data in that dataset.
Return values
(size_t)(-1)Failure.

Definition at line 1305 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryType()

LALTYPECODE XLALH5DatasetQueryType ( LALH5Dataset UNUSED *  dset)

Gets the type of data in a LALH5Dataset.

Parameters
dsetPointer to a LALH5Dataset to be queried.
Returns
The LALTYPECODE of the datatype in the HDF5 dataset associated with the specified LALH5Dataset.
Return values
-1Failure.

Definition at line 1331 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryNDim()

int XLALH5DatasetQueryNDim ( LALH5Dataset UNUSED *  dset)

Gets the number of dimensions of the dataspace in a LALH5Dataset.

Parameters
dsetPointer to a LALH5Dataset to be queried.
Returns
The number of dimensions in the dataspace in the HDF5 dataset associated with the specified LALH5Dataset.
Return values
-1Failure.

Definition at line 1353 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryDims()

UINT4Vector* XLALH5DatasetQueryDims ( LALH5Dataset UNUSED *  dset)

Gets the dimensions of the dataspace in a LALH5Dataset.

Parameters
dsetPointer to a LALH5Dataset to be queried.
Returns
A pointer to a newly-allocated UINT4Vector containing the dimensions of the dataspace in the HDF5 dataset associated with the * specified LALH5Dataset.
Return values
NULLFailure.

Definition at line 1376 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryData()

int XLALH5DatasetQueryData ( void UNUSED *  data,
LALH5Dataset UNUSED *  dset 
)

Gets the data contained in a LALH5Dataset.

This routine reads data from a HDF5 dataset associated with the LALH5Dataset dset and stores the data in the buffer data. This buffer should be sufficiently large to hold the entire contents of the dataset; this size can be determined with the routine XLALH5DatasetQueryNBytes(). If the dataset contains variable-length string data, data should instead be a pointer to an array of length npoints of char* pointers where npoints can be determined with the routine XLALH5DatasetQueryNPoints(). In this case, each of the npoints strings will be allocated using LALMalloc().

Parameters
dataPointer to a memory in which to store the data.
dsetPointer to a LALH5Dataset from which to extract the data.
Return values
0Success.
-1Failure.

Definition at line 1444 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeCheckExists()

size_t XLALH5AttributeCheckExists ( const LALH5Generic UNUSED  object,
const char UNUSED *  name 
)

Checks for existence of an attribute associated with a LALH5File or LALH5Dataset.

Checks if there is an attribute with name name associated with an HDF5 object object that is either a LALH5File or LALH5Dataset. If the attribute exists the return code is 1; if the dataset does not exist a return code value of 0 is used.

Attention
Read failure results in a returned value of 0.
Parameters
objectPointer to a LALH5File or LALH5Dataset to check for attribute.
namePointer to a string with the name of the attribute to check.
Return values
0Attribute does not exist or failure.
1Attribute exists.

Definition at line 1518 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryN()

size_t XLALH5AttributeQueryN ( const LALH5Generic UNUSED  object)

Gets the number of attributes associated with a LALH5File or LALH5Dataset.

This routines returns the number of attributes associated with an HDF5 object object that is either a LALH5File or LALH5Dataset.

Parameters
objectPointer to a LALH5File or LALH5Dataset that will be queried.
Returns
The number of attributes associated with the object.
Return values
-1Failure.

Definition at line 1574 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryName()

int XLALH5AttributeQueryName ( char UNUSED *  name,
size_t UNUSED  size,
const LALH5Generic UNUSED  object,
int UNUSED  pos 
)

Gets the name of an attribute associated with a LALH5File or LALH5Dataset.

This routines gets the name of an attributes associated with an HDF5 object object that is either a LALH5File or LALH5Dataset. The index pos identifies which attribute's name is returned. The result is written into the buffer pointed to by name, the size of which is size bytes. If name is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer name.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer name should be allocated to be one byte larger.
Parameters
namePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
objectPointer to a LALH5File or LALH5Dataset that will be queried.
posThe index identifying which attribute associated with the object.
Return values
0Success.
-1Failure.

Definition at line 1621 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeAddScalar()

int XLALH5AttributeAddScalar ( LALH5Generic UNUSED  object,
const char UNUSED *  key,
const void UNUSED *  value,
LALTYPECODE UNUSED  dtype 
)

Adds a scalar attribute to a LALH5File or LALH5Dataset.

This routine adds a scalar-valued attribute with name key and value given by the memory addressed by value to a HDF5 object associated with the LALH5File or LALH5Dataset object. The data type of the scalar value is given by the LALTYPECODE dtype.

Parameters
objectPointer to a LALH5File or LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to the value of the scalar attribute to be added.
dtypeLALTYPECODE value specifying the data type of the attribute.
Return values
0Success.
-1Failure.

Definition at line 1671 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeAddString()

int XLALH5AttributeAddString ( LALH5Generic UNUSED  object,
const char UNUSED *  key,
const char UNUSED *  value 
)

Adds a string attribute to a LALH5File or LALH5Dataset.

This routine adds a NUL-terminated variable-length string value attribute with name key to a HDF5 object associated with the LALH5File or LALH5Dataset object.

Parameters
objectPointer to a LALH5File or LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a string with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 1727 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeAddLIGOTimeGPS()

int XLALH5AttributeAddLIGOTimeGPS ( LALH5Generic UNUSED  object,
const char UNUSED *  key,
const LIGOTimeGPS UNUSED *  value 
)

Adds a LIGOTimeGPS attribute to a LALH5File or LALH5Dataset.

This routine adds a LIGOTimeGPS value attribute with name key to a HDF5 object associated with the LALH5File or LALH5Dataset object.

Parameters
objectPointer to a LALH5File or LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a LIGOTimeGPS structure with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 1788 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeAddEnumArray1D()

int XLALH5AttributeAddEnumArray1D ( LALH5Generic UNUSED  object,
const char UNUSED *  enumnames[],
const int UNUSED  enumvals[],
size_t UNUSED  nenum,
const char UNUSED *  key,
const int UNUSED  value[],
size_t UNUSED  length 
)

Adds a 1d enum array attribute to a LALH5File or LALH5Dataset.

This routine adds the 1d enum array value of length length attribute with name key to a HDF5 object associated with the LALH5File or LALH5Dataset object. The names and values of the nenum enumeration constants are provided in the arrays enumnames and enumvals respectively.

Parameters
objectPointer to a LALH5File or LALH5Dataset to which the attribute will be added.
enumnamesPointer to an array of names of the enum constants.
enumvalsPointer to an array of values of the enum constants.
nenumNumber of enum constants.
keyPointer to a string with the name of the new attribute.
valuePointer to an array of enum values.
lengthLength of the array of enum values.
Return values
0Success.
-1Failure.

Definition at line 1851 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryScalarType()

LALTYPECODE XLALH5AttributeQueryScalarType ( const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the datatype of an attribute in a LALH5File or LALH5Dataset.

This routine queries the datatype of a scalar attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object.

Parameters
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
LALTYPECODE value of the datatype of the scalar attribute.
Return values
-1Failure.

Definition at line 1912 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryScalarValue()

int XLALH5AttributeQueryScalarValue ( void UNUSED *  value,
const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the value of a scalar attribute in a LALH5File or LALH5Dataset.

This routine queries the value of a scalar attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object. The value is stored in memory pointed to by the pointer value.

Attention
This routine does not allocate memory for value. The calling routine must ensure that the memory addressed by the pointer value is sufficient to hold the value in the attribute.
Parameters
valuePointer to memory in which the value will be stored.
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Return values
0Success.
-1Failure.

Definition at line 1982 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryStringValue()

int XLALH5AttributeQueryStringValue ( char UNUSED *  value,
size_t UNUSED  size,
const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the value of a string attribute in a LALH5File or LALH5Dataset.

This routine queries the value of a string attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object. The result is written into the buffer pointed to by value, the size of which is size bytes. If value is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer value.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer value should be allocated to be one byte larger.
Parameters
valuePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
The number of bytes that would be written to value had size been sufficiently large excluding the terminating NUL byte.
Return values
-1Failure.

Definition at line 2065 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryLIGOTimeGPSValue()

LIGOTimeGPS* XLALH5AttributeQueryLIGOTimeGPSValue ( LIGOTimeGPS UNUSED *  value,
const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the value of a LIGOTimeGPS attribute in a LALH5File or LALH5Dataset.

This routine queries the value of a LIGOTimeGPS attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object. The value is stored in memory pointed to by the pointer value.

Parameters
valuePointer to a LIGOTimeGPS structure in which the attribute value will be stored.
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
Pointer to the LIGOTimeGPS structure passed to this routine.
Return values
NULLFailure.

Definition at line 2145 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryEnumArray1DLength()

size_t XLALH5AttributeQueryEnumArray1DLength ( const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the length of a 1D enum array attribute in a LALH5File or LALH5Dataset.

This routine queries the length of a 1D enum array with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object.

Parameters
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
Length of the 1D enum array.
Return values
-1Failure.

Definition at line 2265 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryEnumArray1DValue()

int XLALH5AttributeQueryEnumArray1DValue ( int UNUSED  value[],
const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the values in a 1D enum array attribute in a LALH5File or LALH5Dataset.

This routine reads the values of a 1D enum array with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object into the array value.

Attention
This routine does not allocate memory for value. The calling routine must ensure that the memory addressed by the pointer value is sufficient to hold the value in the attribute. The routine XLALH5AttributeQueryEnumArray1DLength() will yield the length that this array must have.
Parameters
valuePointer to an array where then enum values will be stored.
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Return values
0Success.
-1Failure.

Definition at line 2336 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryNEnum()

size_t XLALH5AttributeQueryNEnum ( const LALH5Generic UNUSED  object,
const char UNUSED *  key 
)

Gets the number of constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset.

This routine queries the number constants in an enum type associated with the attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object.

Parameters
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
Number of constants in enum type.
Return values
-1Failure.

Definition at line 2397 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryEnumName()

int XLALH5AttributeQueryEnumName ( char UNUSED *  name,
size_t UNUSED  size,
const LALH5Generic UNUSED  object,
const char UNUSED *  key,
int UNUSED  pos 
)

Gets the name of a constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset.

This routine queries the name of a constant in an enum type associated with the attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object. The index pos identifies which constant's name is returned. The result is written into the buffer pointed to by name, the size of which is size bytes. If name is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer name.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer name should be allocated to be one byte larger.
Parameters
namePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
posThe index identifying which enum constant.
Returns
The number of bytes that would be written to name had size been sufficiently large excluding the terminating NUL byte.
Return values
-1Failure.

Definition at line 2484 of file H5FileIOLowLevel.c.

◆ XLALH5AttributeQueryEnumValue()

int XLALH5AttributeQueryEnumValue ( const LALH5Generic UNUSED  object,
const char UNUSED *  key,
int UNUSED  pos 
)

Gets the value of a constants in an enum type associated with an attribute in a LALH5File or LALH5Dataset.

This routine queries the value of a constant in an enum type associated with the attribute with name key in a HDF5 object associated with the LALH5File or LALH5Dataset object. The index pos identifies which constant's name is returned.

Parameters
objectPointer to a LALH5File or LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
posThe index identifying which enum constant.
Returns
The value of the enum constant.
Return values
-1Failure. Note that -1 might also be a valid enum constant!

Definition at line 2573 of file H5FileIOLowLevel.c.

◆ XLALH5FileAddScalarAttribute()

int XLALH5FileAddScalarAttribute ( LALH5File UNUSED *  file,
const char UNUSED *  key,
const void UNUSED *  value,
LALTYPECODE UNUSED  dtype 
)

DEPRECATED: Adds a scalar attribute to a LALH5File.

This routine adds a scalar-valued attribute with name key and value given by the memory addressed by value to a HDF5 file associated with the LALH5File file. The data type of the scalar value is given by the LALTYPECODE dtype.

Deprecated:
Use XLALH5AttributeAddScalar() instead.
Parameters
filePointer to a LALH5File to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to the value of the scalar attribute to be added.
dtypeLALTYPECODE value specifying the data type of the attribute.
Return values
0Success.
-1Failure.

Definition at line 2675 of file H5FileIOLowLevel.c.

◆ XLALH5FileGetAttributeNames()

int XLALH5FileGetAttributeNames ( LALH5File UNUSED *  file,
char UNUSED ***  names,
UINT4 UNUSED *  N 
)

DEPRECATED: Gets attribute names from a LALH5File.

This routine returns the names of all attributes from a HDF5 Dataset

Deprecated:
Use XLALH5AttributeQueryN() and XLALH5AttributeQueryName() instead.
Parameters
namesPointer a list of strings to be returned to the user. Memory should be freed by the caller.
filePointer to a LALH5File from which the attributes will be added.
NPointer to a UINT4 where the number of datasets will be recorded
Return values
0Success.
-1Failure.

Definition at line 2702 of file H5FileIOLowLevel.c.

◆ XLALH5FileAddStringAttribute()

int XLALH5FileAddStringAttribute ( LALH5File UNUSED *  file,
const char UNUSED *  key,
const char UNUSED *  value 
)

DEPRECATED: Adds a string attribute to a LALH5File.

This routine adds a NUL-terminated variable-length string value attribute with name key to a HDF5 file associated with the LALH5File file.

Deprecated:
Use XLALH5AttributeAddString() instead.
Parameters
filePointer to a LALH5File to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a string with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 2752 of file H5FileIOLowLevel.c.

◆ XLALH5FileAddLIGOTimeGPSAttribute()

int XLALH5FileAddLIGOTimeGPSAttribute ( LALH5File UNUSED *  file,
const char UNUSED *  key,
const LIGOTimeGPS UNUSED *  value 
)

DEPRECATED: Adds a LIGOTimeGPS attribute to a LALH5File.

This routine adds a LIGOTimeGPS value attribute with name key to a HDF5 file associated with the LALH5File file.

Deprecated:
Use XLALH5AttributeAddLIGOTimeGPS() instead.
Parameters
filePointer to a LALH5File to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a LIGOTimeGPS structure with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 2780 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryScalarAttributeType()

LALTYPECODE XLALH5FileQueryScalarAttributeType ( LALH5File UNUSED *  file,
const char UNUSED *  key 
)

DEPRECATED: Gets the datatype of an attribute in a LALH5File.

This routine queries the datatype of a scalar attribute with name key in a HDF5 file associated with the LALH5File file.

Deprecated:
Use XLALH5AttributeQueryScalarType() instead.
Parameters
filePointer to a LALH5File to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
LALTYPECODE value of the datatype of the scalar attribute.
Return values
-1Failure.

Definition at line 2806 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryScalarAttributeValue()

int XLALH5FileQueryScalarAttributeValue ( void UNUSED *  value,
LALH5File UNUSED *  file,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a scalar attribute in a LALH5File.

This routine queries the value of a scalar attribute with name key in a HDF5 file associated with the LALH5File file. The value is stored in memory pointed to by the pointer value.

Attention
This routine does not allocate memory for value. The calling routine must ensure that the memory addressed by the pointer value is sufficient to hold the value in the attribute.
Deprecated:
Use XLALH5AttributeQueryScalarValue() instead.
Parameters
valuePointer to memory in which the value will be stored.
filePointer to a LALH5File to be queried.
keyPointer to a string with the name of the attribute to query.
Return values
0Success.
-1Failure.

Definition at line 2843 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryStringAttributeValue()

int XLALH5FileQueryStringAttributeValue ( char UNUSED *  value,
size_t UNUSED  size,
LALH5File UNUSED *  file,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a string attribute in a LALH5File.

This routine queries the value of a string attribute with name key in a HDF5 file associated with the LALH5File file. The result is written into the buffer pointed to by value, the size of which is size bytes. If value is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer value.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer value should be allocated to be one byte larger.
Deprecated:
Use XLALH5AttributeQueryStringValue() instead.
Parameters
valuePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
filePointer to a LALH5File to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
The number of bytes that would be written to value had size been sufficiently large excluding the terminating NUL byte.
Return values
-1Failure.

Definition at line 2884 of file H5FileIOLowLevel.c.

◆ XLALH5FileQueryLIGOTimeGPSAttributeValue()

LIGOTimeGPS* XLALH5FileQueryLIGOTimeGPSAttributeValue ( LIGOTimeGPS UNUSED *  value,
LALH5File UNUSED *  file,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a LIGOTimeGPS attribute in a LALH5File.

This routine queries the value of a LIGOTimeGPS attribute with name key in a HDF5 file associated with the LALH5File file. The value is stored in memory pointed to by the pointer value.

Deprecated:
Use XLALH5AttributeQueryLIGOTimeGPSValue() instead.
Parameters
valuePointer to a LIGOTimeGPS structure in which the attribute value will be stored.
filePointer to a LALH5File to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
Pointer to the LIGOTimeGPS structure passed to this routine.
Return values
NULLFailure.

Definition at line 2917 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAddScalarAttribute()

int XLALH5DatasetAddScalarAttribute ( LALH5Dataset UNUSED *  dset,
const char UNUSED *  key,
const void UNUSED *  value,
LALTYPECODE UNUSED  dtype 
)

DEPRECATED: Adds a scalar attribute to a LALH5Dataset.

This routine adds a scalar-valued attribute with name key and value given by the memory addressed by value to a HDF5 dataset associated with the LALH5Dataset dset. The data type of the scalar value is given by the LALTYPECODE dtype.

Deprecated:
Use XLALH5AttributeAddScalar() instead.
Parameters
dsetPointer to a LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to the value of the scalar attribute to be added.
dtypeLALTYPECODE value specifying the data type of the attribute.
Return values
0Success.
-1Failure.

Definition at line 2960 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAddStringAttribute()

int XLALH5DatasetAddStringAttribute ( LALH5Dataset UNUSED *  dset,
const char UNUSED *  key,
const char UNUSED *  value 
)

DEPRECATED: Adds a string attribute to a LALH5Dataset.

This routine adds a NUL-terminated variable-length string value attribute with name key to a HDF5 dataset associated with the LALH5Dataset dset.

Deprecated:
Use XLALH5AttributeAddString() instead.
Parameters
dsetPointer to a LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a string with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 2988 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetAddLIGOTimeGPSAttribute()

int XLALH5DatasetAddLIGOTimeGPSAttribute ( LALH5Dataset UNUSED *  dset,
const char UNUSED *  key,
const LIGOTimeGPS UNUSED *  value 
)

DEPRECATED: Adds a LIGOTimeGPS attribute to a LALH5Dataset.

This routine adds a LIGOTimeGPS value attribute with name key to a HDF5 dataset associated with the LALH5Dataset dset.

Deprecated:
Use XLALH5AttributeAddLIGOTimeGPS() instead.
Parameters
dsetPointer to a LALH5Dataset to which the attribute will be added.
keyPointer to a string with the name of the new attribute.
valuePointer to a LIGOTimeGPS structure with the value of the new attribute.
Return values
0Success.
-1Failure.

Definition at line 3016 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryScalarAttributeType()

LALTYPECODE XLALH5DatasetQueryScalarAttributeType ( LALH5Dataset UNUSED *  dset,
const char UNUSED *  key 
)

DEPRECATED: Gets the datatype of an attribute in a LALH5Dataset.

This routine queries the datatype of a scalar attribute with name key in a HDF5 dataset associated with the LALH5Dataset dset.

Deprecated:
Use XLALH5AttributeQueryScalarType() instead.
Parameters
dsetPointer to a LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
LALTYPECODE value of the datatype of the scalar attribute.
Return values
-1Failure.

Definition at line 3042 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryScalarAttributeValue()

int XLALH5DatasetQueryScalarAttributeValue ( void UNUSED *  value,
LALH5Dataset UNUSED *  dset,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a scalar attribute in a LALH5Dataset.

This routine queries the value of a scalar attribute with name key in a HDF5 dataset associated with the LALH5Dataset dset. The value is stored in memory pointed to by the pointer value.

Attention
This routine does not allocate memory for value. The calling routine must ensure that the memory addressed by the pointer value is sufficient to hold the value in the attribute.
Deprecated:
Use XLALH5AttributeQueryScalarValue() instead.
Parameters
valuePointer to memory in which the value will be stored.
dsetPointer to a LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Return values
0Success.
-1Failure.

Definition at line 3079 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryStringAttributeValue()

int XLALH5DatasetQueryStringAttributeValue ( char UNUSED *  value,
size_t UNUSED  size,
LALH5Dataset UNUSED *  dset,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a string attribute in a LALH5Dataset.

This routine queries the value of a string attribute with name key in a HDF5 dataset associated with the LALH5Dataset dset. The result is written into the buffer pointed to by value, the size of which is size bytes. If value is NULL, no data is copied but the routine returns the length of the string. Therefore, this routine can be called once to determine the amount of memory required, the memory can be allocated, and then it can be called a second time to read the string. If the parameter size is less than or equal to the string length then only $p size-1 bytes of the string are copied to the buffer value.

Note
The return value is the length of the string, not including the terminating NUL character; thus the buffer value should be allocated to be one byte larger.
Deprecated:
Use XLALH5AttributeQueryStringValue() instead.
Parameters
valuePointer to a buffer into which the string will be written.
sizeSize in bytes of the buffer into which the string will be written.
dsetPointer to a LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
The number of bytes that would be written to value had size been sufficiently large excluding the terminating NUL byte.
Return values
NULLFailure.

Definition at line 3120 of file H5FileIOLowLevel.c.

◆ XLALH5DatasetQueryLIGOTimeGPSAttributeValue()

LIGOTimeGPS* XLALH5DatasetQueryLIGOTimeGPSAttributeValue ( LIGOTimeGPS UNUSED *  value,
LALH5Dataset UNUSED *  dset,
const char UNUSED *  key 
)

DEPRECATED: Gets the value of a LIGOTimeGPS attribute in a LALH5Dataset.

This routine queries the value of a LIGOTimeGPS attribute with name key in a HDF5 dataset associated with the LALH5Dataset dset. The value is stored in memory pointed to by the pointer value.

Deprecated:
Use XLALH5AttributeQueryLIGOTimeGPSValue() instead.
Parameters
valuePointer to a LIGOTimeGPS structure in which the attribute value will be stored.
dsetPointer to a LALH5Dataset to be queried.
keyPointer to a string with the name of the attribute to query.
Returns
Pointer to the LIGOTimeGPS structure passed to this routine.
Return values
NULLFailure.

Definition at line 3153 of file H5FileIOLowLevel.c.