Up: MiniDAQ instructions

Staf Hints

Here are some tips for building a module in STAF, especially if you are converting something from TAS. Eventually, the tutorial will be updated and some typos corrected.

  1. Every time you check-out (or copy) a module you have to do a > make config to set up the environment properly. Do not keep ``XXX.config'' under CVS control. Nor should xxxStaf.cc be from the srcm directory; while, in principle, make could figure out that ``XXX.config'' had changed and re-make ``XXXStaf.cc ,'' one is better off to handle this file oneself.
  2. Every time you include a new Physics Analysis Module (PAM) in the Makefile.control file in the pkg/. directory, you should go and "rm" first and then > make pkgStaf.cc in the pkg/srcm directory.
  3. If you want to invoke sl_add_file (e.g. in /idl) with many files, use the "-s" option with a wildcard. You will be asked for a comment only once.
  4. Lesson 3.1.2, the last column of the table: the line "#include PAM.inc" must appear in every subroutine of non-module functions; otherwise, the header table is not specified.
  5. For TAS folks: If you are allowed to make install" you must now do it from pkg/. -- not pkg/lib/.
  6. For newcomers: If you get a warning about a missing sys library while making the Staf executable, go ahead and remove the ASPS name from the pkg/Makefile.control line; chances are that you won't need it!

Typical instructions for dealing with Staf make problems, assuming that one starts in some package directory XXX:

  1. rm Makefile.*
  2. rm XXX.config
  3. Similarly, remove all Makefile's in the subdirectories of XXX.
  4. Copy current Makefiles to XXX from a trusted source, e.g.:
    cp /home/spica/star6/sakrejda/lst/Makefile* .
    (The subdirectory Makefile's will be produced below, automatically.)
  5. Edit the PAM line in Makefile.control to include the appropriate modules.
  6. make setup
  7. cd srcm
    make tfcStaf.cc
  8. cd ..

Written: Spiros Margetis, Iwona Sakrejda and Bill Llope
Edited: R.Bossingham

Page maintenance:

Roy Bossingham, LBNL