23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong> Chapter 8 StoreGate - the event data access model Version/Issue: 2.0.0<br />

HENP systems such as BaBar, CDF, CLEO, D0, we identified some requirements that would not be<br />

readily satisfied using the existing Gaudi Event Data Model:<br />

• Identify (collections of) DataObjects based on their type.<br />

• Identify (collections of) DataObjects based on the identifier of the Algorithm which added<br />

them to the Transient Data Store (TDS).<br />

• A scheme that allows developers optionally to define key classes tailored to their DataObjects<br />

and to use the keys to store and retrieve the objects from the TDS.<br />

• A well-defined and supported access control policy: as will be discussed later on, objects<br />

stored into the TDS will be “almost read-only” with the adoption of a lock mechanism.<br />

• A mechanism to hide as much as possible the details of the TDS access from the algorithmic<br />

code, using the standard C++ iterator and/or pointer syntax.<br />

• The same mechanism should be used to express associations among Data Objects.<br />

• A mechanism to group related DataObjects into a developer-defined view that provides a<br />

high-level alternative access scheme to the store.<br />

• A mechanism to define a flexible “cache-fault policy” (that is to say a way to create an object<br />

requested by the user and not yet in the TDS). This should include the functionality to<br />

reconstruct a DataObject on demand.<br />

8.2.1 System Features and Entities<br />

page 56<br />

A StoreGate will allow algorithmic code to interact with the TDS. When an Algorithm invokes the<br />

StoreGate retrieve method, it is returned a DataHandle which points to the desired DataObject in the<br />

Transient Data Store. The DataHandle defines the interface to access the DataObjects retrieved. From<br />

the user perspective a DataHandle behaves as a C++ pointer/iterator, and its first implementation<br />

pointer is indeed a C++ const pointer. It will have to evolve into a more complex object to satisfy some<br />

of the requirements mentioned above. A complete implementation of the DataHandle should include:<br />

• Begin/end methods providing iterators over contained objects,<br />

• Enforcement of an almost-const access policy, whereby the DataHandle checks, upon<br />

dereference, if the client is authorized to modify a DataObject in the TDS.<br />

• An update method used (presumably by the TDS) to mark the current Data Object the<br />

DataHandle refers to as “obsolete” when, for example, a new event is read in.<br />

• Support for persistable object associations (e.g. track associatedHits),<br />

• The ability for the client to view the data in different ways.<br />

• A user-defined Key can be used while recording/retrieving the DataObject. In the prototype,<br />

the key object can be a simple string passed to the StoreGate record method or a more<br />

complex object that defines the necessary operators to return a string. Behind the scenes, the<br />

string is added to the Event Data Service object “pathname” thus providing the backward<br />

Gaudi compatibility.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!