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.
-
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.
-
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.
-
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.
-
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.
-
For TAS folks: If you are allowed to make install" you must now
do it from pkg/. -- not pkg/lib/.
-
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
:
-
rm Makefile.*
-
rm XXX.config
-
Similarly, remove all Makefile's in the subdirectories of XXX.
-
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.)
-
Edit the PAM line in Makefile.control to include the appropriate modules.
-
make setup
-
cd srcm
make tfcStaf.cc
-
cd ..
make
Written: Spiros Margetis, Iwona Sakrejda and Bill Llope
Edited: R.Bossingham
Page maintenance:
Roy Bossingham, LBNL
RRBossingham@lbl.gov