| Data Acquisition and Online Analysis at the NSCL | ||
|---|---|---|
| Prev | Chapter 5. Best Practices for Building Software | Next |
When deploying your software (sometimes called rolling out) for an experiment, you should keep in mind a few points. In the list of points below, substitute the name of your device for the text xxx for example, the A1900 might roll out a file named A190setup:
You should always rollout products that provide the 'current' version of the software rather than old or beta test version.
Your product may be used in conjunction with other software products, the roll out should reflect and respect this. For example, rather than providing the user with a .bashrc file to set up needed environment variables, provide an xxsetup shell script and instructions to source this sript from the user's .bashrc file, or alternatively use echo . xxxsetup >>~/.bashrc to attempt to add this source to an existing .bashrc
Provide documentation and sample Makefiles that show the user how to build their readout and SpecTcl software against your supported subsystems. When doing this, again respect the fact that you may be a cog in a larger experiment. Instead of choosing e.g. ~/SpecTcl as the place to roll out this set of examples, roll them out to ~/SpecTcl/xxxsample. Take similar approaches with configuration files, and with Readout software samples. Build your samples so that if they are made the user will be able to run the standard untailored system.
Only roll out minimal sources. For example, if your software for Readout is based on the production readout framework, roll out Skeleton.cpp and nothing else. Use the open/closed rule described previously to jealously gaurd your source code from user modifications while providing hooks for extensibility.
Use the gmake include directive along with a makefile Macro for your library directory in you Makefiles to try to isulate your users from change in your software. I confess this took me quite a bit of time to get right. See the way the SpecTcl Makefiles for 3.0 and later work for an example of how this is done, that I'm happy with.