Hi Martin,
tree->Draw( "func(length)" );
should work (if and only if you use the TF1 constructor you mentioned).
Cheers,
Philippe
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Martin Schroedter
Sent: Tuesday, April 08, 2003 3:13 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] user-defined function in Draw
Hi,
can someone tell me how to apply a user-defined function to a leaf?
Let's say I have data in a leaf called "length", then i can histogram
the sqrt(length)
tree->Draw("sqrt(length)")
How can I use my own function instead of sqrt()? The obvious (to me)
choice does not work:
TF1 func("func","1+2*x",2,6);
tree->Draw( "func.Eval(length)" );
*ERROR 26 :
Unknown name : "func.Eval(length)"
Thank you,
Martin
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET