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 #4741 is a reply to message #4689] Tue, 24 July 2007 16:08 Go to previous messageGo to previous message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *gsi.de
Hi Jörn,

Quote:


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 should also work in a macro and in compiled code.



Unfortunately, in the macro it doesn't work neither. Actually
I tried it before with that syntax, the same result.
I couldn't figure out why this member function shouldn't be
accessible that way in a macro. Furthermore, the very same macro
once (some time ago) worked. So I already tried different
ROOT versions.

Cheers,
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: Mon Jan 18 09:04:11 CET 2021

Total time taken to generate the page: 0.02284 seconds