CINT Scope ??

From: Norbert Danneberg (norbert.danneberg@psi.ch)
Date: Fri Aug 06 1999 - 06:30:19 MEST


Hi , 

I do not understand why CINT does not know TH1D* hRegion2 in the example
below.
Drawing the histograms wors fine.

root [0] hRFvsPsi = new TH2F("hRFvsPsi","RF versus
Psi",70,230,920,60,0,360);
root [1] Events.Draw("Psi:RF>>hRFvsPsi","MultCluster ==2 &&
abs(Theta34Energy-$
Warning in <MakeDefCanvas>: creating a default canvas with name c1
root [2] Float_t min;
root [3] Float_t max;
root [4] min = 50;
root [5] max = 70;
root [6]
hRFvsPsi->ProjectionX("hRegion1",hRFvsPsi->GetYaxis()->FindBin(min), $
root [7] hRFvsPsi->ProjectionX("hRegion2",
hRFvsPsi->GetYaxis()->FindBin(min+1$
root [8] hRegion1->Draw();
root [9] hRegion2->Draw();
root [10] hRegion1->Add(hRegion2,1.0);
Error: No symbol hRegion2 in current scope  FILE:/tmp/23121maa_cint
LINE:1
*** Interpreter error recovered ***
root [11] hRegion2
(class TH1D*)0x961b628

Createing  the the objects within CINT works fine.

root [15] TH1F* h2 = new TH1F("h2","h2",3,1,3)
root [16] TH1F* h1 = new TH1F("h1","h1",3,1,3)
root [17] h2->Fill(2)
(Int_t)2
root [18] h1->Fill(1)
(Int_t)1
root [19] h1->Add(h2,1.0)

Cheers, 

Norbert



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:37 MET