1 / 15

Twelve Ways to Build CMS Crossings from Root Files

Twelve Ways to Build CMS Crossings from Root Files. Benefits and deficiencies of Root trees and clones when : - NOT dealing with TObjects, - reading the trees entries NOT sequentially, - processing them NOT one by one. Outline. Goal & scope. Main use-case.

Download Presentation

Twelve Ways to Build CMS Crossings from Root Files

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. Twelve Ways to Build CMS Crossings from Root Files Benefits and deficiencies of Root trees and clones when :- NOT dealing with TObjects,- reading the trees entries NOT sequentially,- processing them NOT one by one. David Chamont (CMS - LLR)

  2. Outline • Goal & scope. • Main use-case. • 4 kinds of containers for the crossing data model. • 3 kinds of persistency managers. • Results. • Conclusions. David Chamont (CMS - LLR)

  3. Goal & Scope • Evaluate the benefits of TTree and TClonesArray for the persistency of CMSevent data (whose classes heavily rely on templates and external packages). • Focus on the generation of crossings (pile-up of about 160 simulated events chosen pseudo randomly). • Not covered yet : meta-data, associations between persistent objects, schema evolution . David Chamont (CMS - LLR)

  4. Main Use-Case Digitizer signal event (hits) minbias event (hits) digis Persistency Manager Persistency Manager Persistency Manager minbias events file digis file signal events file minbias events file David Chamont (CMS - LLR)

  5. Crossing Data Model • The folders //root/crossing/* represent the events composing the current crossing. • Each event folder contains a container for each kind of event objects :TrackHit,CaloHit,… • The kind of container is chosen among four : • std::vector<> (by value). • dynamic C array (each event object is wrapped inside a class instrumented with classdef). • TObjArray (each event object is wrapped inside a class derived from TObject). • TClonesArray (each event object is wrapped inside a class derived from TObject). David Chamont (CMS - LLR)

  6. Persistency Managers • The task of a persistency manager is to transfer an event from memory(TFolder) to disk(TFile) and vice-versa. • Three flavors have been implemented : • RtbPomKeys : directly write the TFolder in the TFile, each time with a different meaningful name. • RtbPomTreeMatrix : for each container in the folder, creates a TMatrixD and attach it to a branch of a TTree. • RtbPomTreeDirect : attach directly each container to a branch of a TTree. David Chamont (CMS - LLR)

  7. Implementation issues • Recent progress : • can now use -ansi -pedantic. • nice support of foreign classes. • better and better support of templates and std containers. • Recurrent problems with Root I/O : • must explicitly ask to parse namespaces, components types and template instances. • multiple containers sizes and misleading operator[], • tuning of chain branchs, • it is unclear which subset of C++ is supported by Root I/O, and which in TTree, and which in TClonesArray. David Chamont (CMS - LLR)

  8. Configuration • Pentium 4, 1.8 GHz. • ~ 512 Mo of RAM. • IDE disk. • RedHat Linux 7.3 • Gcc 3.2 • Root 3.05/03 David Chamont (CMS - LLR)

  9. Parameters of the Testbed • compression level. • size of buffers. • split level. • randomness : burst and jump. • size of the containers within the events. • number of crossings. • direct inheritance or not from TObject, direct instrumentation or not with ClassDef. • resetting or not the values in the empty constructors. David Chamont (CMS - LLR)

  10. Best Results David Chamont (CMS - LLR)

  11. Remove compression David Chamont (CMS - LLR)

  12. Then increase random David Chamont (CMS - LLR)

  13. Then reduce containers /10 David Chamont (CMS - LLR)

  14. Then remove random David Chamont (CMS - LLR)

  15. Conclusions • We succeeded to read pseudo-random entries from a chain and dispatch them to few hundred folders (despite tuning of TChain branches has not been straightforward). • Support for foreign classes, templates and C++ standard library has greatly improved. • The magic couple TTree/TClonesArray has proved very efficient, yet it requires top level TObjects and the benefits can become losses with less data or random access pattern. • One can simply use std vectors and store them directly into root files. Their integration in a TTree is not as worth as a TClonesArray. This could change in the next release of ROOT. • It would be interesting to retry with direct associations between objects, and to apply the testbed to POOL. David Chamont (CMS - LLR)

More Related