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 #4760 is a reply to message #4684] Sun, 29 July 2007 10:36 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.239*
Hello Olaf,

I tried your macro and it runs.

partlist = TDatabasePDG::Instance();
TParticlePDG* part;
part = partlist->GetParticle("neutron");
Int_t mynumber = part->PdgCode();


I have root Version 5.14/00 and run on a SUSE 10.2.
Maybe you should try to catch if the pointer is not set properly. I've seen that you want to use this inside a macro for a particle generator. Maybe the TDatabasePDG is already loaded and modified by this.

Have a nice weekend,

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 Sep 23 12:44:33 CEST 2023

Total time taken to generate the page: 0.01010 seconds