Hi Exaos, In ROOT 3.05.07, using nt->Draw("myfunc(var1)") induces the bytecode compilation of all the loaded interpreted function. In particular, this include the function you defined in rootalias.C. In addition, the function you have tickle a CINT bug. Replace code like char s[256] = ....; by TString s = ....; (anyway this is a good idea to do so to avoid any potential memory overrun). A fix will be loaded shortly in the CVS repository. 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