GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » GENFIT objects in the ROOT Browser
Re: GENFIT objects in the ROOT Browser [message #6335 is a reply to message #6331] Thu, 10 April 2008 10:36 Go to previous message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *

Ok. I can reproduce your error.
What I always did, was running the plotDemo.C and then directly afterwards the Browser. Then it works.

What also works (and I really suggest this as the best way to work) is to do the following:

sneubert@dimbula:/afs/e18/panda/SIM/sneubert/pandaroot$ root -l
root [0] .x recotasks/demo/loadRecoLibs.C
- RTDB container factory CbmBaseContFact
- RTDB container factory PndFieldContFact
- RTDB container factory PndPassiveContFact
- RTDB container factory PndMvdContFact
- RTDB container factory PndEmcContFact
- RTDB container factory PndDrcContFact

PSaid instance created...  access via gSaid->f()

- RTDB container factory PndTpcContFact
root [1] TFile *_file0 = TFile::Open("demo.mcreco.root")
root [2] cbmsim->Draw("Track.getMom().Mag()")
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [3]                   

This behaviour of the Browser I have observed also in other contexts. It has to do with the way ROOT is reading in the objects from the file. Different things are happening behind the scenes when you access the tree directly or in the browser. The browser only reads part of the object into memory and when you have a bit more complicated functions it may not read all parts of the object that are necessary to perform the operation. The Tree seems to be more intelligent in that regard.

I think I once solved that in another case by setting the split level of the branch that I wanted to read to 1 or 2. So that you force ROOT to always load the complete object.

Cheers! Sebastian.

Sebastian Neubert
Technische Universität München
Department Physik E18
tel: +49-8928912592
Read Message
Read Message
Read Message
Previous Topic: Problem with low momentum Pion
Next Topic: GEANE and GENFIT
Goto Forum:

Current Time: Thu Jul 18 15:12:46 CEST 2024

Total time taken to generate the page: 0.00770 seconds