FiffDataRef
Namespace: FIFFLIB · Library: FIFF Library
#include <fiff/fiff_data_ref.h>
class FIFFLIB::FiffDataRef
External data reference: type, endian, byte size and offset into an external FIFF payload file.
Mirrors the original fiffDataRefRec exactly: a 24-byte record made of two qint32 (type, endianness flag) followed by two qint64 (payload size in bytes, byte offset into the external file). The 64-bit fields let referenced payloads exceed 2 GiB, which is required by long continuous Neuromag recordings split into multi-file FIFF trees.
// A reference to data in an external file: 2 x 32-bit type and byte order, 2 x 64-bit size and offset.
FiffDataRef reference;
reference.size = 3LL << 31; // beyond 2 GiB
reference.offset = 1024;
Public Methods
FiffDataRef()
Default constructor.
Initializes all fields to zero.
~FiffDataRef()
Destroys the FiffDataRef.
Static Methods
storageSize()
Size of the old struct (fiffDataRefRec) 2int + 2long = 24 + 28 = 24.
Returns:
- qint32 — the size of the old struct
fiffDataRefRec.
Example
- Full source:
src/examples/ex_fiff_structure/main.cpp - Build target:
ex_fiff_structure(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_fiff_structure
FIFF library: fixed-length epochs, CTF compensation, the file directory and raw buffers, and handing.
// A reference to data in an external file: 2 x 32-bit type and byte order, 2 x 64-bit size and offset.
FiffDataRef reference;
reference.size = 3LL << 31; // beyond 2 GiB
reference.offset = 1024;
ok &= expect(FiffDataRef::storageSize() == 24 && reference.size > std::numeric_limits<qint32>::max(), "FiffDataRef: 24-byte record with 64-bit size and offset");
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>