MIDAS - The Multiple Instance Data Acquisition System

Tape Server - data block format

The tape server writes a 24 byte control block at the beginning of each data block.
This control block contains an identification of the type of data following and also fields which allow the hardware architecture of the data source to be determined. This is important since the data may not be written by a processor having the same architecture as the data source. As an extreme case consider a data tape being read by a Sun Sparc processor which has been written by a Intel Linux system containing data from a VME based source.


//    24 byte data block header

typedef struct s_data_header {
    char   header_id[8];              //   contains the string  EBYEDATA
    long   header_sequence;           //   within the file
    short  header_stream;             //   data acquisition stream number (in the range 1=>4)
    short  header_tape;               //   =1
    short  header_MyEndian;           //   written as a native 1 by the tape server
    short  header_DataEndian;         //   written as a native 1 in the hardware structure of the data following
    long   header_dataLen;            //   total length of useful data following the header in bytes
} DATA_HEADER;