Gaudi: Transient Data Store

Note to self: See: Gaudi Guide: Transient Data Store

The Gaudi Transient Data Store (TDS) is a shared memory mechanism used to share data among multiple algorithms.  As input, an algorithm may take any data that is currently available in TDS, and then generate new data that is then stored on the TDS for other algorithms to use.  Data is stored in a tree structure that contains all data pertinent to a particular execution of the code.

All algorithms, services, tools, etc., within Gaudi use the data store to both retrieve the data needed to do its particular task, and to store any output data.  The data store only exists while a program is executing; data is saved for later use via the Persistency Service.

TDS Event Model

An Example of putting data on the TDS:

Event::AcdDigiCol* digiCol = new Event::AcdDigiCol;
sc = eventSvc()->registerObject(EventModel::Digi::AcdDigiCol, digiCol);

Retrieving Data from the TDS

There are 3 ways to retrieve data:

  1. Use a SmartDataPointer:
    SmartDataPtr allhits(eventSvc(),EventModel::MC::McIntegratingHitCol )
  1. Via the retrieveObject method
    sc = eventSvc()->retrieveObject( EventModel::Digi::Event , pNode)
  1. Via the findObject method
    sc = eventSvc( )->findObject( EventModel::Digi::Event, pNode);

In the case of the findObject method, only the TDS is searched; if the data is unavailable, no action is taken to attempt to load it from the Persistent Data Store.

Getting Data into TDS

In order to get data into the TDS, data is either:

  • Created within an algorithm, and is stored in the Transient Event Store via some call to registerObject().

or

  • A piece of code makes a request for some piece data.  

The request is performed by a call to findObject() or retrieveObject() – or through the use of a SmartPointer.  When a request is made, first the Transient Data Store is checked to see if the data is already available; if so, it's passed to the requestor.  

If the data is not available, and the call was made via a retrieveObject or SmartPointer, the Persistency Service is called and an appropriate Converter is used to retrieve the data from a persistent store, probably some file somewhere. 

Note: There is some magic going on in the background in the form of OpaqueAddresses, used so that proper converter is called.  The converter's createObj() method is called, which allocates the necessary space, and then a call to updateObj() retrieves the data and stores it on the TDS.

 


Owned by: Heather Kelly
Last updated by: Chuck Patterson 02/23/2009