Re: [ROOT] Simple Question

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 28 2003 - 08:22:25 MEST


Hi,

Are you joking?

Did you try:

TH1F *h1 = (TH1F*)f->Get(histname);

Rene Brun

On Sat, 26 Apr 2003, Sunil Jayatilleke 
wrote:

> Hi
> 
> I can get a pointer to a histogram this way
> TFile *f = new TFile("test.root"); 
> TH1F *h1 = (TH1F*)f->Get("hist");
> 
> If I write
> const char *histname = "hist";
>  
> How do I get a pointer to a histogram?
> 
> Thanks
> Sunil
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET