Hi,
I have the following macro. The macro works as expected if I comment out
the continue statement. When I leave continue in, CINT complains:
root [1] test_bug();
Error: non class,struct,union object $gPad used with . or ->
FILE:TestBug.C LINE:24
void test_bug(){
TH1F h1("h1", "h1", 100, 1, 100);
TH1F h2("h2", "h2", 100, 100, 200);
TCanvas can("can", "can", 1000, 1000);
can.Divide(1,2);
can.cd(1);
h1.Draw();
can.cd(2);
h2.Draw();
Double_t result = 0;
Int_t i = 0;
// for(Int_t i = 0; i<1000; i++){
while(i<1000){
result = gRandom->Gaus(50, 5);
if(result < 50){
i++;
continue;
}
h1.Fill(result);
h2.Fill(result*2);
if(i%10 == 0){
can.cd(1);
h1.Draw();
gPad->Update();
can.cd(2);
h2.Draw();
gPad->Update();
}
i++;
}
}
Is this a bug, or am I missing something?
Mike Kordosky
--
Graduate Research Assistant // High Energy Physics Lab
kordosky@hep.utexas.edu // University of Texas at Austin
kordosky@fnal.gov //
ph: (512) 471-8426 (RLM Lab, Office)
(512) 475-8673 (ENS Lab)
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET