Re: MyHist_2D ->Draw()

From: Xinchun Tian <tianxc_at_gmail.com>
Date: Mon, 9 Aug 2010 17:02:21 -0400


Hi,

Does it under a tree? if so, try to add the tree name like: TH2F *myhisto = (TH2F*) f.Get("mytree/myhist_2D")

Regards,
Xinchun

On Mon, Aug 9, 2010 at 1:58 PM, <asaddiqu_at_ualberta.ca> wrote:

>
> I already tried this option as well. But doesn't work.
>
> Cheers, Asif
>
>
> Quoting "Andy Mastbaum" <mastbaum_at_hep.upenn.edu>:
>
> 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 - 23:02:27 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 10 2010 - 05:50:02 CEST