[ROOT] using user-defined function

From: Vladimir Morozov (VBMorozov@lbl.gov)
Date: Wed Feb 19 2003 - 05:48:10 MET


Dear All:
Is it possible to define a function in ROOT, say, via 
    .L func.C++
where 

   float func(float in){
      return smth;
   }

and then use it in drawing ntuples, etc, for instance:

   TNtuple *nt = new TNtuple("nt","nt","x:y");
   nt->Fill(10,10); ... etc;

   nt->Draw("func(x)") 

???

I tried this particular way, but it doesn't seem to work. 
Is there another way to do it??

Thanks a lot,
Vladimir



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET