[ROOT] TNtuple::Draw() with my own function?

From: Exaos Lee (schlie@iris.ciae.ac.cn)
Date: Mon Aug 04 2003 - 17:47:42 MEST


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