N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week Architecture Session.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Lectures on File Management
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett TruthAssociation EDM Workshop Event Data Model Session Jan
Information System Engineering
C15: Design Patterns Gamma,Helm,Johnson,Vlissides (GOF)
Reconstruction and Analysis on Demand: A Success Story Christopher D. Jones Cornell University, USA.
Main Index Contents 11 Main Index Contents Container Types Container Types Sequence Containers Sequence Containers Associative Containers Associative Containers.
Main Index Contents 11 Main Index Contents Container Types Container Types Sequence Containers Sequence Containers Associative Containers Associative Containers.
ARRAYS AND POINTERS Although pointer types are not integer types, some integer arithmetic operators can be applied to pointers. The affect of this arithmetic.
Classes and objects Practice 2. Basic terms  Classifier is an element of the model, which specifies some general features for a set of objects. Features.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
Inheritance. Recall the plant that we defined earlier… class Plant { public: Plant( double theHeight ) : hasLeaves( true ), height (theHeight) { } Plant(
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Conditions DB in LHCb LCG Conditions DB Workshop 8-9 December 2003 P. Mato / CERN.
1 Sub-Phase Low Level Design (cont). Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces.
Main Index Contents 11 Main Index Contents Week 3 – The Vector Container.
Alignment Strategy for ATLAS: Detector Description and Database Issues
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett The Athena Control Framework in Production, New Developments and Lessons Learned.
Software Solutions for Variable ATLAS Detector Description J. Boudreau, V. Tsulaia University of Pittsburgh R. Hawkings, A. Valassi CERN A. Schaffer LAL,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
Object-Oriented Design Part 2
Databases E. Leonardi, P. Valente. Conditions DB Conditions=Dynamic parameters non-event time-varying Conditions database (CondDB) General definition:
Problem Statement: Users can get too busy at work or at home to check the current weather condition for sever weather. Many of the free weather software.
Ocean Observatories Initiative Data Management (DM) Subsystem Overview Michael Meisinger September 29, 2009.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER 1 ACAT 2000, Fermilab Oct Control States... Control States for the Atlas Software Framework.
CE Operating Systems Lecture 14 Memory management.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Updates to Interval of Validity Service (IOVSvc) ATLAS Software Week Dec
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week May Architecture.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc EDM Workshop Detector Description Session.
RUN-Time Organization Compiler phase— Before writing a code generator, we must decide how to marshal the resources of the target machine (instructions,
Navigation Timing Studies of the ATLAS High-Level Trigger Andrew Lowe Royal Holloway, University of London.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
Data Structures & Algorithms
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Callbacks May
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
Session 1 Module 1: Introduction to Data Integrity
23/2/2000Status of GAUDI 1 P. Mato / CERN Computing meeting, LHCb Week 23 February 2000.
March 1, 2004CS WPI1 CS 509 Design of Software Systems Lecture #6 Monday, March 1, 2004.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Prototype GEANT4 Service for ATHENA framework ATLAS Software Workshop Dec 3.
CS223: Software Engineering Lecture 19: Unit Testing.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
Understanding General Software Development Lesson 3.
I/O and Metadata Jack Cranshaw Argonne National Laboratory November 9, ATLAS Core Software TIM.
POOL Based CMS Framework Bill Tanenbaum US-CMS/Fermilab 04/June/2003.
David Adams ATLAS Hybrid Event Store Integration with Athena/StoreGate David Adams BNL March 5, 2002 ATLAS Software Week Event Data Model and Detector.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Transient Conditions/Detector Store using StoreGate ATLAS Software Workshop.
Fundamentals of MyBATIS Improving performance with caching.
L1Calo Databases ● Overview ● Trigger Configuration DB ● L1Calo OKS Database ● L1Calo COOL Database ● ACE Murrough Landon 16 June 2008.
STOREGLTE A Data Model Toolkit for the Atlas Software Architecture
Chapter 14 Recursion. Chapter 14 Recursion Overview 14.1 Recursive Functions for Tasks 14.2 Recursive Functions for Values 14.3 Thinking Recursively.
The dirty secrets of objects
Unit Test Pattern.
Tapping the Power of Your Historical Data
DB2.
Associative Structures
Main Memory Background Swapping Contiguous Allocation Paging
Computer Science Projects Database Theory / Prototypes
How to use hash tables to solve olympiad problems
Java Programming Language
Applying Use Cases (Chapters 25,26)
SQL – Application Persistence Design Patterns
Presentation transcript:

N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week Architecture Session 11/18/2002

2 Charles Leggett Interval of Validity Service F Purpose: l associates valid time ranges with objects l triggers updates of data, and validity ranges when object enters a new validity range l allows use of call back functions F Use cases: l alignment data l calibration objects l detector description information l anything which has a timed validity range associated with it

3 Charles Leggett Access Patterns F Two types of access/usage patterns: l pure data, held in dB, used as a data member inside a class. Only needs to have it’s contents refreshed when it enters a new validity range. l Container class, eg GeoNode, which has no representation inside the dB, contains one or more IOV data objects from dB as data members. Needs to know when any of its constituent members enters a new validity range, at which point a callback method is triggered. F No overlap between these patterns l will never have an IOV data object which needs a callback l will never have a container class which has data stored in dB

4 Charles Leggett Class Example class myIOVClass { public: StatusCode CallBackFcn(list &dbKeys); private: DataHandle m_align1; DataHandle m_align2; myIOVAlg2* that; }; myIOVClass::initialize() { p_SGSvc->bind(m_align1,dBkey1); p_SGSvc->bind(m_align2,dBkey2); p_IOVSvc->regFcn(this, &myIOVClass::CallBackFcn, m_align1); p_IOVSvc->regFcn(this, &myIOVClass::CallBackFcn, m_align2); p_IOVSvc->regFcn(this, &myIOVClass::CallBackFcn, that, &myIOVClass2::OtherCallBackFcn); }

5 Charles Leggett Sequence Diagram AlgHandleStoregateProxyIOVCnvIOVSvcCondDB RootCnv PPSvc bind(T,key) regProxy(clid,key)  accessData() createObj(IOA) getObj(IOA) T* DataObj * IOV,IOA2 createObj() IOA2 DataObj* reset() callback(dbKey) T*  regFcn(this,&Fcn,T) reset() initialize execute asyn c recordAddress(IOA2) reset(IOA2) bindHandle(handle)

6 Charles Leggett Sequence F ProxyProviderSvc registers Proxy (dBkey) with IOVSvc  In Initialize(), alg binds DataHandle with StoreGate, using the same dBkey as the PPS  Algorithm registers container class (eg GeoNode) with IOVSvc->regFcn(), supplying callback fcn and DataHandles as parameters.  At first deref of the DataHandle, call is passed through to Proxy, which calls createObj(IOA) on IOVCnv converter. IOVCnv calls getObj(IOA) on IOVSvc, which first talks to CondDB to retrieve storage location of an element given a (Clid,dbKey) pair. It gets back an IOV and an IOA which points to the actual location of the data. The IOVSvc adds the IOV to its list of registered intervals. The IOSvc then calls createObj() on the persistency converter for the actual data using this information, and gets back a DataObj*. The DataObj* is passed back through the chain of sequences to the Algorithm, eventually being converted to a T*.

7 Charles Leggett Sequence (cont) F The next time the DataHandle is derefed, a T* is automatically returned from the Proxy. F At the start of each event, the IOVSvc parses its list of registered entries to see if any are out of range. When it finds one, it first resets the corresponding proxy, then triggers the registered callback function. The callback function gets a list of the keys of the items which have gone out of range as a parameter. F The next time one of the DataHandles is derefed, the initial sequence is replayed, getting back a new IOV and data.

8 Charles Leggett Things Needed F Proxy Provider Service F StoreGate::bind(T,key) - slightly different from retrieve() F Additions to caching policy of DataHandle. Doing a simple reset on the current Proxy isn’t enough - the DataHandle keeps its own cache of the data. So the handle has to be informed that its cached data is invalid, or do a check itself every time to see if its Proxy has been reset. Latter is easier, since there can be a many to one relationship between handles and proxies, and the proxies would have to keep track of all the handles pointing to them, but involves an extra dynamic cast (2 of them really) as the Proxy doesn’t know the type of the DataHandle pointing to it. Best to have a publish/subscribe relationship between DataHandle and Proxy, so Proxy can reset Handle when needed.

9 Charles Leggett Changes to DataHandle et al F DataHandle inherits from IResetable, declares reset() method F DataProxy list of bound handles ( list ) bindHandle(IResetable*), unbindHandle(IResetable*) l resetBoundHandles() F StoreGate l ProxyProvider bind() like retrieve, but also associates Handles with Proxy

10 Charles Leggett IOVSvc IOVSvc { public: StatusCode regProxy(DataProxy *); StatusCode regFcn(void (T::*fcn)(), T* obj, DataHandle handle); StatusCode regFcn(void (T1::*fcn1)(), T1* obj, void (T2::*fcn2)(), T2* obj); private: set m_proxies; map m_entries; multimap * > m_proxyMap; multiset m_startSet; multiset m_stopSet; } ConversionSer vice IIncidentListe ner

11 Charles Leggett Associated Classes IOVRange IOVTime m_start IOVTime m_stop IOVTime IOVTime(int) IOVTime(EventID) unsigned long long m_time IOVEntry DataProxy* m_proxy IOVRange* m_range

12 Charles Leggett Internals of IOVSvc  indexing is done via DataProxy*  IOVs are held in map  Callback functions are multimap * > F IOVs are ordered in two sets: std::multiset m_startSet; std::multiset m_stopSet; m_startSet is ordered by decreasing start time, m_stopSet is ordered by increasing end time. As a result of this ordering, when the sets are scanned at the beginning of each event for entries that need to be marked invalid, as soon as the first valid entry is found in each set, the scanning can be stopped as one is assured that all subsequent entries are valid. F When invalid entries in these multisets are found, the associated DataProxy* is added to a list. At the end of the scan, the IOVs of these DataProxies are updated, the DataProxies are reset (and thus the associated DataHandles) and the associated callback functions are activated.

13 Charles Leggett What’s Next F This is still a prototype. F We haven’t really decided yet the best way to do the connection between the DataHandle and DataProxy so that the reset is properly done. F Interface to conditionsDB still needs to be refined. F Plan to have it in 6.0.0