[Gate-users] GATE: Can't set the directory command for macroPath SOS!
Kirchhof, Simon
s.kirchhof at dkfz-heidelberg.de
Fri Aug 18 15:45:05 CEST 2017
Dear Mr. Van Delinder,
Let's assume you are in the home directory of the current user, "~". Your Gate example will work with these three directories:
~/Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1/data
~/Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1/mac
~/Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1/output
If you do:
Idle> /control/macroPath /Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1/
you set the macro path for the Geant4 engine. Now typing:
Idle> /control/execute mac/<some_macor>.mac
will work find and execute the given macro. However, the "/gate/geometry/setMaterialDatabase" command doesn't behave like calling a macro (and shouldn't). Given a relative path, it will first look from the current working directory of your terminal session, which is "~". Maybe additionally in the root directory of the GATE build. Neither of those contain "data/GateMaterials.db".
The easiest solution is: start Gate from the root directory of the example. I. e.
~$ cd /Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1
~/Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1$ Gate
Idle> /control/execute mac/main.mac
This is, If you look at the usage of relative paths in the macro files, how these examples are meant to be executed.
Best regards,
Simon Kirchhof
________________________________
Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> im Auftrag von Kurt V <kurtv1 at hotmail.com>
Gesendet: Freitag, 18. August 2017 14:51
An: gate-users at lists.opengatecollaboration.org
Betreff: [Gate-users] GATE: Can't set the directory command for macroPath SOS!
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Problem running an example in vGate.
The Gate installation was saved in the standard vGate working directory using Virtual Box (Ubuntu-64 bit)
/Progs/Gate
The example I want to run is saved in the example1 folder located here.
/Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1
Suppose I open a command terminal.
I want to run example 1 located within the example_Radiotherapy/example1 folder called main.mac
I type Gate main.mac and I receive an error because the directory path to the location is not set.
So, now i set the directory path by writing.
cd ./Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1
Now, I type
Gate main.mac
The example runs but, there is a problem within the main macro which states that it cannot find GateMaterials.db or verbose.mac so, I must set the macroPath within the main.mac for the location of these files.
So, in-front of the verbose.mac, I now set the macroPath as listed below.
/control/macroPath /Progs/Gate/ /control/execute mac/verbose.mac
Now, the problem is solved for the verbose.mac and GateMaterials.db but, the other commands in my main.mac file now have directory problems of there own.
This is my main problem. a directory problem for running an example.
I can try using Gate first to run the example and type Gate then run the main.mac macro file.
Gate
Gate runs properly and I now type.
Idle> /control/execute main.mac
I receive an error that says set directory path to main.mac by /control/macroPath .
So, I try to set the macroPath in Gate.
Idle>/control/macroPath /Progs/Gate/gate_v7.2/examples/example_Radiotherapy/example1
/control/execute main.mac
*One space between each command listed above*
I get no response from Gate
Does anyone know how to get past this directory problem?
any suggestions would be greatly appreciated.
Thanks, Kurt Van Delinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20170818/9de846e6/attachment-0001.html>
More information about the Gate-users
mailing list