Hi Elena,
It looks like your histograms TH1F *f and *g are not named "f" and "g".
When doing t->Draw("p2.pt>>g"), ROOT will fill an histogram named "g".
If no histogram named "g" exists, one will be automatically created.
Rene Brun
On
Fri, 17 Oct 2003, Elena Vataga wrote:
> Hello, rooters!
>
>
> Could you, please, give me an advise on the following:
>
> I created function inside my root macro which essentialy
> do the following:
>
> void make_histo(TChain *t , TH1F* g, TH1F* b, TCut CUT ) {
> t->Draw("p2.pt>>g");
> t->Draw("p2.pt>>b",CUT);
> g->Sumw2();
> b->Sumw2();
> }
>
> Histogram I am getting on return are empty.
> I cannot simply make:
>
> t->Draw("p2.pt>>htemp");
> TH1F *g = (TH1F*)htemp->Clone("g")
> because I am using non-equidistant binning and need to pass
> booked histo into subroutine.
>
> Any idea how to make it work?
>
> Thank you in advance,
> Elena
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET