I have a macro that I was using succesfully before Christmas (enclosed) and before version 2.23/10. When I tried to use it again today I have found that the postscript files contain about 1000 blank pages. I did not have this problem before. I am now trying to run on version 2.22/10 and now receive the error *** Break *** segmentation violation Root > Function regResid_P() busy flag cleared before the macro is due to make it's first plots. Could you please tell me what I am doing wrong? I am running on Linux. Thanks Vic void regResid_P(int job){ Int_t id,RegR1, RegR2,RegR3, RegP1, RegP2, RegP3; char outps[500]; char s3[20]="_reg.ps"; sprintf(outps,"section4_P.ps"); TPostScript myps(outps,111); myps.Range(16,24); TCanvas *c1 = new TCanvas("c1","Check",200,10,700,900); printf(" Job#=%d, vics_section4\n",job); char filename[500]; char s1[]="/vics_section4.root"; char s2[]="_link.root"; sprintf(filename,"LSFJOB_%d%s",job,s1); printf(" filename=%s\n",filename); // Display the result. TFile ff (filename); gStyle->SetOptStat(0); gStyle->SetOptFit(111111); TH2F *histo; char histoname[100]; Bool_t iplot=kFALSE; for (RegR1=0;RegR1<4;RegR1++){ for (RegR2=0;RegR2<4;RegR2++){ for (RegR3=0;RegR3<4;RegR3++){ for (RegP1=0;RegP1<2;RegP1++){ for (RegP2=0;RegP2<2;RegP2++){ for (RegP3=0;RegP3<2;RegP3++){ printf("combination %d %d %d %d %d %d \n",RegR1,RegR2,RegR3,RegP1,RegP2,RegP3); c1->Clear(); c1->Divide(2,3); for (id=2;id<8;id++){ sprintf (histoname, "RegionResidualsPhi%d%d%d%d%d%d%d",id,RegR1,RegR2, RegR3,RegP1,RegP2,RegP3); histo = (TH2F *)ff->Get(histoname); if (histo!=0) { c1->cd(id-1); histo->Draw("box"); c1->Update(); } //getchar(); } c1->Clear(); c1->Divide(2,3); for (id=2;id<8;id++){ sprintf (histoname, "RegionResidualsPhi%d%d%d%d%d%d%d",id,RegR1,RegR2, RegR3,RegP1,RegP2,RegP3); histo = (TH2F *)ff->Get(histoname); if (histo!=0) { c1->cd(id-1); TH1D *newstuff = histo-> ProjectionY("Projection", 0, 100, "E"); newstuff.Draw(); newstuff.Fit("gaus"); c1->Update(); } //getchar(); } } } } } } } myps.Close(); // c1->Print(outps); }
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET