AIDA Tuple Service Manuel Domenech Wednesday
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
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
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)
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
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
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”
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()
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
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()
Last minute problems PI project discontinued PI moved inside GAUDI (GaudiPi package soon avaliable) Someone responsible to maintain this code
Thanks for your attention… … and for not making compromising questions about the new service