[ROOT] Finding an object in a tree

From: Julien Bolmont (julien.bolmont@gamum2.in2p3.fr)
Date: Mon Apr 26 2004 - 13:32:37 MEST


Hi rooters,

Sorry if I missed something in the roottalk digest.

I have a tree filled with objects (inheriting from TNamed) so that if I 
use TTree::Show() I have for example :

root [7] tree->Show(5)
======> EVENT:5
  Exposition_Maps = NULL
  fUniqueID       = 0
  fBits           = 50331648
  fName           = h21m
  fTitle          = Exposure time (ZA range): 14 - 20 deg Theta_m<0.3
  kIsMag          = 0
  kDuration       = 0.188679
  kNbinL          = 180
  kNbinB          = 90
  kHExpoMap       = (TH2D*)4a1d600
  kCosIncAngleMin = -0.97
  kCosIncAngleMax = -0.94
  kMagAngleMin    = 0
  kMagAngleMax    = 0.3

I'd like to retrieve, in a compiled program, the object providing its 
name. For example,
I'd like to get the object corresponding to the name fName == h21m.

Is it possible, and how ?


Thanks for your help !

Julien


------------------------------------------------------
Julien Bolmont
Ingénieur diplômé - doctorant
Groupe d'Astroparticules de Montpellier



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