Hi Annalisa, What I thought is you could play later with TFormula such as : double zmincut = 100.; TFormula form("zmincutf", "[0]"); form->SetParameter(0,zmincut); ntuple->Draw("Iadc1","Xpos>zmincutf"); However, if this works by setting the true value instead of [0] in the definition of the TFormula, this doesn't that way. Sorry! Try it though... Steve Annalisa De Caro wrote: > Hi rooters, > thank you at all for you answers to my question... but i think that i was > not very clear... > > First problem: > This command lines are in a macro, that (in execution) ask me the value > for zmincut... then i do not know a priori his value!!! For example: > TFile* file = new TFile("strip4_z2.root"); > TNtuple* ntuple=(TNtuple*)file->Get("h8;1"); > (...) > cout<<"Give me the zmincut, please "; > cin>>zmincut; > ntuple->Draw("Iadc1","Xpos>zmincut"); > > > Second problem: > +And an other problem... > +When the command Draw (ntuple-Draw("Xpos"); or histogram->Draw();)is > +inside a macro, the histogram is plotted only when the macro is closed. > +And When the command Draw is inside a macro called by an other main > +macro, the histogram is plotted only when the main macro is closed. But > +how can i interact with the histogram (to draw a line where i want, for > +example), if i do not see him? > > For example: > ntuple->Draw("Zpos"); > cout<<'\n'<<"Give me the zmincut, please "; > cin>>zmincut; > cout<<'\n'<<"Give me the zmaxcut, please "; > cin>>zmaxcut; > ntuple->Draw("Iadc1","Zpos>zmincut && Zpos<zmaxcut"); > > If i understand, in cuts definition, the cut values can be numeric only!!! > > Thank you > > > ************************************************************************* > * University of Bologna | | decaro@bo.infn.it * > * Physics Department | +39 051 20 91103 | * > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > * University of Salerno | | * > * Physics Sciences Department | +39 089 96 5359 | * > * (INFN of Napoli) | | * > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > * CERN - EP division | | decaro@mail.cern.ch * > * (Bld.29 R019) | +41 22 76 77767 | * > *************************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET