Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-3a66518
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
H5FileIOMidLevel.c
Go to the documentation of this file.
1#include <lal/LALStdlib.h>
2#include <lal/AVFactories.h>
3#include <lal/SeqFactories.h>
4#include <lal/StringVector.h>
5#include <lal/H5FileIO.h>
6
7#define FAILVAL XLAL_FAILURE
8
9#define TYPECODE CHAR
10#define TYPE CHAR
13#undef TYPECODE
14#undef TYPE
15
16#define TYPECODE I2
17#define TYPE INT2
21#undef TYPECODE
22#undef TYPE
23
24#define TYPECODE I4
25#define TYPE INT4
29#undef TYPECODE
30#undef TYPE
31
32#define TYPECODE I8
33#define TYPE INT8
37#undef TYPECODE
38#undef TYPE
39
40#define TYPECODE UCHAR
41#define TYPE UCHAR
43#undef TYPECODE
44#undef TYPE
45
46#define TYPECODE U2
47#define TYPE UINT2
51#undef TYPECODE
52#undef TYPE
53
54#define TYPECODE U4
55#define TYPE UINT4
59#undef TYPECODE
60#undef TYPE
61
62#define TYPECODE U8
63#define TYPE UINT8
67#undef TYPECODE
68#undef TYPE
69
70#undef FAILVAL
71
72#define FAILVAL XLAL_REAL4_FAIL_NAN
73
74#define TYPECODE S
75#define TYPE REAL4
79#undef TYPECODE
80#undef TYPE
81
82#undef FAILVAL
83
84#define FAILVAL XLAL_REAL4_FAIL_NAN
85
86#define TYPECODE D
87#define TYPE REAL8
91#undef TYPECODE
92#undef TYPE
93
94#undef FAILVAL
95
96#define FAILVAL XLAL_REAL4_FAIL_NAN
97
98#define TYPECODE C
99#define TYPE COMPLEX8
102#include "H5FileIOArray_source.c"
103#undef TYPECODE
104#undef TYPE
105
106#undef FAILVAL
107
108#define FAILVAL XLAL_REAL8_FAIL_NAN
109
110#define TYPECODE Z
111#define TYPE COMPLEX16
114#include "H5FileIOArray_source.c"
115#undef TYPECODE
116#undef TYPE
117
118#undef FAILVAL
119
120/**
121 * @addtogroup H5FileIOMidLevel_c
122 * @brief Mid-level routines for reading/writing HDF5 files.
123 * @details
124 * These routines are mid-level routines for accessing HDF files.
125 * They make use of the #LALH5Dataset structures. For most
126 * purposes, it is more convenient to use the high-level routines
127 * that directly access #LALH5File structures.
128 * @{
129 */
130
131/**
132 * @name Routines to Add Attributes
133 * @{
134 */
135
136/**
137 * @fn int XLALH5DatasetAddCHARAttribute(LALH5Dataset *dset, const char *key, CHAR value)
138 * @brief Adds a scalar attribute to a #LALH5Dataset
139 * @details
140 * This routine adds a scalar-valued attribute with name @p key and value @p
141 * value to a HDF5 dataset associated with the #LALH5Dataset @p dset.
142 * @param dset Pointer to a #LALH5Dataset to which the attribute will be added.
143 * @param key Pointer to a string with the name of the new attribute.
144 * @param value Value of the scalar attribute to be added.
145 * @retval 0 Success.
146 * @retval -1 Failure.
147 */
148
149/**
150 * @fn int XLALH5DatasetAddINT2Attribute(LALH5Dataset *dset, const char *key, INT2 value)
151 * @copydoc XLALH5DatasetAddCHARAttribute()
152 */
153
154/**
155 * @fn int XLALH5DatasetAddINT4Attribute(LALH5Dataset *dset, const char *key, INT4 value)
156 * @copydoc XLALH5DatasetAddCHARAttribute()
157 */
158
159/**
160 * @fn int XLALH5DatasetAddINT8Attribute(LALH5Dataset *dset, const char *key, INT8 value)
161 * @copydoc XLALH5DatasetAddCHARAttribute()
162 */
163
164/**
165 * @fn int XLALH5DatasetAddUCHARAttribute(LALH5Dataset *dset, const char *key, UCHAR value)
166 * @copydoc XLALH5DatasetAddCHARAttribute()
167 */
168
169/**
170 * @fn int XLALH5DatasetAddUINT2Attribute(LALH5Dataset *dset, const char *key, UINT2 value)
171 * @copydoc XLALH5DatasetAddCHARAttribute()
172 */
173
174/**
175 * @fn int XLALH5DatasetAddUINT4Attribute(LALH5Dataset *dset, const char *key, UINT4 value)
176 * @copydoc XLALH5DatasetAddCHARAttribute()
177 */
178
179/**
180 * @fn int XLALH5DatasetAddUINT8Attribute(LALH5Dataset *dset, const char *key, UINT8 value)
181 * @copydoc XLALH5DatasetAddCHARAttribute()
182 */
183
184/**
185 * @fn int XLALH5DatasetAddREAL4Attribute(LALH5Dataset *dset, const char *key, REAL4 value)
186 * @copydoc XLALH5DatasetAddCHARAttribute()
187 */
188
189/**
190 * @fn int XLALH5DatasetAddREAL8Attribute(LALH5Dataset *dset, const char *key, REAL8 value)
191 * @copydoc XLALH5DatasetAddCHARAttribute()
192 */
193
194/**
195 * @fn int XLALH5DatasetAddCOMPLEX8Attribute(LALH5Dataset *dset, const char *key, COMPLEX8 value)
196 * @copydoc XLALH5DatasetAddCHARAttribute()
197 */
198
199/**
200 * @fn int XLALH5DatasetAddCOMPLEX16Attribute(LALH5Dataset *dset, const char *key, COMPLEX16 value)
201 * @copydoc XLALH5DatasetAddCHARAttribute()
202 */
203
204/** @} */
205
206/**
207 * @name Routines to Query Attributes
208 * @{
209 */
210
211/**
212 * @fn XLALH5DatasetQueryCHARAttributeValue(LALH5Dataset *dset, const char *key)
213 * @brief Gets the value of a scalar attribute in a #LALH5Dataset
214 * @details
215 * This routine queries the datatype of a scalar attribute with
216 * name @p key in a HDF5 dataset associated with the #LALH5Dataset @p dset.
217 * @param dset Pointer to a #LALH5Dataset to be queried.
218 * @param key Pointer to a string with the name of the attribute to query.
219 * @returns Value of the scalar attribute.
220 */
221
222/**
223 * @fn XLALH5DatasetQueryINT2AttributeValue(LALH5Dataset *dset, const char *key)
224 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
225 */
226
227/**
228 * @fn XLALH5DatasetQueryINT4AttributeValue(LALH5Dataset *dset, const char *key)
229 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
230 */
231
232/**
233 * @fn XLALH5DatasetQueryINT8AttributeValue(LALH5Dataset *dset, const char *key)
234 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
235 */
236
237/**
238 * @fn XLALH5DatasetQueryUCHARAttributeValue(LALH5Dataset *dset, const char *key)
239 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
240 */
241
242/**
243 * @fn XLALH5DatasetQueryUINT2AttributeValue(LALH5Dataset *dset, const char *key)
244 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
245 */
246
247/**
248 * @fn XLALH5DatasetQueryUINT4AttributeValue(LALH5Dataset *dset, const char *key)
249 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
250 */
251
252/**
253 * @fn XLALH5DatasetQueryUINT8AttributeValue(LALH5Dataset *dset, const char *key)
254 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
255 */
256
257/**
258 * @fn XLALH5DatasetQueryREAL4AttributeValue(LALH5Dataset *dset, const char *key)
259 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
260 */
261
262/**
263 * @fn XLALH5DatasetQueryREAL8AttributeValue(LALH5Dataset *dset, const char *key)
264 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
265 */
266
267/**
268 * @fn XLALH5DatasetQueryCOMPLEX8AttributeValue(LALH5Dataset *dset, const char *key)
269 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
270 */
271
272/**
273 * @fn XLALH5DatasetQueryCOMPLEX16AttributeValue(LALH5Dataset *dset, const char *key)
274 * @copydoc XLALH5DatasetQueryCHARAttributeValue()
275 */
276
277/** @} */
278
279/**
280 * @name Routines to Allocate Vector Datasets
281 * @{
282 */
283
284/**
285 * @fn LALH5Dataset *XLALH5DatasetAllocCHARVector(LALH5File *file, const char *name, CHARVector *vector)
286 * @brief Allocates a #LALH5Dataset
287 * @details
288 * Creates a new HDF5 dataset with name @p name within a HDF5 file
289 * associated with the #LALH5File @p file structure and allocates a
290 * #LALH5Dataset structure associated with the dataset. The data
291 * in the dataset is set to the data in the vector @p vector.
292 *
293 * The #LALH5File @p file passed to this routine must be a file
294 * opened for writing.
295 *
296 * @param file Pointer to a #LALH5File structure in which to create the dataset.
297 * @param name Pointer to a string with the name of the dataset to create.
298 * @param vector Pointer to a vector structure containing the data.
299 * @returns A pointer to a #LALH5Dataset structure associated with the
300 * specified dataset within a HDF5 file.
301 * @retval NULL An error occurred creating the dataset.
302 */
303
304/**
305 * @fn LALH5Dataset *XLALH5DatasetAllocINT2Vector(LALH5File *file, const char *name, INT2Vector *vector)
306 * @copydoc XLALH5DatasetAllocCHARVector()
307 */
308
309/**
310 * @fn LALH5Dataset *XLALH5DatasetAllocINT4Vector(LALH5File *file, const char *name, INT4Vector *vector)
311 * @copydoc XLALH5DatasetAllocCHARVector()
312 */
313
314/**
315 * @fn LALH5Dataset *XLALH5DatasetAllocINT8Vector(LALH5File *file, const char *name, INT8Vector *vector)
316 * @copydoc XLALH5DatasetAllocCHARVector()
317 */
318
319/**
320 * @fn LALH5Dataset *XLALH5DatasetAllocUINT2Vector(LALH5File *file, const char *name, UINT2Vector *vector)
321 * @copydoc XLALH5DatasetAllocCHARVector()
322 */
323
324/**
325 * @fn LALH5Dataset *XLALH5DatasetAllocUINT4Vector(LALH5File *file, const char *name, UINT4Vector *vector)
326 * @copydoc XLALH5DatasetAllocCHARVector()
327 */
328
329/**
330 * @fn LALH5Dataset *XLALH5DatasetAllocUINT8Vector(LALH5File *file, const char *name, UINT8Vector *vector)
331 * @copydoc XLALH5DatasetAllocCHARVector()
332 */
333
334/**
335 * @fn LALH5Dataset *XLALH5DatasetAllocREAL4Vector(LALH5File *file, const char *name, REAL4Vector *vector)
336 * @copydoc XLALH5DatasetAllocCHARVector()
337 */
338
339/**
340 * @fn LALH5Dataset *XLALH5DatasetAllocREAL8Vector(LALH5File *file, const char *name, REAL8Vector *vector)
341 * @copydoc XLALH5DatasetAllocCHARVector()
342 */
343
344/**
345 * @fn LALH5Dataset *XLALH5DatasetAllocCOMPLEX8Vector(LALH5File *file, const char *name, COMPLEX8Vector *vector)
346 * @copydoc XLALH5DatasetAllocCHARVector()
347 */
348
349/**
350 * @fn LALH5Dataset *XLALH5DatasetAllocCOMPLEX16Vector(LALH5File *file, const char *name, COMPLEX16Vector *vector)
351 * @copydoc XLALH5DatasetAllocCHARVector()
352 */
353
354/**
355 * @fn LALH5Dataset *XLALH5DatasetAllocStringVector(LALH5File *file, const char *name, LALStringVector *vector)
356 * @copydoc XLALH5DatasetAllocCHARVector()
357 */
359{
360 LALH5Dataset *dataset;
361 if (!file || !name || !vector)
363 if (!vector->length || !vector->data)
365 dataset = XLALH5DatasetAllocStringData(file, name, vector->length);
366 if (!dataset)
368 if (XLALH5DatasetWrite(dataset, vector->data) < 0) {
369 XLALH5DatasetFree(dataset);
371 }
372 return dataset;
373}
374
375/** @} */
376
377/**
378 * @name Routines to Allocate Array Datasets
379 * @{
380 */
381
382/**
383 * @fn LALH5Dataset *XLALH5DatasetAllocINT2Array(LALH5File *file, const char *name, INT2Array *array)
384 * @brief Allocates a #LALH5Dataset
385 * @details
386 * Creates a new HDF5 dataset with name @p name within a HDF5 file
387 * associated with the #LALH5File @p file structure and allocates a
388 * #LALH5Dataset structure associated with the dataset. The data
389 * in the dataset is set to the data in the array @p array.
390 *
391 * The #LALH5File @p file passed to this routine must be a file
392 * opened for writing.
393 *
394 * @param file Pointer to a #LALH5File structure in which to create the dataset.
395 * @param name Pointer to a string with the name of the dataset to create.
396 * @param array Pointer to an array structure containing the data.
397 * @returns A pointer to a #LALH5Dataset structure associated with the
398 * specified dataset within a HDF5 file.
399 * @retval NULL An error occurred creating the dataset.
400 */
401
402/**
403 * @fn LALH5Dataset *XLALH5DatasetAllocINT4Array(LALH5File *file, const char *name, INT4Array *array)
404 * @copydoc XLALH5DatasetAllocINT2Array()
405 */
406
407/**
408 * @fn LALH5Dataset *XLALH5DatasetAllocINT8Array(LALH5File *file, const char *name, INT8Array *array)
409 * @copydoc XLALH5DatasetAllocINT2Array()
410 */
411
412/**
413 * @fn LALH5Dataset *XLALH5DatasetAllocUINT2Array(LALH5File *file, const char *name, UINT2Array *array)
414 * @copydoc XLALH5DatasetAllocINT2Array()
415 */
416
417/**
418 * @fn LALH5Dataset *XLALH5DatasetAllocUINT4Array(LALH5File *file, const char *name, UINT4Array *array)
419 * @copydoc XLALH5DatasetAllocINT2Array()
420 */
421
422/**
423 * @fn LALH5Dataset *XLALH5DatasetAllocUINT8Array(LALH5File *file, const char *name, UINT8Array *array)
424 * @copydoc XLALH5DatasetAllocINT2Array()
425 */
426
427/**
428 * @fn LALH5Dataset *XLALH5DatasetAllocREAL4Array(LALH5File *file, const char *name, REAL4Array *array)
429 * @copydoc XLALH5DatasetAllocINT2Array()
430 */
431
432/**
433 * @fn LALH5Dataset *XLALH5DatasetAllocREAL8Array(LALH5File *file, const char *name, REAL8Array *array)
434 * @copydoc XLALH5DatasetAllocINT2Array()
435 */
436
437/**
438 * @fn LALH5Dataset *XLALH5DatasetAllocCOMPLEX8Array(LALH5File *file, const char *name, COMPLEX8Array *array)
439 * @copydoc XLALH5DatasetAllocINT2Array()
440 */
441
442/**
443 * @fn LALH5Dataset *XLALH5DatasetAllocCOMPLEX16Array(LALH5File *file, const char *name, COMPLEX16Array *array)
444 * @copydoc XLALH5DatasetAllocINT2Array()
445 */
446
447/** @} */
448
449/**
450 * @name Routines to Read Vector Datasets
451 * @{
452 */
453
454/**
455 * @fn CHARVector *XLALH5DatasetReadCHARVector(LALH5Dataset *dset)
456 * @brief Reads a #LALH5Dataset
457 * @param dset Pointer to a #LALH5Dataset to be read.
458 * @returns Pointer to a vector containing the data in the dataset.
459 * @retval NULL Failure.
460 */
461
462/**
463 * @fn INT2Vector *XLALH5DatasetReadINT2Vector(LALH5Dataset *dset)
464 * @copydoc XLALH5DatasetReadCHARVector()
465 */
466
467/**
468 * @fn INT4Vector *XLALH5DatasetReadINT4Vector(LALH5Dataset *dset)
469 * @copydoc XLALH5DatasetReadCHARVector()
470 */
471
472/**
473 * @fn INT8Vector *XLALH5DatasetReadINT8Vector(LALH5Dataset *dset)
474 * @copydoc XLALH5DatasetReadCHARVector()
475 */
476
477/**
478 * @fn UINT2Vector *XLALH5DatasetReadUINT2Vector(LALH5Dataset *dset)
479 * @copydoc XLALH5DatasetReadCHARVector()
480 */
481
482/**
483 * @fn UINT4Vector *XLALH5DatasetReadUINT4Vector(LALH5Dataset *dset)
484 * @copydoc XLALH5DatasetReadCHARVector()
485 */
486
487/**
488 * @fn UINT8Vector *XLALH5DatasetReadUINT8Vector(LALH5Dataset *dset)
489 * @copydoc XLALH5DatasetReadCHARVector()
490 */
491
492/**
493 * @fn REAL4Vector *XLALH5DatasetReadREAL4Vector(LALH5Dataset *dset)
494 * @copydoc XLALH5DatasetReadCHARVector()
495 */
496
497/**
498 * @fn REAL8Vector *XLALH5DatasetReadREAL8Vector(LALH5Dataset *dset)
499 * @copydoc XLALH5DatasetReadCHARVector()
500 */
501
502/**
503 * @fn COMPLEX8Vector *XLALH5DatasetReadCOMPLEX8Vector(LALH5Dataset *dset)
504 * @copydoc XLALH5DatasetReadCHARVector()
505 */
506
507/**
508 * @fn COMPLEX16Vector *XLALH5DatasetReadCOMPLEX16Vector(LALH5Dataset *dset)
509 * @copydoc XLALH5DatasetReadCHARVector()
510 */
511
512/* helper routine to read a sequence of fixed-length character vectors */
514{
515 CHARVectorSequence *sequence;
516 size_t npoints;
517 size_t nbytes;
518 size_t size;
519 int ndim;
520
522
525
526 ndim = XLALH5DatasetQueryNDim(dset);
527 XLAL_CHECK_NULL(ndim == 1, XLAL_EDIMS);
528
529 npoints = XLALH5DatasetQueryNPoints(dset);
530 XLAL_CHECK_NULL(npoints != (size_t)(-1), XLAL_EFUNC);
531
532 nbytes = XLALH5DatasetQueryNBytes(dset);
533 XLAL_CHECK_NULL(npoints != (size_t)(-1), XLAL_EFUNC);
534
535 size = nbytes / npoints;
536 XLAL_CHECK_NULL(nbytes == size * npoints, XLAL_EBADLEN, "Number of bytes not divisible by number of points");
537
538 sequence = XLALCreateCHARVectorSequence(npoints, size);
539 XLAL_CHECK_NULL(sequence, XLAL_EFUNC);
540
541 if (XLALH5DatasetQueryData(sequence->data, dset) == -1) {
544 }
545
546 return sequence;
547}
548
549
550#if 0
551 UINT4 length; /**< The number \a l of vectors. */
552 UINT4 vectorLength; /**< The length \a n of each vector. */
553 CHAR *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
554#endif
555
556/**
557 * @fn LALStringVector *XLALH5DatasetReadStringVector(LALH5Dataset *dset)
558 * @copydoc XLALH5DatasetReadCHARVector()
559 */
561{
562 LALStringVector *vector;
563 size_t npoints;
564 int ndim;
565
566 if (!dset)
568
569 if (!XLALH5DatasetCheckStringData(dset)) {
570 /* it might be fixed-length string data... */
571 CHARVectorSequence *sequence;
573 if (!sequence)
575 /* translate CHARVectorSequence to StringVector */
576 vector = NULL;
577 for (size_t j = 0; j < sequence->length; ++j) {
578 LALStringVector *new = XLALAppendString2Vector(vector, sequence->data + j * sequence->vectorLength);
579 if (!new) {
583 }
584 vector = new;
585 }
587 return vector;
588 }
589
590 ndim = XLALH5DatasetQueryNDim(dset);
591 if (ndim != 1)
593
594 npoints = XLALH5DatasetQueryNPoints(dset);
595 if (npoints == (size_t)(-1))
597
598 vector = XLALCreateEmptyStringVector(npoints);
599 if (!vector)
601
602 if (XLALH5DatasetQueryData(vector->data, dset) == -1) {
605 }
606
607 return vector;
608}
609
610/** @} */
611
612/**
613 * @name Routines to Read Array Datasets
614 * @{
615 */
616
617/**
618 * @fn INT2Array *XLALH5DatasetReadINT2Array(LALH5Dataset *dset)
619 * @brief Reads a #LALH5Dataset
620 * @param dset Pointer to a #LALH5Dataset to be read.
621 * @returns Pointer to an array containing the data in the dataset.
622 * @retval NULL Failure.
623 */
624
625/**
626 * @fn INT4Array *XLALH5DatasetReadINT4Array(LALH5Dataset *dset)
627 * @copydoc XLALH5DatasetReadINT2Array()
628 */
629
630/**
631 * @fn INT8Array *XLALH5DatasetReadINT8Array(LALH5Dataset *dset)
632 * @copydoc XLALH5DatasetReadINT2Array()
633 */
634
635/**
636 * @fn UINT2Array *XLALH5DatasetReadUINT2Array(LALH5Dataset *dset)
637 * @copydoc XLALH5DatasetReadINT2Array()
638 */
639
640/**
641 * @fn UINT4Array *XLALH5DatasetReadUINT4Array(LALH5Dataset *dset)
642 * @copydoc XLALH5DatasetReadINT2Array()
643 */
644
645/**
646 * @fn UINT8Array *XLALH5DatasetReadUINT8Array(LALH5Dataset *dset)
647 * @copydoc XLALH5DatasetReadINT2Array()
648 */
649
650/**
651 * @fn REAL4Array *XLALH5DatasetReadREAL4Array(LALH5Dataset *dset)
652 * @copydoc XLALH5DatasetReadINT2Array()
653 */
654
655/**
656 * @fn REAL8Array *XLALH5DatasetReadREAL8Array(LALH5Dataset *dset)
657 * @copydoc XLALH5DatasetReadINT2Array()
658 */
659
660/**
661 * @fn COMPLEX8Array *XLALH5DatasetReadCOMPLEX8Array(LALH5Dataset *dset)
662 * @copydoc XLALH5DatasetReadINT2Array()
663 */
664
665/**
666 * @fn COMPLEX16Array *XLALH5DatasetReadCOMPLEX16Array(LALH5Dataset *dset)
667 * @copydoc XLALH5DatasetReadINT2Array()
668 */
669
670/** @} */
671
672/** @} */
int XLALH5DatasetCheckStringData(LALH5Dataset *dset)
int XLALH5DatasetQueryNDim(LALH5Dataset *dset)
int XLALH5DatasetCheckFixedLengthStringData(LALH5Dataset *dset)
struct tagLALH5File LALH5File
Incomplete type for a HDF5 file.
Definition: H5FileIO.h:93
LALH5Dataset * XLALH5DatasetAllocStringData(LALH5File *file, const char *name, size_t length)
struct tagLALH5Dataset LALH5Dataset
Incomplete type for a HDF5 dataset.
Definition: H5FileIO.h:102
int XLALH5DatasetWrite(LALH5Dataset *dset, void *data)
void XLALH5DatasetFree(LALH5Dataset *dset)
size_t XLALH5DatasetQueryNBytes(LALH5Dataset *dset)
size_t XLALH5DatasetQueryNPoints(LALH5Dataset *dset)
int XLALH5DatasetQueryData(void *data, LALH5Dataset *dset)
const char *const name
type name
Definition: UserInput.c:193
static CHARVectorSequence * XLALH5DatasetReadCHARVectorSequence(LALH5Dataset *dset)
LALStringVector * XLALH5DatasetReadStringVector(LALH5Dataset *dset)
LALH5Dataset * XLALH5DatasetAllocStringVector(LALH5File *file, const char *name, LALStringVector *vector)
char CHAR
One-byte signed integer, see Headers LAL(Atomic)Datatypes.h for more details.
uint32_t UINT4
Four-byte unsigned integer.
void XLALDestroyStringVector(LALStringVector *vect)
XLAL-interface: Free a string-vector ;)
Definition: StringVector.c:204
LALStringVector * XLALAppendString2Vector(LALStringVector *vect, const CHAR *string)
Append the given string to the string-vector (XLAL interface), return pointer to the resulting string...
Definition: StringVector.c:47
LALStringVector * XLALCreateEmptyStringVector(UINT4 length)
Create an empty string vector of the given length.
Definition: StringVector.c:164
void XLALDestroyCHARVectorSequence(CHARVectorSequence *vecseq)
CHARVectorSequence * XLALCreateCHARVectorSequence(UINT4 length, UINT4 veclen)
#define XLAL_ERROR_NULL(...)
Macro to invoke a failure from a XLAL routine returning a pointer.
Definition: XLALError.h:713
#define XLAL_CHECK_NULL(assertion,...)
Macro to test an assertion and invoke a failure if it is not true in a function that returns a pointe...
Definition: XLALError.h:825
@ XLAL_EBADLEN
Inconsistent or invalid length.
Definition: XLALError.h:419
@ XLAL_EFAULT
Invalid pointer.
Definition: XLALError.h:408
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
Definition: XLALError.h:462
@ XLAL_ETYPE
Wrong or unknown type.
Definition: XLALError.h:422
@ XLAL_EDIMS
Wrong dimensions.
Definition: XLALError.h:421
@ XLAL_EINVAL
Invalid argument.
Definition: XLALError.h:409
Sequence of CHAR Vectors, see DATATYPE-VectorSequence types for more details.
Definition: LALDatatypes.h:261
CHAR * data
Pointer to the data array.
Definition: LALDatatypes.h:267
UINT4 length
The number l of vectors.
Definition: LALDatatypes.h:265
UINT4 vectorLength
The length n of each vector.
Definition: LALDatatypes.h:266
Vector of type CHAR*, ie 'strings', see DATATYPE-Vector types for more details.
Definition: LALDatatypes.h:82
UINT4 length
Number of elements in array.
Definition: LALDatatypes.h:86
CHAR ** data
Pointer to the data array.
Definition: LALDatatypes.h:87