GaudiObjDesc - getting started

Home Computing E-mail Notes Meetings Subsystems Search

This page will explain the first steps one has to take to get started with GaudiObjDesc

  1. First of all you need to build the directory-structure for the new package. In the end the structure of the package should look like this:

    example package structure

  2. In the subdirectory '/cmt' the requirements-file has to be placed. In the requirements-file at least the following lines are needed:

    package Eventpack

    version v1r0

    branches cmt doc xml Event

    use GaudiKernel v*
    private
    use GaudiObjDesc v* -no_auto_imports
    end_private

    #---- Produce Header-Files from XML description
    apply_pattern god_headers files=../xml/Eventpack.xml

    #---- Copy the header files to the InstallArea
    apply_pattern install_more_includes more=Event

    #---- Implementation files, if any, should be handwritten and
    #---- compiled into a library
    library Eventpack ../src/*.cpp
    apply_pattern linker_library library=Eventpack

    #---- Produce dictionary selection files from XML description
    #---- and build the LCG dictionary using gccxml
    apply_pattern god_dictionary files=../xml/Eventpack.xml

     

  3. After executing a 'cmt config', which will produce all necessary scripts and a 'source setup.csh' (or a 'setup.bat') the following line should appear:

    Copying gdd.dtd to local xml-directory

     

  4. Now you may go to the xml-directory starting to write the Eventpack.xml - file. The basic structure of this file should look somehow like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE gdd SYSTEM "gdd.dtd">

    <gdd>
      <package name="Eventpack">

        <class name="Class1" author="tbd" desc="Some description">

          <!-- content of class1 -->

        </class>

        <class name="Class2" author="tbd" desc="Some description">

          <!-- content of class2 -->

        </class>

        <!-- more classes -->

      </package>
    </gdd>

     

  5. If you want to do check whether the xml-description produces the intended output you may issue the GaudiObjDesc-tool for producing the .h-files without compiling them. The command for linux will look like

    ${GAUDIOBJDESCROOT}/${CMTCONFIG}/GODWriteCppHeader.exe -o ../Event/ Eventpack.xml

    and for windows

    %GAUDIOBJDESCROOT%\%CMTCONFIG%\GODWriteCppHeader.exe -o ..\Event\ Eventpack.xml

     

  6. If all the necessary header-files are produced you may try to execute a 'make' in the cmt-directory. Now all header-files should be produced and compiled.

See also the WiKi maintained by Daya Bay Reactor Experiment

This page was last edited by MC on July 10, 2007.