Hi Exaos, You did not specify which version of ROOT you are using. If you are using 3.05.07, please send me a small tar file with your root file and your mycode.C Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Exaos Lee Sent: Monday, August 04, 2003 10:48 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] TNtuple::Draw() with my own function? Dear rooter, Shall I use TNtuple::Draw() like this: ------ root [] .L mycode.C root [] nt=(TNtuple *)f->Get("my_nt") root [] nt->Draw("myfunc(var1)", my_selections) ------ Assume "mycode.C" is something like this: ----- // Float_t myfunc(Float_t var) { .... return the_result; } ----- Assume that myfunc() cannot be replaced by simple expressions like "sqrt(x)*x". I am afraid that TNtuple is not compatible perfectly with TTree. I used TNtuple::Draw() as above and got "segmentaion violation". I am confused. Regards. Exaos ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET