GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Scientific Computing » ROOT » works interactively but not in a macro
Re: works interactively but not in a macro [message #4689 is a reply to message #4684] Wed, 18 July 2007 17:14 Go to previous messageGo to previous message
wuestenf is currently offline  wuestenf
Messages: 138
Registered: June 2005
first-grade participant
From: *gsi.de
Hello Olaf,

root [16] TParticlePDG* part;


Is giving you the problem. You define part as a pointer to a TParticlePDG, so you should also use it as a pointer later.

So the correct line to access the memberfunction is:

Int_t mynumber = part->PdgCode()


This shouldalso work in a macro and in compiled code.

Hope this helps.

Joern


Joern Wuestenfeld
Helmholtz - Zentrum Dresden - Rossendorf
01328 Dresden
 
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: Sat Oct 16 11:43:05 CEST 2021

Total time taken to generate the page: 0.02059 seconds