Re: Just another SEGV ...

From: Volker Hejny (V.Hejny@fz-juelich.de)
Date: Tue Aug 17 1999 - 09:28:06 MEST


Hallo,

On Mon, Aug 16, 1999 at 03:39:54PM +0200, Volker Hejny wrote:
> void EMCalo::ReadCalFile(char *n) {
>   Int_t		Rn, Mn, Nn;
>   Float_t	x,y,z,size;
>   
>   ifstream setup(n);
>   while (!setup.eof()) {
>     setup >> Rn;
>     setup >> Mn;
>     setup >> x >> y >> z >> size;
>     cout << Rn << " " << Mn << " "
>          << x  << " " << y  << " " 
> 	 << z  << " " << size << endl;    
> 
>     Nn = 60*Rn + Mn;
>     Modules[Nn] = EMModule(x,y,z,size);
>   }
>   setup.close();
> }

Introducing a variable 'EMModule* temp' and doing

[...]
     Nn = 60*Rn + Mn;
     temp = new EMModule(x,y,z,size);
     Modules[Nn] = *temp;
     delete temp;
[...]

again works without any error.

Volker

-- 
Volker Hejny                    Tel: 02461/616853                      ** 
Institut f. Kernphysik          Fax: 02461/613930                     **
---------------------------------------------------------------- **  ** ---  
Forschungszentrum Juelich GmbH, D-52425 Juelich                    **



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