CODE STRUCTURE


Driver and User Routines
The Driver Code is articulated into two main levels of calls:

  • A group of "system" or "driver" routines (with prefix drv...) which contain all the calls, in the correct order, to the single detector routines:

    These routines are in the e831code/src/driver library and the general user should never have to modify them, but only to link to the corresponding objects. The actions performed by these routines are controlled by flags which the user chooses in the code namelists. The main include file for all driver routines is drvflag.inc

  • A group of routines which perform user specific actions: Each user routine is called at the end of the corresponding driver routine. The e831code/src/defaults_user library contains dummy versions of all these routines which you can link to to just run the program and check it is working. The library e831code/src/templates contains some examples of usrinit.sf (for histogram booking), usranal.sf (for event analysis) and usrstop.sf (for histogram saving) which you can fetch and compile into your program to produce some standard histograms for the various detectors. For your personal applications, you will want to modify one or more usr... routines. Remember to add the names of the usr... routines you modified to the object list in your makefile.


    Program Flow Chart


    Event Processing

    Each data event is processed through three consecutive steps: unpacking, reconstruction and analysis, packing or transfer. If a fatal error is returned at any of the three steps, further processing for that event is aborted and a new event is read from the input stream.


    End of Job Statistics
    If by any chance the program finishes succesfully, a detailed summary of the I/O statistics for the total job and for each block is printed at the end of the log file:


    back to Driver main page