File#
- class xcdf.xcdf.File#
Bases:
pybind11_builtins.pybind11_object
XCDF file handle with iterator access to stored records.
Attributes Summary
Get the XCDF file comments (file header)
Get the list of field names contained in the file.
Get the fields contained in the file.
Check if the file is currently open.
Check if the underlying file has a trailer pointer that can be seek to.
Get the total number of fields allocated in the file.
Get the version number of the current open file.
Methods Summary
add_comment
(self, arg0)Add a string comment to the file
allocate_float_field
(self, arg0, arg1, arg2)Allocate a field with floating point data.
allocate_int_field
(self, arg0, arg1, arg2)Allocate a field with signed integer data.
allocate_uint_field
(self, arg0, arg1, arg2)Allocate a field with unsigned integer data.
check
(self)Check file by allow internal checksum verification to detect errors.
close
(self)Close the File instance.
rewind
(self)Return the file to a state where calling Read() gives the starting event, if possible.
seek
(self, absolute event position)Seek to the given event in the file by absolute position.
write
(self)Write one event to the uncompressed buffer.
Attributes Documentation
- comments#
Get the XCDF file comments (file header)
- field_names#
Get the list of field names contained in the file.
- fields#
Get the fields contained in the file.
- is_open#
Check if the file is currently open.
- is_simple#
Check if the underlying file has a trailer pointer that can be seek to.
- n_fields#
Get the total number of fields allocated in the file.
- version#
Get the version number of the current open file.
Methods Documentation
- add_comment(self: xcdf.xcdf.File, arg0: str) None #
Add a string comment to the file
- allocate_float_field(self: xcdf.xcdf.File, arg0: str, arg1: float, arg2: str) xcdf.xcdf.XCDFFloatingPointField #
Allocate a field with floating point data.
- Parameters
name (str) – Name of the field.
resolution (float) – The floating point resolution needed in the field. If resolution <= 0. is specified, the full 64-bit double will be written to file.
parent_name (str) – If the field is a vector, this is the name of the field that contains the number of entries in the vector.
- allocate_int_field(self: xcdf.xcdf.File, arg0: str, arg1: int, arg2: str) xcdf.xcdf.XCDFSignedIntegerField #
Allocate a field with signed integer data.
- Parameters
name (str) – Name of the field.
resolution (int) – The (positive) integer resolution needed in the field
parent_name (str) – If the field is a vector, this is the name of the field that contains the number of entries in the vector.
- allocate_uint_field(self: xcdf.xcdf.File, arg0: str, arg1: int, arg2: str) xcdf.xcdf.XCDFUnsignedIntegerField #
Allocate a field with unsigned integer data.
- Parameters
name (str) – Name of the field.
resolution (int) – The (positive) integer resolution needed in the field
parent_name (str) – If the field is a vector, this is the name of the field that contains the number of entries in the vector.
- check(self: xcdf.xcdf.File) None #
Check file by allow internal checksum verification to detect errors.
- close(self: xcdf.xcdf.File) None #
Close the File instance.
Underlying file/stream resources will be closed and released unless the stream open/close constructors were invoked. Fields will be deallocated. If writing, do end checks to ensure all data is written out to file.
- rewind(self: xcdf.xcdf.File) bool #
Return the file to a state where calling Read() gives the starting event, if possible.
- seek(self: xcdf.xcdf.File, absolute event position: int) bool #
Seek to the given event in the file by absolute position.
- write(self: xcdf.xcdf.File) int #
Write one event to the uncompressed buffer.