load / unload files using CINT

From: Otto Schaile (Otto.Schaile@Physik.uni-muenchen.de)
Date: Wed May 21 1997 - 12:58:16 MEST


Hello roots,
I have the following macro:
------------------
class TH1F;
class XX {
private: 
  TH1F *h1;

public:
  XX();
  void Drawhist();
};

XX::XX(){
  h1 = new TH1F("xxx","tit",10,0.,10.);
  for (int i=0; i < 10 ; i++){ 
    h1->Fill(i,i);
  }
}

XX::Drawhist(){
  h1->Draw();
} 
---------------------

running root (CINT) I get:

root [0] .L xx.C       
root [1] XX *x=new XX()
root [2] x.Drawhist()  
Warning in <MakeDefCanvas>: creating a default canvas with name c1
root [3] .U xx.C       
root [4] .reset        
root [5] .L xx.C       
root [6] XX *y=new XX()

 *** Break *** segmentation violation
---------------------
Before ".U xx.C" I close the Canvas from its popup menu.
What is wrong with this macro/commands?

Cheers,

----------------------------------------------------------------------------
Otto Schaile                    Sektion Physik der LMU Muenchen
Phone: (+49 89)289 14070        Am Coulombwall 1, D-85748 Garching, Germany
FAX:   (+49 89)289 14072        EMail: Otto.Schaile@Physik.Uni-Muenchen.DE



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