The aim of this example is to demonstrate the handling of multiple data files in a POOL session.
The user creates a class library which contains the implementation of a Cluster, a Sector,
and an Event class. An event is associated to the information of the two sectors (a hadronic and an electromagnetic)
of a calorimeter. A Sector holds the energy clusters produced in the current event in this region of the calorimeter.
The user runs the LCG dictionary for these classes and builds the corresponding dictionary run time library.
A simple writer application writes the Sectors with their Clusters in two different database files. The Events are written in a third database. The reader starts an iteration in the implicit collection of Event objects objects defined by the database/container specified in the writer and prints the contents of each Sector and Cluster for this event.
The writer and reader applications are linked against the user class library. The dictionary library is explicitly loaded during run time.
Make sure that you are using the correct compiler. If you are not using the afs installation at CERN, make sure you update accordingly the corresponding values in the GNUmakefile or/and the shell script.
The make file provides the following targets:
runreader reader runwriter writer dictlib userlib and clean.
The simplest way to build and execute everything in one go is by typing:.
make runwriter runreader