[ROOT] Filling hosto in subroutines

From: Elena Vataga (vataga@fnal.gov)
Date: Fri Oct 17 2003 - 17:42:37 MEST


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