Re: ntuple and TH2F Fill methods

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 31 Oct 2006 14:19:42 +0100


see documentation of TTree::Draw.
Use drawing option "goff" if you do not want to see the graphics output, eg

ntuple->Draw("var1:var2>>h2D","var4*(var5<0)","goff"); TH2 *h2D = gDirectory->Get("h2D");
h2D->Draw();

Rene Brun

eric.houla_at_free.fr wrote:
> ok, many thanks!
> Is there a way to avoid the automatic creation of the canvas ?
>
>
> Selon Rene Brun <Rene.Brun_at_cern.ch>:
>
>
>> see description of TTree::Draw. You can do
>>
>> ntuple->Draw("var1:var2>>h2D","weigth")
>>
>> ntuple->Draw("var1:var2>>h2D","var4*(var5<0)")
>>
>> Rene Brun
>>
>> eric.houla_at_free.fr wrote:
>>
>>> Hi!
>>>
>>> I have seen the nice method:
>>> ntuple->Draw("var1:var2>>h2D")
>>>
>>> where h2D is defined as TH2F.
>>>
>>> This is great !
>>> I'm interested by filling in fact by something like
>>> h2D->Fill(var1,var2, weight);
>>>
>>> Could you indicate me if something similar to the first method is possible
>>>
>> in
>>
>>> order to fill a weight directly ?
>>>
>> (ntuple->Draw("var1:var2:weight>>h2D(weight)
>>
>>> ") ???)
>>>
>>> Thank you.
>>>
>>>
>>
>
>
Received on Tue Oct 31 2006 - 14:19:50 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET