GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Scientific Computing » ROOT » works interactively but not in a macro
icon5.gif  works interactively but not in a macro [message #4684] Tue, 17 July 2007 16:03 Go to previous message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *e12.physik.tu-muenchen.de
Hi ROOTers,

I'm quarreling with the following problem:

The sequence
root [15] partlist = TDatabasePDG::Instance();
root [16] TParticlePDG* part;
root [17] part = partlist->GetParticle("neutron");
root [18] Int_t mynumber = part.PdgCode()
root [19] mynumber
(Int_t)2112

works interactively. But inside a macro, I get the following
error message:

Error: illegal pointer to class object part 0x0 1034 FILE:conv_urqmd.C LINE:467
*** Interpreter error recovered ***

exactly at the point where the function part.PdgCode() is used.

Any idea?

Kindly,
Olaf.

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: RootTalk Forum - HACKED!
Next Topic: ROOT and GCC3.4
Goto Forum:
  


Current Time: Fri Oct 04 19:58:54 CEST 2024

Total time taken to generate the page: 0.00681 seconds