Computing Technical Design Report

3.4 Data Access Model

3.4.1 Data Objects and Algorithms

Using computing science terminology, the Gaudi software architecture belongs to the blackboard family: data objects produced by knowledge modules (called Algorithms in Gaudi) are posted to a common in-memory database (or "blackboard") from where other modules can access them and produce new data objects.

This model greatly reduces the coupling between the Algorithms containing the algorithmic code for analysis and reconstruction, in that one Algorithm does not need to know which specific Algorithm can produce the information it needs nor which protocol it must use to obtain it (the "interface explosion" problem described in component software systems). Algorithmic code is known to be the least stable component of software systems and the blackboard approach has been very effective at reducing the impact of this instability, from the Zebra system of the FORTRAN days to the InfoBus architecture for Java components. The trade-off of this separation between data and algorithm objects is the need for algorithm objects to identify data objects to be posted on or retrieved from the blackboard. It is crucial to develop a data model optimized for the required access patterns and yet flexible enough to accommodate unexpected ones.

3.4.2 StoreGate: the ATLAS Transient Data Store

The Transient Data Store (TDS) is the blackboard of the Gaudi architecture: an Algorithm creates a data object and posts it on to the TDS to allow other Algorithms to access it.

Once an object is posted on to the store, the TDS takes ownership of it and manages its lifetime according to preset policies, removing, for example, a TrackCollection when a new event is read. The TDS also manages the conversion of a data object from/to its persistent form and provides therefore an API to access data stored on persistent media.

StoreGate is the ATLAS implementation of the TDS. It manages the data objects in transient form, it steers their transient/persistent conversion and it provides a dictionary allowing to identify and retrieve data objects in memory. The StoreGate design and implementation was largely driven by a few design concepts.

3.4.3 Data Objects

As mentioned earlier, StoreGate is designed to work with user types rather than requiring them to implement a C++ interface. Basically any STL Assignable can be stored into StoreGate and hence is a Data Object.

A Data Object is a struct or class that encapsulates and "publishes" the result of some arbitrarily complex processing performed by one or more Algorithms. A Data Object should present a predictable, stable and efficient interface to client Algorithms.

StoreGate uses a compact, technology-independent mechanism to describe object types with two integer identifiers: a CLID and a VERSION . CLID is a 16-bit integer which uniquely identifies an object type across all ATLAS software for the lifetime of the experiment. If an object changes in a non-backward-compatible way a new VERSION number must be assigned to it2.

Data Objects recorded to StoreGate are subsequently owned by StoreGate and the creator must not delete them.

3.4.3.1 Using Containers as Data Objects

Two different types of containers are supported by StoreGate:

3.4.4 Accessing Data Objects

StoreGate provides the following support for access to Data Objects managed by it.

3.4.5 Using DataLinks to Persistify References

In C++ associations among objects are described using pointers or references. For example, a Cluster object may refer to its list of associated Cells by holding a vector of Cell pointers. Unfortunately a plain C++ pointer can not be simply written out and read back from disk; it is valid only within the context of a running job since it refers to a virtual memory location.

To address this limitation DataLink and ElementLink have been introduced, being two class templates which can be dereferenced like a pointer and can be read and written using various persistency mechanisms. The DataLink template allows one to reference a single Data Object, using its unique type/key combination. ElementLink is used to reference an element of a container recorded in StoreGate.


1. Currently the proxy uses lazy instantiation (i.e. the object is created only when the handle is dereferenced).

2. The VERSION number is not yet used by StoreGate.

3. DataLinks are described in Section 3.4.5

4. Converters are described in Section 3.3.1.2 .



4 July 2005 - WebMaster

Copyright © CERN 2005