Personal tools
You are here: Home Exp Spec Info musr older documents mud_managers.html

mud_managers.html

by admin last modified Apr 11, 2007 11:41 AM


MUD Data Format - Software Manager's Guide


Location of files

The sources for MUD are kept in CVS   The subdirectories are explained are follows:

  • src - code for reading and writing the data format.
  • util - file conversion/dump utility.

Extending the format

You may wish to extend the library with a new section tailored to your lab or experiment type. You will need to edit a few files in, and probably add one file to, the directory [musr.mud.src.lib]. The procedure is as follows:

  1. Allocate Lab, Format and Section identifiers in the file mud.h. If your lab or format are already defined, do not allocate new numbers, but the new Section number must be unique. Follow the format of the other Section types. Similarly, add this identifier to the FORTRAN include file mud.finc to maintain FORTRAN compatibility.
  2. Also in the file mud.h, add the definition of the structure (e.g., MUD_SEC_GEN_HIST_DAT) following the examples of the other definitions. The structure must begin with the member 'MUD_CORE core;'. Similarly, add this structure definition to the FORTRAN include file mud.finc.
  3. Further down in the file mud.h, add a forward declaration of the procedure to read your new Section type (e.g., MUD_SEC_TRI_TI_RUN_DESC_proc). Similarly, add this forward declaration to the FORTRAN include file mud.finc.
  4. In the module mud_new.c, add an entry in the switch statement of the procedure mud_new for your new section type. This routine allocates space for newly created sections.
  5. Write the routine to read, write, etc., the new Section type in a new module. The name of the routine will be the same as the forward declaration in mud.h mentioned above. Take a look at the module mud_tri_ti.c for an example of how to do this. This routine should be able to free, read, write, get the size of, and dump the contents of the Section.
  6. Add the module to the 'OBJS' list in the makefiles descrip.mms, makefile., makefile.dos, and makefile.linux. Then, rebuild the installation ZIP file [musr.mud.src]mud.zip (by running MMS in that directory). This is the latest installation file for all platforms.

whidden@triumf.ca, TRIUMF Data Acquisition Group
Document Actions