TRF++ D0 release and build procedure

17dec97 1345


Introduction

At D0, TRF++ is available from the CVS repository. The code is distributed over several packages and each package (e.g. trfbase) is stored in a cvs module of the same name. Here we describe how to obtain and build packages and a little about how modules are organized so others can add TRF++ extensions in a consistent manner. Here are the general and D0 announcements of releases and other news.

Package organization

Each package is made up of files which are stored in the corresponding CVS module. For example, here is a listing of the files in the package trfcyl. Some of the file contain code while others provide instructions for building the library associated with the package.

Code

Files ending in .cpp, .h, and .c contain the actual code organized into components. A component Xyz will typically have a header file Xyz.h, source file Xyz.cpp and a test file Xyz_t.cpp. There may also be a template defintion file Xyz.c.

The header defines the interface for the component and is included in any other files which make use of the classes or functions defined in the component.

The source file defines everything declared in the header except for template functions. These are implemented in the template defintion file which, for some compilers, is included in the header. The template definition file may be omitted if there are no undefined template functions. This is the typical case. The source file may be omitted if all the non-template definitions are provided in the header and no component-level testing is desired. However, this is not recommended. A dumm source file can be used to force testing.

The test file must provide a main program which returns zero to indicate success. It should test all the functionality added by the component, e.g. exercise all the class member functions and external functions. A test file must be provided if a source file is present.

Build

The file COMPONENTS lists the components that are to be used when constructing the library (i.e. those that have a souce file. They should be listed in an order such that each has no dependence on those appearing later in the list.

The file LIBRARIES list the libraries (other packages) on which the current package depends. These will be used to construct the appropriate linker command using the same ordering as in this file.

The file GNUmakefile contains the instructions for gmake to build the library. It makes use of the files COMPONENTS and LIBRARIES. It should not need not be modified if the only goal is to build a library with tested components from code organized as described above.

D0 implementation

The above is implemented in the D0 CVS/SRT environment using the CVS module ctest.


Questions or comments to adams@physics.rice.edu.