The Kanga (Kind ANd Gentle Analysis) Framework
This is an attempt to summarize some of the features of Kanga which
are applicable to the MINOS software framework persistency design.
Overview
Kanga [1] was developed for use in the BaBar experiment as an alternative
to the standard Objectivity based framework. Kanga is a ROOT based system
and makes extensive use of ROOT I/O and data structures.
Principles of Design
Unlike PAF, which separates Tag & Aod data into separate TTree's,
Kanga Tag & Aod data exist on the same TTree ("microDST").
The Tree has 3 branches to hold the Aod data and header information + an
additional set of branches to hold the Tag data. The setup of the
Tag branches is as follows:
- There is one leaf list branch for each Tag attribute.
- Each leaf list branch can be set up in one of 3 ways:
- Branches with names prefixed by "TAG_b_" hold a single variable of
type "b" (8-bit unsigned int). The value of the variable is one of an
enumerated list of "bool" types:
enum boolVals {boolFalse =0, boolTrue =1, boolInvalid =2}.
The value of the "Tag_b_" variable is set to "boolInvalid" when
the entry has been left unset by the user.
- Branches with names prefixed by "TAG_i_" hold two variables:
- The value of the entry of variable type "I" (32-bit signed int).
- A validity flag of of variable type "b" (8-bit unsigned int) which can
be set to "boolTrue" (value set for entry), "boolFalse" (null value
set for entry), or "boolInValid" (no value set for entry).
- Branches with names prefixed by "TAG_f_" also hold two variables:
- The value of the entry of variable type "F" (32-bit float).
- A validity flag of variable type "b" as described above.
Tag branches can be defined and created "on-the-fly" by the user with
a key name that becomes the suffix to the branch name, e.g. keyname
="Etotal" holding a floating point value would be used to create branch
named "TAG_f_Etotal". 3 separate THashList's are maintained to keep
pointers to the branches of different types and to facilitate rapid
lookup of the branches according to their key name.
The breakdown of Aod &
Header branches (held in the same Tree as the Tag branches) is:
- A branch "BtaEid" holds objects of class EidInfoR. This
class holds the header data.
- A branch "BtaCandMaps" holds a TObjArray of objects of class "BtaCandListR".
- A branch "BtaAod" holds a RooClonesVectorR object in split mode. The
branch is split into subbranches:
- A branch _array holding a TClonesArray of "BtaMicroCandR" objects in split=1 mode.
- A branch _nent holding a count of the number of entries in the TClonesArray
References:
[1]
Kanga Home page
If you have any comments about this page please send them to
Sue Kasahara
Last Updated: September 12, 2000.