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

Slides:



Advertisements
Similar presentations
Composition CMSC 202. Code Reuse Effective software development relies on reusing existing code. Code reuse must be more than just copying code and changing.
Advertisements

N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett TruthAssociation EDM Workshop Event Data Model Session Jan
Programming Types of Testing.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Reconstruction and Analysis on Demand: A Success Story Christopher D. Jones Cornell University, USA.
Review of C++ Programming Part II Sheng-Fang Huang.
CLEO’s User Centric Data Access System Christopher D. Jones Cornell University.
The ATLAS Production System. The Architecture ATLAS Production Database Eowyn Lexor Lexor-CondorG Oracle SQL queries Dulcinea NorduGrid Panda OSGLCG The.
 2006 Pearson Education, Inc. All rights reserved Classes: A Deeper Look.
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.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
CSC 142 B 1 CSC 142 Java objects: a first view [Reading: chapters 1 & 2]
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
The New TrigDecision Nicolas Berger, Till Eifert, Ricardo Gonçalo Physics Analysis Tools session ATLAS Software Workshop – Munich, March 2007.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett A Lightweight Histogram Interface Layer CHEP 2000 Session F (F320) Thursday.
CERN Tutorial, September Job Options and Printing.
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,
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 15: More-Advanced Concepts.
Event Data History David Adams BNL Atlas Software Week December 2001.
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.
Data structures Abstract data types Java classes for Data structures and ADTs.
ALICE, ATLAS, CMS & LHCb joint workshop on
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
DANA uses a factory model to deliver data “just in time”
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Jose A. Hernando Trigger Gaudies Reconstruction Tools & Algorithms Inspectors MC & Data Algorithms Template preserved container Jose A. Hernando.
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,
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
ALICE Condition DataBase Magali Gruwé CERN PH/AIP Alice Offline week May 31 st 2005.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
How to write a MSGQ Transport (MQT) Overview Nov 29, 2005 Todd Mullanix.
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 Colors in the Message Service ATLAS software workshop March Architecture.
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week Architecture Session.
Alberto Colla - CERN ALICE off-line week 1 Alberto Colla ALICE off-line week Cern, May 31, 2005 Table of contents: ● Summary of requirements ● Description.
.NET Mobile Application Development XML Web Services.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
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.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
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.
STOREGLTE A Data Model Toolkit for the Atlas Software Architecture
Root I/O and the Gaudi Framework
Microsoft Foundation Classes MFC
Programming with ANSI C ++
News on the CDB Framework
Chapter 8 Arrays, Strings and pointers
Assembly Language Programming Part 3
Programming Models for Distributed Application
Hash table another data structure for implementing a map or a set
Classes with Dynamically Allocated Data
Java Concurrency 17-Jan-19.
Fall 2018 CISC124 2/24/2019 CISC124 Quiz 1 marking is complete. Quiz average was about 40/60 or 67%. TAs are still grading assn 1. Assn 2 due this Friday,
Lecture 5: Functions and Parameters
Raw Event Conversion Service in BOSS framework
9-10 Classes: A Deeper Look.
Java Programming Language
Java Concurrency 29-May-19.
Use Of GAUDI framework in Online Environment
9-10 Classes: A Deeper Look.
Accessing Event Data Schedule: Timing Topic 20 minutes Lecture
Presentation transcript:

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

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. 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 database

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

5 Charles Leggett Sequence Diagram AlgHandleStoregateProxyIOVSvcCondDBNovaCnvPPSvc regHandle(handle,key)  accessData() T* DataObj * reset() callback(dbKey) T*  regFcn(this,&Fcn,handle,key) reset() initialize execute asyn c bindHandle(handle) IOVDbSvc IOV,string getData(key) DataObj * PersSvc updateAddress(TA) buildIOA(string) IOA setRange(clID,key,IOV) createObj(IOA) setAddress(IOA) IOA buildIOA(string) partial IOA regProxy(proxy) bind(handle,key)

6 Charles Leggett Sequence  In Initialize(), alg registers DataHandle with the IOVSvc using IOVSvc->regHandle(handle,key), using the same dBkey as is used in the dB.  Alternatively, the algorithm registers container class (eg GeoNode) with IOVSvc->regFcn(...), supplying callback fcn, DataHandle, pointer to the object, and the key as parameters.  At first deref of the DataHandle, call is passed through to Proxy, which calls updateAddress(TransientAddress) on the IOVDbSvc. IOVDbSvc talks to the CondDB to retrieve storage location of an element given a (clID,dbKey) pair. It gets back an IOV and a string which points to the actual location of the data from which an IOA can be built. It then calls setRange() on the IOVSvc, which adds the IOV to its list of registered intervals. The IOA is set in the TransientAddress, and then the DataProxy 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)  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 Callback Functions F The parameter list of the callback functions is fixed. They must be of the form: F For releases < 6.1.0, the function needed to be virtual. No longer necessary for gcc 3.2 F The list parameter provides the list of keys of the objects which have triggered the callback.  The macro IOVSVC_CALLBACK_ARGS, which provides a template for the callback function argument list, is provided in IOVSvc/IOVSvcDefs.h StatusCode callbackFcn(int &i, std::list &keys);

9 Charles Leggett Unregistered Retrieves F It is now possible to retrieve data managed by the IOVSvc, without having to register a DataHandle with the Service. F Only simple retrieves - no associated callback functions are called (as none have been registered!) F Requires that the associated AddressProvider (eg IOVDbSvc) have already loaded the TransientAddress with the same ClassID and key as the requested object (done in the IAddressProvider::preLoadAddresses() method). F Standard access patterns for the retrieve: const MyObj *m_obj; p_condStore->retrieve(m_obj,”my_key”); m_obj->DoSomething();

10 Charles Leggett Duties of the AddressProvider  The AddressProvider must pre load the TADs, and then may call IOVSvc::preLoadTAD( TAD* ) to inform the IOVSvc of the existence of the TAD.  If IOVSvc::preLoadTAD is not called, then the list of proxies known to the IOVSvc will not include these ones, and thus will not be listed at the start of the job. However, the first time IOVSvc::getRange() is called on such a proxy (eg, the first time the associated object is accessed), the IOVSvc will add the proxy to the list of proxies it manages, and continue.  Calling IOVSvc::preLoadTAD() is recommended, as useful debugging information is printed out at the start of the job.

11 Charles Leggett Other Changes to IOVSvc F IOVTime now holds times in 64 bits, and distinguishes between times that were set as (run,event) pairs, or 64 bit ints. F Can force IOVSvc to preLoad all proxies it manages at the start of the job, instead of waiting for individual accesses to data. Use jobOption (bool) “preLoadProxies”. Can further force IOVSvc to access db for all these proxies, loading data, using jobOption (bool) “preLoadData”.  IOVSvc provides direct access to converter (eg IOVDbSvc or IOVASCIIDbSvc), to get and set ranges, with IOVSvc::getRangeFromDB() and IOVSvc::setRangeInDB(). Uses IIOVDbSvc interface.

12 Charles Leggett Changes to IOVASCIIDbSvc F To make use of unregistered retrieves, use the jobOption (vector ) “preLoadID” to supply the IOVASCIIDbSvc with a list of ClassIDs to preload. All keys found in dB for those ClassIDs will be preloaded. F Tags can now include whitespace.  Changes made to the dB during the course of a run, via IOVSvc::setRangeInDB(clid, key, range, tag) or IOVASCIIDbSvc::setRange(clid, key, range, tag) can now be saved to disk, using the jobOption (bool) “saveChanges”. F Run/event numbers in data files can be stored as: startRun startEvent stopRun stopEvent tag - or - {[startRun,startEvent] - [stopRun,stopEvent]} tag

13 Charles Leggett Caveats F The callback function must be virtual. This will no longer be necessary when we move to gcc 3.2 (release and above). F All DataHandles to elements that the IOVSvc will manage must be const, or you’ll get a runtime error. F Don’t try to deref the DataHandle before the first event is loaded, eg in the initialize phase. The proxy hasn’t been filled, and you’ll get a pointer to a null object.  Whenever you call regFcn(...), you will get a warning that looks like this:...lots of crap... instantiated by... instantiated by...../../../Control/IOVSvc/IOVSvc /IOVSvc/CallBackID.icc:24: warning: unsigned int format, different type arg (arg 3) This is OK, and can be safely ignored. Warning is gone in

14 Charles Leggett Other Stuff F Full online documentation: l