Back to the POOL home page
Back to the Tutorial top page

Learning POOL by examples: Simple I/O


Description

The aim of this example is to demonstrate the basic I/O operations of simple objects using ROOT Tree technology as the storage backend, XML for the file catalog, the POOL Ref/DataSvc for caching, and the Implicit Collections for reading back the objects.

The user creates a class library which contains the implementation of a simple Hit class, runs the LCG dictionary for this class and builds the corresponding dictionary run time library.
A simple writer application writes the objects in a container of a database file which are specified in the program. The reader starts an iteration in the implicit collection of objects defined by the database/container specified in the writer and prints the contents of the objects.
The writer and reader applications are linked against the user class library. The dictionary library is explicitly loaded during run time.

Files

Building and running

Please copy above files to your workspace and simply execute the shell script:


./buildAndRunAll.sh

Extend this example


Contact : Zhang Yiheng, ATLAS, LNF-INFN.