Re: MyHist_2D ->Draw()

From: Andy Mastbaum <mastbaum_at_hep.upenn.edu>
Date: Mon, 9 Aug 2010 13:45:55 -0400


To get a TH2F object named "myhist_2D" from a file, you can always do something like:

TFile f("your_file.root")
TH2F *myhisto = (TH2F*) f.Get("myhist_2D") myhisto->Draw()

Cheers,
Andy

On 08/09/2010 01:22 PM, Marc Escalier wrote:
> Hi,
>
> did you check if your histogram was not inside a subdirectory of your
> file ?
>
> =====
>
> On Mon, 9 Aug 2010, asaddiqu_at_ualberta.ca wrote:
>
>>
>> Hi,
>>
>> I can view my 2D histogram by "TBrowser" but whenever i try to see it
>> by "Draw()".
>> It shows an error message which is following.
>>
>> ============================================
>> root[1] myhist_2D->Draw()
>> Error: Symbol myhist_2D is not defined in current scope FILE:(tmpfile)
>> LINE:1
>> Error: Failed to evaluate myhist_2D->Draw()Possible candidates are...
>> filename line:size busy function type and name
>> =============================================
>>
>> Unfortunately, i am using an older version of root{4.00/08 December
>> 2004 } but there should be no problem of version with this basic thing.
>>
>> Cheers, Asif
>>
>>
>>
>>
>>
>>
>>
>>
>
Received on Mon Aug 09 2010 - 19:45:27 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 09 2010 - 23:50:01 CEST