Download presentation
Presentation is loading. Please wait.
Published byDaniel Spencer Modified over 9 years ago
1
AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005
2
Main idea Substitute for the current NTuple Service Follows the AIDA specification Easy to maintain: Few code in GaudiSvc package Main part outside (PI project) Well documented
3
Contents of AIDATupleSvc (I) AIDATupleSvc.h /.cpp Inherits from DataSvc Common tasks (connect, book, find, register, unregister…) Interface to PI Stores Support for ROOT, POOL, HBOOK and XML persistency POOL persistency the most interesting for Gaudi
4
Contents of AIDATupleSvc (II) AIDATuple.h /.cpp Inherits from DataObject to make it storable Holds a normal pi_aida::Tuple and a pi_aida::Filter Can store: Basic data types User-defined objects (Dictionary needed) POOL Tokens (POOL persistency) IOpaqueAddresses (Event Tag Collections)
5
Contents of AIDATupleSvc (III) AIDAEvtCollSelector.h /.cpp Choosing names is not my best Inherits from IEvtSelector Still not ready (hopefully this Friday) Access to original events from IOpaqueAddress stored in normal tuples
6
How to use it (Overview) Examples in the GaudiExamples package AIDATuple folder First versions: basic usage AIDATupleAlgorithRead and AIDATupleAlgorithWrite Last version: simple write/read and event write/read AIDASimpleWrite and AIDASimpleRead AIDAEventWrite and AIDAEventRead
7
How to use it (Writing I) Declaring an AIDATuple Include GaudiKernel/IAIDATuple.h IAIDATuple* m_tuple Booking an AIDATuple Through the atupleSvc(): atupleSvc()->book(PATH, TITLE, STRUCTURE) Structure as std::string std::string columns = “float px; float py; float mass”
8
How to use it (Writing II) Filling the tuple Basic types and IOpaqueAddress: “fill” method m_tuple->fill(COLUMN_INDEX, DATA) Objects: “setAddress” method Build a new object Bind the address to the column Object* myObject = new Object() m_tuple->setAddress(COLUMN_NAME, &myObject) After filling a row, commit changes m_tuple->addRow()
9
How to use it (Reading I) Retrieving and registering an existing tuple Through the atupleSvc(): atupleSvc()->retrieveObject(FULLPATH, m_tuple) atupleSvc()->registerObject(STORE, TUPLE, m_tuple) Initialize the tuple m_tuple->start() Reading an AIDATuple Sequential access while(m_tuple->next()… Basic types and IOpaqueAddress: “getTYPE” method Objects: “setAddress” method Empty pointer to the object Bind the address to the column
10
How to use it (Reading II) Filtering data Server side: “setCriteria” method Client side: “setFilter” method Both before call “start()” method Cut criteria passed as std::string m_tuple->setCriteria(“mass > 1”) or m_tuple->setFilter(“mass > 1”) m_tuple->start()
11
Last minute problems PI project discontinued PI moved inside GAUDI (GaudiPi package soon avaliable) Someone responsible to maintain this code
12
Thanks for your attention… … and for not making compromising questions about the new service
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.