1 / 10

ROOT Data bases access

ROOT Data bases access. LCG Data base deployment workshop 11 October Ren é Brun CERN. File types & Access in 4.04/xx. user. Local File X.xml. TFile TKey/TTree TStreamerInfo. TSQLServer TSQLRow TSQLResult. http. rootd/xrootd. Oracle. Local File X.root. MySQL. Dcache.

cflinn
Télécharger la présentation

ROOT Data bases access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ROOT Data bases access LCG Data base deployment workshop 11 October René Brun CERN ROOT Data bases access

  2. File types & Access in 4.04/xx user Local File X.xml TFile TKey/TTree TStreamerInfo TSQLServer TSQLRow TSQLResult http rootd/xrootd Oracle Local File X.root MySQL Dcache Castor PgSQL RFIO Chirp SapDb ROOT Data bases access

  3. File types & Access in 5.04/xx user Local File X.xml TTreeSQL TFile TKey/TTree TStreamerInfo TSQLServer TSQLRow TSQLResult http rootd/xrootd Oracle Local File X.root MySQL Dcache Castor PgSQL RFIO Chirp SapDb ROOT Data bases access

  4. New RDBMS interface: Goals • Access any RDBMS tables from TTree::Draw • Create a TTree in split mode •  creating a RDBMS table and filling it. • The table can be processed by SQL directly. • The interface uses the normal I/O engine • including support for Automatic Schema Evolution. ROOT Data bases access

  5. TTree with SQL database back-end • Uploaded in CVS repository of first version of TTreeSQL • support the TTree containing branches created using a leaf list (eg. hsimple.C). • Add an interface to read the proper TTree object depending on the backend • Something like TTree::Open using the Plugin Manager • Extend TTreeSQL to support TBranchElement • Implement proper schema evolution support • The main design problem is how to save/retrieve the TProcessID/TStreamerInfo. • One possibility is to use the same mechanism currently in use in TXMLFile ntuple->Branch("main",&mytest,"px/D:py/F:pz:random:i/I:c/B"); ntuple->Branch("string",(void*)str,"str/C"); ROOT Data bases access

  6. TTreeSQL Syntax • Currently: • ROOT: • MySQL: • Coming: TFile *file = new TFile("simple.root","RECREATE"); TTree *tree; file->GetObject(“ntuple”,tree); TSQLServer*dbserver = TSQLServer::Connect("mysql://…”,db,user,passwd); TTree *tree = new TTreeSQL(dbserver,"rootDev","ntuple"); TTree *tree = TTree::Open(“root:/simple.root/ntuple”); TTree *tree = TTree::Open(“mysql://host../rootDev/ntuple”); ROOT Data bases access

  7. TTreeSQL Optimization • On a simple test with a local MySQL database: • Reading is 5x slower than with ROOT I/O • Writing is functional but requires significant optimization of the code. • Current implementation of the SQL communication (text oriented) could be greatly improved. • Could use some expertise in MySQL and odbc (to reinvigorate RDBC) ROOT Data bases access

  8. Support for TBranchElement • Will add the creation of auxiliary tables • table of TStreamerInfos • Will add support for ‘blob’ data field to support unsplit object. • Will need support for ‘collection’ • either by using additional ‘linked’ tables • either by using ‘blob’ data field Plan before the ROOT workshop ROOT Data bases access

  9. Oracle Configuration, Parameters, Geometry CBM Analysis ROOT Root files MCPoints, Hits, Digits, Tracks Geometry Manager Virtual MC IO Manager GeoInterface Run Manager RunTime DataBase Module Primary Generator Magnetic Field Detector Root files Configuration, Parameters, Geometry Tasks EVGEN Delta digitizers Tracking ROOT Data bases access

  10. Reading Parameters: Oracle • gSystem->Load ( "libOra" ); • CbmRunAna * fRun = new CbmRunAna(); • CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); • CbmParOraIo* ora=new CbmParOraIo(); • ora->open(); • rtdb->setFirstInput(ora); • CbmGenericParOraIo* genio= • (CbmGenericParOraIo*)(ora->getDetParIo("CbmGenericParIo")); • CbmParTest* par=(CbmParTest*)(rtdb->getContainer("CbmParTest")); • genio->readFromLoadingTable(par,RunId); • par->print(); • par->printParams(); ROOT Data bases access

More Related