150 likes | 172 Views
Software development. This tutorial was written by Norman Graf and has been updated by Laurent Duflot for t01.13.00. Getting Started. Brief introduction for developers of Run II software. Targeted to development on UNIX platform ( e.g. d0mino).
E N D
Software development • This tutorial was written by Norman Graf and has been updated by Laurent Duflot for t01.13.00
Getting Started... • Brief introduction for developers of Run II software. • Targeted to development on UNIX platform (e.g. d0mino). • Concentration on CTEST interface using CTBUILD implementation.
CTEST • An interface for building software. • Builds and tests libraries made up of components which are tested individually. • Allows integrated testing and creation of executables. • http://www-d0.fnal.gov/software/cmgt/ctest/ctest
CTBUILD • A framework for building software packages which conform to the CTEST interface. • Can be run standalone or within the D0 CVS/SRT environment.
Starting from scratch... • setup D0RunII t01.13.00 (a release version) • setup n32 IRIX only ! • setup d0cvs • cd workdir (your development area) • newrel -t t01.13.00 topdir • cd topdir (referred to as top directory) • d0setwa (initialize local RCP DB)
Creating a new package... • ctnewpkg -h (for help on syntax) • ctnewpkg -lib mynewpackage • cd mynewpackage (referred to as package directory)
Component development... • Normally there is 1 class per component. • A package component consists of 3 parts… • the public interface in myfile.hpp. • the implementation in myfile.cpp. • the component test in myfile_t.cpp. • The component test is intended to fully exercise the public interface.
Component testing • Essential for quality control. • Simplifies error-finding during complex builds. • Well-controlled environment for testing. • An example of how to use your class for physicists unwilling to read the documentation.
COMPONENTS • Each package has a file which contains a dependency-ordered list of components named COMPONENTS. • The *.cpp files will be compiled and inserted into the package library. • The *_t.cpp files will be compiled, linked and then executed to test the component.
LIBRARIES • Each package contains a file listing the external libraries on which that package depends, in the dependency order. • No circular dependencies are allowed.
LIBDEPS • Contains a list of only the explicit package library dependencies. • Deeper dependencies will be resolved by the LIBDEPS file in the lower package. • Requires every package to provide a correct LIBDEPS file.
Integrated tests • Complex packages often require more extensive testing, called integrated tests. • Will, in general, link to extra libraries which the package itself does not depend upon. • The file ITESTS contains a list of files which conduct these tests. • Normally resides in test subdirectory along with expanded LIBRARIES file.
BINARIES • Executables which are created as part of the release and are meant to be distributed are specified by the list of components in the file BINARIES. • This file and the accompanying code and LIBRARIES file (which may be different from the package LIBRARIES file) should reside in the bin subdirectory.
Help! • Several tutorials and much documentation available on the web. For example: • http://www-d0.fnal.gov/~hur/L3mainpage.html • http://www-d0.fnal.gov/software/cmgt/ctbuild_conversion.html • http://www-d0.fnal.gov/software/cmgt/cmgt.html • http://www-d0.fnal.gov/~schellma/d0cpp/