Adding 2D histograms !

From: Saleem, Muhammad <saleem_at_slac.stanford.edu>
Date: Mon, 18 May 2009 19:44:38 -0700


Hi,  

I am trying to add 2D histograms.  

This is what I do :  

  TFile* file1 = new TFile("file1.root");   TFile* ffile2 = new TFile("file2.root");   

  TH2F* hist1;
  TH2F* hist2;   

  hist1 = (TH2F*)f1->Get("h1_2D");
  hist2 = (TH2F*)f2->Get("h2_2D");  

  hist1->Add(hist1, hist2);  

I get the following error:  

Error: illegal pointer to class object hist4 0x0 1232 *** Interpreter error recovered ***  

Any idea, what am I doing wrong ?  

regards,  

---saleem     Received on Tue May 19 2009 - 04:44:54 CEST

This archive was generated by hypermail 2.2.0 : Tue May 19 2009 - 11:50:03 CEST