[ROOT] bug in Tree::Draw() ???

From: Colin Bernet (bernet@hep.saclay.cea.fr)
Date: Wed Sep 18 2002 - 17:26:52 MEST


Hello rooters !

Sorry to bug you again with my tree... I'm now one step further (thanks to 
Rene and Davide), and I noticed something peculiar : When I use a tree
inside a MakeClass generated code, using functions like sin or sqrt in
Tree::Draw doesn't seem to be possible anymore. 

Here is what I did :

root [7] TFile
f("/home/data2002/minidst/DstOut20230/chunk10001/MDST_0.root")  
root [8] TTree *tree=(TTree*)f.Get("MDST")                             
root [9] tree->MakeClass("TestMC") 
Info in <TTreePlayer::MakeClass>: Files: TestMC.h and TestMC.C generated
from Tr
ee: MDST
(Int_t)0
root [10] .L TestMC.C
root [11] TestMC tmc(tree)
root [13] tmc.fChain ->Draw("sqrt(number)")

 *** Break *** segmentation violation
Root > 
root [14] 
root [14] tree->Draw("sqrt(number)")       

 *** Break *** segmentation violation
Root > 
root [15] 
root [15] TFile
f("/home/data2002/minidst/DstOut20230/chunk10001/MDST_0.root")
root [16] TTree *tree=(TTree*)f.Get("MDST")                            
root [17] tree->Draw("sqrt(number)")                                          
now ok.


Strange, isn't it ?

I'm usually using the MakeClass generated codes to implement a more
convenient way of chaining the files : 

MyClass::MyClass(const char* pattern) 
will chain together all files matching pattern.
Therefore I often use MyClass only to chain the files automatically and
then use
MyClass::fChain directly. This is why I would need to have all
functionnalities of Tree::Draw working also in this case. 

Do you know what is happening ?

Many thanks,
Colin

ROOT 3.03/08 for gcc 2.95.2 on RH 6.2



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:10 MET