Hi Nico,
Create a small script, say sum.C with
double sum() {return a+b;}
and do:
tree.Draw("sum.C")
Rene Brun
Nico De Simone wrote:
> Dear Rooters,
> Using TTree::Draw() I can access member variables and methods defined
> in the class used to build the tree.
>
> How can I create new methods or new variables, in a new class, and use
> it in the same Draw()? Eg: the original class gives me the ints a and
> b and I want to create c=a+b and do tree-> Draw("c"). With MakeClass I
> only get member variables of the original class but not the methods
> and add them is not trivial. Is there a better way?
>
> Thanks for any help.
> Nico
>
Received on Thu Jan 18 2007 - 22:43:45 CET
This archive was generated by hypermail 2.2.0 : Fri Jan 19 2007 - 11:50:00 CET