Questions about TTree

From: Woon-Seng Choong (wschoong@lbl.gov)
Date: Fri Nov 12 1999 - 21:26:37 MET


I have a question concerning the example program given in the description
of class TTree. In the example, a TH1F object is a branch of a
tree

 // Create a ROOT Tree
 TTree *tree = new TTree("T","An example of ROOT tree with a few branches");
 tree->Branch("point",&point,"x:y:z");
 tree->Branch("eventn",&eventn,"ntrack/I:nseg:nvertex:flag/i:temperature/F");
 tree->Branch("hpx","TH1F",&hpx,128000,0);


I ran the example program and when I look at directory structure of the
root file created using TBrowser, I saw the histogram hpx and the branch
hpx inside the T tree directory.  When I double click on the histogram
hpx, the histogram is plotted, but when I double click on the branch hpx,
nothing happenned.  If a histogram object can be a branch of a tree, why
can't I access it from the tree directory?  Why should the histogram show
up in 2 places in the directory structure?  If histogram is a branch of a
tree, will the histograms be added when the same tree from different root
files are chained together using TChain? 


	Seng



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:42 MET