Hi Yannick, What you request could be implemented. However, I believe that it is far more efficient to use TTree::MakeClass where you have the fullpower of C++ to compute operations on original variables. You can also fill more than on histogram in the loop. Rene Brun Patois Yannick wrote: > > Hello, > > I can draw a ntuple, like : > > my_ntuple->Draw("var1:var2"); > > I can use simple predefined functions : > > my_ntuple->Draw("sqrt(var1):var2"); > > But if I want to define my own function, using many variables in the > ntuple, I would say something like in paw one can do : > nt/plot 1000.toto.f(5) > > Where toto.f can then use any of the ntuple varable to create it's return > value, using the defined COMMONs. > > I tryed something like : > > Float_t xrms(Float_t *PMT) > { > return(*PMT); > } > > void rms() > { > TF1 *xrms = new TF1("xrms",xrms,0,1000,1); > Tournesol->Draw("xrms(QDCf1)"); > } > > But it did'nt worked at all. Of course it's still far from what I would > like to have (a function with *every* ntuple vars for this event as > input). > > Any clue ? > > Yannick > > _/ Yannick Patois \_________________ Address (home) __________________ > | irc(undernet): Garp on #france25+ | La Villa des Sciences | > | email : patois@ganil.fr | 12, avenue de Cambridge | > | web :http://www.sura.org/~patois/ | 14200 Herouville-Saint-Clair | > | Tel(home) :+33 02 31 94 50 32 | FRANCE | > |___________________________________|__________________________________|
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET