The simulation of raw data is managed by the class AliSimulation. To create raw data DDL files it loops over all events. For each event it creates a directory, changes to this directory and calls the method Digits2Raw of each selected detector. In the Digits2Raw method the DDL files of a detector are created from the digits for the current event.
For the conversion of the DDL files to a DATE file the AliSimulation class uses the tool dateStream. For the conversion of a DATE file to a ROOT file the program alimdc is utilized.
The only part that has to be implemented in the detector modules is the Digits2Raw method of the detectors. In this method one file per DDL has to be created obeying the conventions for file names and DDL IDs. Each file is a binary file with a DDL data header in the beginning. The DDL data header is implemented in the structur AliRawDataHeader. The data member fSize should be set to the total size of the DDL raw data including the size of the header. The attribute bit 0 should be set by calling the method SetAttribute(0) to indicate that the data in this file is valid. The attribute bit 1 can be set to indicate compressed raw data.
After the DDL data header the detector specific raw data is stored in the DDL files. The format of this raw data should be as close as possible to the one that will be delivered by the detector. This includes the order in which the channels will be read out.