GaudiObjDesc Schema

From Daya Bay
Jump to navigation Jump to search

The GaudiObjDesc package uses XML files in the gdd.dtd schema.


A GaudiObjDesc XML file must follow the schema defined by the gdd.dtd file. This file is located in


and will be copied to the xml/ sub directory of your GOD-built package during a build.

To understand what you can write in XML all you need to do is understand how to read the gdd.dtd. For every XML tag, the gdd.dtd defines two things about the tag.


A tag's ATTLIST is a list of attributes that can be applied. Attributes are specified inside the tags angle brackets as name='value' pairs. Values must be in either single or double quotes. For example:

<sometag foo='bar' baz='quag'>

In the DTD, attributes are defined by three quantities listed in order:

  1. attribute name
  2. allowed values or CDATA if value is checked post-parse
  3. default value or if it is required or implied


The allowed tags that can be nested in a given tag are specified by the ELEMENT list. The list includes a regex-looking character that determines how many of each element can be included.

Boiler Plate

All gdd.dtd files need some basic XML boiler plate:

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

  <!-- content goes here -->


Importing dependencies

If your data requires other packages you can import them. This translates into a #include statement when C++ is generated.

Defining a Package

Defining a Class

Class Data Members

Class Methods