Title : MCE_file_formats.txt Revision: 2.0 Author : Mandana Amiri Revision History: ------------------- Apr. 3, 2006 Rev. 1.0 Initial Release Jun. 7, 2006 Rev. 2.0 Bryce updated the header information -------------------- The data saved on the PC that is attached to our MCE is of one of the following formats: 1. text format: A sample file is attached: sample_mce_data.txt Each frame of data is formatted as N lines where: N = (1 line of header information) + (41*(number of readout cards) lines for the data block) + (1 line for checksum). For example, when only 1 readout-card is present, then each frame consists of N=43 lines of data. For now, the header information consists of 43 words where: word 1 is the status word with bit 0=last frame, bit 1=stop bit, bit 2 to 31 undefined. word 2 is the frame sequence number word 3 is the number of 50MHz clock cycles per row (parameter moniker: row_len) word 4 is the number of rows multiplexed (parameter moniker: num_rows) word 5 is the number of frame periods between each data packet (parameter moniker: data_rate) word 6 is the sync number word 7 to 43 reserved for future use MCE may have 1 to 4 readout cards (RC). Each RC serves 8 columns. The data block is formatted as: RC1 row 0 - column 0 to column 7 space-delimitted RC1 row 1 - column 0 to column 7 space-delimitted .... RC1 row 40 - column 0 to column 7 space-delimitted RC2 row 0 - column 0 to column 7 space-delimitted ..... RC2 row 40 - column 0 to column 7 space-delimitted RC3 row 0 - column 0 to column 7 space-delimitted ..... .... RC4 row 40 - column 0 to column 7 space-delimited The last line of the frame is the checksum. 2. Text-2 format: Similar to the previous format with the exception that there is only one piece of data per line. The order of the data is still the same. This format is not currently working! 3. Binary format: A sample file is attached. Similar to the above format, just saved in binary, with the exception that newline and space characters are omitted. NOTE:In order to specify the file format, edit ~mce/das/bin/startdas with one of the following options: DATA_FORMAT=TEXT DATA_FORMAT=BINARY DATA_FORMAT=TEXT2