Specific Dictionaries

LCG Project | LCG Applications Area

SEAL Project | Project Portal


$Date: 2004/11/30 14:17:15 $


A number of pre-made specific LCG dictionaries for common third-party libraries has been produced to ease the integration of these libraries in the end-user applications for object persistency (POOL) and Python interactivity (pylcgdict).  The list of available libraries will be extended on demand of the users as well us the concrete contents of them. These libraries can also be used as examples of how to produce C++ reflection information of third-party libraries in a non-intrusive manner.

Available Dictionaries


Dictionary containing the definition of about 150 C++ classes of the CLHEP library. It includes basically all the classes from Vector, Matrix, Random, GenericFunctions and Geometry packages. The dictionary is called SealCLHEPDict and can be used directly. Here is an example with pylcgdict

>>> import PyLCGDict
>>> PyLCGDict.loadDict('SealCLHEPDict')
>>> g = PyLCGDict.makeNamespace('')
>>> lv = g.HepLorentzVector(10,20,10)
>>>print lv.x()


Dictionary containing about 260 C++ classes of the ROOT system. It includes basically all the classes from Core, Cont, Hist, Gpad, Tree, Graf and Physics packages. The dictionary is called SealROOTDict and can be used directly. A Python module called ROOT.py has been added to facilitate the setup of the ROOT environment by hiding some of the technicalities.  Here is an example.

>>> from ROOT import gROOT, TCanvas, TF1
>>> c1 = TCanvas( 'c1', 'Example with Formula', 200, 10, 700, 500 )
>>> fun1 = TF1( 'fun1', 'abs(sin(x)/x)', 0, 10 )
>>> c1.SetGridx()
>>> c1.SetGridy()
>>> fun1.Draw()
>>> c1.Update()


Dictionary containing popular instantiations of the  C++ Standard Library container classes. The list of instantiations could in in principle be infinite but is limited to the most common ones, end-users can easily add the missing ones in their projects. It includes currently about 20 instantiations of std::vector and std::list. Here is a usage example with pylcgdict.

>>> import PyLCGDdict
>>> PyLCGDict.loadDict('SealSTLDict')
Loaded dictionary SealSTLDict
>>> std = PyLCGDict.Namespace('std')
>>> v = std.vector(int)()
>>> v.push_back(1)
>>> v.push_back(2)
>>> v.push_back(4)
>>> v
<vector<int>:[1, 2, 4]>
>>> for i in v : print i


Dictionary containing the reflection information of the Reflection classes themselves. This dictionary useful for debugging purposes and providing a Python interface to the C++ Reflection classes. Tools have been written with this dictionary to check completeness of dictionary systems. The dictionary library is called SealDictDict.

Contact: Stefan Roiser