[ROOT] Trouble with Error Message

From: Chris Milne (phycm@phy.hw.ac.uk)
Date: Tue Aug 14 2001 - 13:36:03 MEST


Hi there,

I was wondering if someone could help describe the following error message:

root [1] Error in <RootX11ErrorHandler>: BadValue (integer parameter out of 
range for operation) (XID: 0)
Error in <RootX11ErrorHandler>: BadDrawable (invalid Pixmap or Window parameter) 
(XID: 117440680)

I have a control bar with several buttons, two of these buttons produce a new 
canvas with graphs, histograms etc. But one of the gives the above error. The 
function called by the button is below:

void display_blue_blea()
{
  Bleach_LH_OCP = new TGraph(y,time,_bleach_LH_OCP);
  Bleach_HH_OCP = new TGraph(y,time,_bleach_HH_OCP);
  Bleach_LH_SCP = new TGraph(y,time,_bleach_LH_SCP);
  Bleach_HH_SCP = new TGraph(y,time,_bleach_HH_SCP);
  Blueshift_LH_OCP = new TGraph(y,time,_blueshift_LH_OCP);
  Blueshift_HH_OCP = new TGraph(y,time,_blueshift_HH_OCP);
  Blueshift_LH_SCP = new TGraph(y,time,_blueshift_LH_SCP);
  Blueshift_HH_SCP = new TGraph(y,time,_blueshift_HH_SCP);
  pad2= new TPad("pad2","pad2",0,0.12,1,1); 
  pad3= new TPad("pad3","pad3",0,0.12,1,1);
  pad4= new TPad("pad4","pad4",0,0.12,1,1);
  pad5= new TPad("pad5","pad5",0,0.12,1,1);
  TCanvas *blue_blea = new TCanvas ("blue_blea", "Blueshift and 
Bleaching",20,20,710,710);  	
  blue_blea->Divide(2,2);
  blue_blea->cd(1);							
  pad2->Draw();
  TSlider *xslider = new TSlider("xslider","x",0.1,0.02,0.9,0.1);
  xslider->AddExec("fit",".x fit.C");				//run on mouse 
over pad	
  blue_blea->cd(2);							
  pad3->Draw();
  TSlider *xslider2 = new TSlider("xslider2","x",0.1,0.02,0.9,0.1);
  xslider2->AddExec("fit",".x fit.C");			//run on mouse over pad
  blue_blea->cd(3);						
  pad4->Draw();
  TSlider *xslider3 = new TSlider("xslider3","x",0.1,0.02,0.9,0.1);
  xslider3->AddExec("fit",".x fit.C");	
  blue_blea->cd(4);			
  pad5->Draw();							
  TSlider *xslider4 = new TSlider("xslider4","x",0.1,0.02,0.9,0.1);
  xslider4->AddExec("fit",".x fit.C");
  
  pad2->cd();
  TH2F *bleaaxisHH= new TH2F("bleaaxisHH","Bleaching Heavy 
Hole",y,time[0],time[y-1],x,HH_bleach_min,HH_bleach_max);
  bleaaxisHH->SetStats(kFALSE);
  bleaaxisHH->Draw("A");
  bleaaxisHH->GetYaxis()->SetTitleOffset(1.2);
  Bleach_HH_SCP->Draw("P");
  Bleach_HH_SCP->SetMarkerColor(kBlue);
  Bleach_HH_SCP->SetMarkerStyle(8);
  Bleach_HH_SCP->SetMarkerSize(0.5);
  Bleach_HH_SCP->SetLineColor(kBlue);
  Bleach_HH_OCP->Draw("P");
  Bleach_HH_OCP->SetMarkerColor(kGreen);
  Bleach_HH_OCP->SetMarkerStyle(8);
  Bleach_HH_OCP->SetMarkerSize(0.5);
  Bleach_HH_OCP->SetLineColor(kGreen);
  TPaveText *legend = new TPaveText(.82,.82,.97,.97,"NDC");
  TText *OCP = new TText(0.85,0.85,"OCP");
  TText *SCP = new TText(0.85,0.9,"SCP");
  legend->Draw();
  OCP->SetTextColor(kGreen);
  SCP->SetTextColor(kBlue);
  SCP->DrawTextNDC(0.85,0.84,"OCP"); 
  OCP->DrawTextNDC(0.85,0.91,"SCP");
  bleaaxisHH->GetXaxis()->SetTitle("Time (ps)");
  bleaaxisHH->GetYaxis()->SetTitle("Bleaching (a.u.)");
  
  pad3->cd();
  TH2F * bleaaxisLH= new TH2F("bleaaxisLH","Bleaching Light 
Hole",y,time[0],time[y-1],x,LH_bleach_min,LH_bleach_max);
  bleaaxisLH->SetStats(kFALSE);
  bleaaxisLH->Draw("A");
  pad3->Update();
  bleaaxisLH->GetYaxis()->SetTitleOffset(1.2);
  Bleach_LH_SCP->Draw("P");
  Bleach_LH_SCP->SetMarkerColor(kBlue);
  Bleach_LH_SCP->SetMarkerStyle(8);
  Bleach_LH_SCP->SetMarkerSize(0.5);
  Bleach_LH_SCP->SetLineColor(kBlue);
  Bleach_LH_OCP->Draw("P");
  Bleach_LH_OCP->SetMarkerColor(kGreen);
  Bleach_LH_OCP->SetMarkerStyle(8);
  Bleach_LH_OCP->SetMarkerSize(0.5);
  Bleach_LH_OCP->SetLineColor(kGreen);
  legend->Draw();
  SCP->DrawTextNDC(0.85,0.84,"OCP"); 
  OCP->DrawTextNDC(0.85,0.91,"SCP");  
  bleaaxisLH->GetYaxis()->SetTitle("Bleaching (a.u.)");
  bleaaxisLH->GetXaxis()->SetTitle("Time (ps)");
  
  pad4->cd();
  TH2F * blueaxisHH= new TH2F("blueaxisHH","Blueshift Heavy 
Hole",y,time[0],time[y-1],x,HH_blueshift_min,HH_blueshift_max);
  blueaxisHH->SetStats(kFALSE);
  blueaxisHH->Draw("A");
  blueaxisHH->GetYaxis()->SetTitleOffset(1.2);
  Blueshift_HH_SCP->Draw("P");
  Blueshift_HH_SCP->SetMarkerColor(kBlue);
  Blueshift_HH_SCP->SetMarkerStyle(8);
  Blueshift_HH_SCP->SetMarkerSize(0.5);
  Blueshift_HH_SCP->SetLineColor(kBlue);
  Blueshift_HH_OCP->Draw("P");
  Blueshift_HH_OCP->SetMarkerColor(kGreen);
  Blueshift_HH_OCP->SetMarkerStyle(8);
  Blueshift_HH_OCP->SetMarkerSize(0.5);
  Blueshift_HH_OCP->SetLineColor(kGreen);
  legend->Draw();
  SCP->DrawTextNDC(0.85,0.84,"OCP"); 
  OCP->DrawTextNDC(0.85,0.91,"SCP");  
  blueaxisHH->GetYaxis()->SetTitle("Blueshift (meV)");
  blueaxisHH->GetXaxis()->SetTitle("Time (ps)");
   
  pad5->cd();
  TH2F * blueaxisLH= new TH2F("blueaxisLH","Blueshift Light 
Hole",y,time[0],time[y-1],x,LH_blueshift_min,LH_blueshift_max);
  blueaxisLH->SetStats(kFALSE);
  blueaxisLH->GetYaxis()->SetLimits(0,LH_blueshift_max); 
  blueaxisLH->Draw("A");
  blueaxisLH->GetYaxis()->SetTitleOffset(1.2); 
  Blueshift_LH_SCP->Draw("P");
  Blueshift_LH_SCP->SetMarkerColor(kBlue);
  Blueshift_LH_SCP->SetMarkerStyle(8);
  Blueshift_LH_SCP->SetMarkerSize(0.5);
  Blueshift_LH_SCP->SetLineColor(kBlue);
  Blueshift_LH_OCP->Draw("P");
  Blueshift_LH_OCP->SetMarkerColor(kGreen);
  Blueshift_LH_OCP->SetMarkerStyle(8);
  Blueshift_LH_OCP->SetMarkerSize(0.5);
  Blueshift_LH_OCP->SetLineColor(kGreen);
  legend->Draw();
  SCP->DrawTextNDC(0.85,0.84,"OCP"); 
  OCP->DrawTextNDC(0.85,0.91,"SCP"); 
  blueaxisLH->GetYaxis()->SetTitle("Blueshift (meV)"); 
  blueaxisLH->GetXaxis()->SetTitle("Time (ps)");
}

Thanks in advance

Chris Milne



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET