# Presentation: 253208

## EDM Shopping List

**P. Calafiura**
***EDM Workshop***
***May 31, 2000***

## Short Form

**data store or data stores?**
**modules API: (avoid) type laundering**
**finding data: keys and selectors**
**access policy: module input and output**
**data producers: proxies and handles**
**data consumers: publish-subscribe**
**event abstraction layers**

## Data Store and Records

**Gaudi stores divide DataObjects in 3 (actually 4) groups with pre-defined life-times (Event, Detector, Histogram)**
**The store as the time-keeper that manages a list of records according to their validity range (cfr CLEO frames and records, various calibration managers) **

## Gaudi (& others) put objects of type <T> in the store as DataObject and then use RTTI to get them back as <T>
Typed Stores 

Collection type as the basic key for data indexing
Issue: overlapping stores, derived types

**Typed Stores**** **
**Collection ***type*** as the basic key for data indexing**
**Issue: overlapping stores, derived types**

**Type Laundering**

- Tracks

- Muons

- DataObjects Store

## Put and Get Stores

**the user access points to the data record. Provide type-safe insert and retrieve methods**
**templated in the concrete data object type and the concrete key used**
**could either be implemented as **
**stateless utilities (a bunch of class methods) accessing a keyed data record**
**“****multipletons” containing a keyed list of handles to objects in the data record**
**instances of input and output “parameters” (cfr Lassi ON) to be declared as module data members**

## Finding data: Keys and Selectors

**“****Natural” raw data key: Atlas Ids**
-   typedef TStoreGet<LArChannels, ATLAS_ID>   LArRawStore;vector<LArChannels>::const_iterator barrelRawIter;LArRawStore::find(LArBarrelID, eventRecord(),                               barrelRawIter);//Find returns an iterator over possible //collections? Too difficult to use?
**“****Natural” reconstructed data key: D0 RCP Ids**
**Selectors (cfr D0, -> Srini)**
**operate on collections, return "filtered iterator”**
-      RangeSelector etaRangeSelector(...);vector<LArChannel>::const_iterator barrelSelIter = etaRangeSelector.apply(barrelRawIter);

## Hiding the Nuts and Bolts: Handles.

**Hide memory management, refer to DataObjects, help persistency.**
**I would rather use plain C++ references (->David) **
- LArCellsStore::attach(eventRecord(), this);THandle<LArChannels> barrelRaw = LArCellsStore::createHandle(LArBarrelID);
**createHandle sets a permanent “observation point” to the store that gets updated (on demand) when a new data record appear**
** ****(but what happens if the update fails?)**

- Client

- THandle

- DataObj

- T

- by value

- refers to

## Hiding the Nuts and Bolts: Proxies

**Proxi: same interface as original data object. Performs pre- and post- processing for**
**access control (cfr TStoreGet above)**
**cache policy (use transient, persistent, reconstruction on demand)**
**Typed Stores could manage (or act as) typed Proxies**

- Handle

- DataProxi

- DataObject

- T

- Refers to

- Represents

- T

- DBProxi

- ReconProxi

## Data Providers and Data Consumers

## Event Abstraction Layers

**detector-centric data (raw and calibrated)**
**reconstructed data**
**physics objects**
**How to formalize this into a classification?**
- Different keys (raw Ids, RCP Ids, ...)
- Different caching policy (read from DB or reconstruct on demand)

## Finally

- special thanks to Massimo Marino and Simon Patton
- you’ll find more details on my views at
**http://electra.lbl.gov/ATLAS/EDM/edmviews.html**
- Chris Day has been tracking recent Transient Store discussions using RequisiteWeb (linked from roderick.lbl.gov/Atlas, contact him for access details)