Re: [ROOT] Python and TFile

From: WLavrijsen@lbl.gov
Date: Sun Sep 26 2004 - 11:29:17 MEST


Eugen,

> I'm using Root version 4.00/8 on Debian Linux.

IIRC, on 4.00/08 you don't have a properly implemented access to gDirectory.

> How can I fetch an object stored in a ROOT file to python?

Same way as in ROOT. There are probably tutorials around. The other day, I
saw a user do this:

  file = TFile( tfilename % num )
  file.cd( 'CBNT' )
  fchain = gDirectory.Get( 't3333' )

where fchain is of type TTree (objects are automatically down-casted).

HTH,
  Wim
-- 
Wim.Lavrijsen@cern.ch   --   WLavrijsen@lbl.gov   --   www.lavrijsen.net

"Stop making excuses for your software."    --first step towards quality



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET