AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.
-
Upload
daniel-spencer -
Category
Documents
-
view
215 -
download
2
Transcript of AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.
![Page 1: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/1.jpg)
AIDA Tuple ServiceAIDA Tuple Service
Manuel Domenech
Wednesday 26-10-2005
![Page 2: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/2.jpg)
Main ideaMain 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
![Page 3: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/3.jpg)
Contents of Contents of AIDATupleSvc (I)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
![Page 4: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/4.jpg)
Contents of Contents of AIDATupleSvc (II)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)
![Page 5: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/5.jpg)
Contents of Contents of AIDATupleSvc (III)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
![Page 6: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/6.jpg)
How to use it (Overview)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
![Page 7: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/7.jpg)
How to use it (Writing I)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::stringstd::string columns = “float px; float py; float mass”
![Page 8: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/8.jpg)
How to use it (Writing II)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 changesm_tuple->addRow()
![Page 9: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/9.jpg)
How to use it (Reading I)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 tuplem_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
![Page 10: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/10.jpg)
How to use it (Reading II)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()
![Page 11: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/11.jpg)
Last minute problemsLast minute problems
PI project discontinued PI moved inside GAUDI (GaudiPi package soon
avaliable) Someone responsible to maintain this code
![Page 12: AIDA Tuple Service Manuel Domenech Wednesday 26-10-2005.](https://reader036.fdocuments.us/reader036/viewer/2022082818/56649f175503460f94c2e943/html5/thumbnails/12.jpg)
Thanks for your attention…Thanks for your attention…
… and for not making compromising questions about the new service