Transient Data Store (TDS)

The Transient Data Store is a mechanism for shared memory; a tree that stores all data pertinent to a particular execution of the code.  Within Gaudi, all algorithms, services, tools, etc., use the data store to:

  • Retrieve the data needed to do its particular task
  • To store any output data

Notes:

  • The data store only exists while a program is executing.
  • Data is saved for later use via the Persistency Service.
  • TDS usage examples at GLAST include Transient Event Store,
    and Transient Detector store (used for calibration data).

Minimum GLAST TDS jobOptions parameters

To use the Gaudi Transient Data Store (TDS) requires - at a minimum - the following jobOptions parameters:

  • ApplicationMgr.DLLs = { "GlastSvc"};
Loads the GlastSvc library (which contains the GlastEventSelector and EventCnvSvc)
   
  • ApplicationMgr.ExtSvc = { 
    "GlastEventSelector/EventSelector" , 
    "EventCnvSvc" };

Specifies a defined GLAST EventSelector (GlastEventSelector) and a set of GLAST conversion services to be provided by the EventCnvSvc.

   
  • EventPersistencySvc.CnvServices = {"EventCnvSvc"};
Makes GLAST conversion services available to the Gaudi persistency service .
   
  • EventSelector.Input = "NONE";

No input is required for the EventSelector.

Note: Data will be acquired either through a Monte Carlo generator or via ROOT files, requiring additional parameters to setup an MC generator or to activate ROOT input.

Putting data on the TDS

Example of putting data on the Transient Data Store:

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

Notes:

  • The call to registerObject will either return StatusCode::Success or StatusCode::Failure.
  • The potential reason for failure is when the path up to your new item does not yet exist on the TDS.

When Gaudi starts up, the root of the TDS /Event is created. After that, it is up to our algorithms and services to create the rest of the TDS tree.

  • If registering an object deeper into the tree, make sure the path exists; in this case, we want to make sure EventModel::Digi exists (which is equivalent to /Event/Digi).

We can check on the existence of a path by attempting to retrieve it from the TDS, as described in the following section, Retrieving Data from the TDS.

Retrieving Data from the TDS

Three ways to retrieve data:

  • Use a SmartDataPointer

    SmartDataPtr allhits(eventSvc(),EventModel::MC::McIntegratingHitCol );

  • Via the retrieveObject method

    sc = eventSvc()->retrieveObject( EventModel::Digi::Event , pNode);

  • Via the findObject method

    sc = eventSvc( )->findObject( EventModel::Digi::Event, pNode);

Note: When using 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 the Transient Event/Data Store

Data is either:

 
  • Created within an algorithm and stored in the TDS via some call to registerObject()
  or  
 
  • A request for data is made by a piece of code

Requests for Data

A request is performed by:

 
  • A call to findObject() or retrieveObject()
  or  
 
  • Use of a SmartPointer 

When a request is made, the Transient Event Store is checked to see if the data is already available.

  • If the data is available, 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. 

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.

Note: In order for the proper converter to be called, OpaqueAddresses are used in the background.

References

For more detailed information on Transient Data Store, see:

  • Gaudi Architecture Design Document, Chapter 9

 

Owned by: Heather Kelly

Last updated by: Chuck Patterson 07/27/2005