Data and Other Records

After the header record, all remaining records in the file contain recorded data or information useful in reconstructing the trial or stimulus run that was presented. The CXFILEREC data structure, defined in cxfilefmt.h and reproduced below, shows the general layout of these records:

typedef struct tagCxFileRec // generic format for Maestro file data/info records

{

BYTE idTag[8]; // byte 0 holds the record tag CX_***RECORD. other bytes = 0.

union // the data, in various forms...

{

BYTE byteData[CX_RECORDBYTES];

SHORT shData[CX_RECORDSHORTS];

INT iData[CX_RECORDINTS];

TRIALCODE tc[CX_RECORDCODES]; // for CX_TRIALCODERECORD

TRIALSECT sects[CX_RECORDSECTS]; // for CX_TAGSECTRECORD

CXFILETGT tgts[CX_RECORDTARGETS]; // for CX_TGTRECORD, v >= 23

CXFILETGT_V7 tgtsV7[CX_RECORDTARGETS_V7]; // for CX_TGTRECORD, v < 8

CXFILETGT_V12 tgtsV12[CX_RECORDTARGETS_V12]; // for CX_TGTRECORD, v = [8..12]

CXFILETGT_V22 tgtsV22[CX_RECORDTARGETS_V22]; // for CX_TGTRECORD, v = [13..22]

CXFILESTIM_U stims[CX_RECORDSTIMS]; // for CX_STIMRUNRECORD

} u;

} CXFILEREC, *PCXFILEREC;

Each type of record is uniquely identified by an ID tag found in the first byte of the record. The next seven bytes are generally not used (all are set to zero), and the contents of the remaining 1016 bytes depend upon the kind of data stored in the record, as summarized in the table below. Of course, the file will contain as many records of a given type as needed to store the collected data or protocol information. The last record of a given type will often be partially empty, in which case the unused portion of the record is filled with zeros or some other "end of data" value. Maestro guarantees that records of a given type are stored chronologically in the data file. However, they will not necessarily be found in one contiguous chunk. Analysis programs must always check the ID tag to determine the identity of each record read from the file.