[gate-users] Variable Substitution
GATE Simulation
peter.bloomfield at camhpet.ca
Wed Aug 10 21:50:41 CEST 2005
Sorry this is a long winded email, and is really for reference.
I have the following setup
OS - Fedora Core 4
gcc - gcc (GCC) 4.0.1
GATE : V2.2.0
Geant4 : Geant4_7.0_p01
CLHEP : 1.8.1
Root : V4.04/02f
Everything compiled and I checked the installation using the PET benchmark and all seemed good.
The problem I came across is the passing of alias names and values using the -a argument on the Gate command line.
Issuing the following
Gate -a DATA_FILE junk
produced the following output
*************************************************************
Geant4 version $Name: geant4-07-00-patch-01 $ (23-February-2005)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Time set to (s) 0
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
DAWNFILE (DAWNFILE)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
OpenGLImmediateX (OGLIX)
OpenGLStoredX (OGLSX)
/control/alias junk "junk"
. . .
the /control/alias line is incorrect, it should read
/control/alias DATA_FILE "junk"
I corrected this in the Gate source code by changing the line
G4String newCommand = G4String("/control/alias ") + argv[++nextArg] + " \"" + argv[++nextArg] + "\"";
to
G4String AliasName = argv[++nextArg] ;
G4String AliasValue = argv[++nextArg] ;
G4String newCommand = G4String("/control/alias ") + AliasName + " \"" + AliasValue + "\"";
I do not know what the difference is between the two pieces of code but a compilation warning
Gate.cc:184: warning: operation on ‘nextArg’ may be undefined
no longer appeared on compilation with the code change, and so I assume that it is a compiler 'problem'.
Can anyone else throw some light on this,
Cheers
Peter
More information about the Gate-users
mailing list