[Gate-users] Gate-users Digest, Vol 62, Issue 19
Rajaram, Ramya (H USA)
ramya.rajaram at siemens.com
Mon Jul 18 23:32:48 CEST 2011
Hi Arda,
Inside Root's TBrowser, right-click on say, the Singles tree and
"StartViewer". This opens a TreeViewer with all the leaves. Make sure
the "Scan" box (top right) in the TreeViewer is checked, then
right-click on say, comptVolName and then "Scan". A file called
Singles-scan.dat is created in the working directory that now contains
the data. (As of now, I don't know how to set the file name inside Root
other than just going back to the working directory and renaming a file
before creating another output file). If the "Scan" box in the
TreeViewer is not checked, then there is a continuous verbose output of
the data on the screen.
The other option is to have the ascii output enabled in your macro. This
way, you get all the data you need in the Singles and Hits files.
Hope that helps,
Ramya
-----Original Message-----
From: gate-users-bounces at lists.opengatecollaboration.org
[mailto:gate-users-bounces at lists.opengatecollaboration.org] On Behalf Of
gate-users-request at lists.opengatecollaboration.org
Sent: Monday, July 18, 2011 4:46 PM
To: gate-users at lists.opengatecollaboration.org
Subject: Gate-users Digest, Vol 62, Issue 19
Send Gate-users mailing list submissions to
gate-users at lists.opengatecollaboration.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
or, via email, send a message with subject or body 'help' to
gate-users-request at lists.opengatecollaboration.org
You can reach the person managing the list at
gate-users-owner at lists.opengatecollaboration.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gate-users digest..."
Today's Topics:
1. Using Multicore Computers to Run GATE Simulations
Simultaneously (Geron Bindseil)
2. Reading root histogram values (Konik, Arda)
----------------------------------------------------------------------
Message: 1
Date: Mon, 18 Jul 2011 12:34:55 -0400
From: Geron Bindseil <geron9 at gmail.com>
To: gate-users <gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] Using Multicore Computers to Run GATE
Simulations Simultaneously
Message-ID:
<CA+Y8gNL35F9tDmvaW53+DniHOmAJuhVhRYRbwW4chrA7yeK=ZQ at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Dear Gate Users:
A couple days ago I mentioned I had written a script for running
multiple
Gate simulations simultaneously on multicore computers. Many people have
written asking for this script, so I decided to send it over the list in
case anyone else could benefit from it.
I have attached an example Perl script and README file that explains how
to
run multiple GATE simulations simultaneously on one computer with more
than
one logical CPU. This method runs a set of Gate simulations with
different
parameters and if the number of simulations to be run are greater than
the
number of logical CPUs, the script will wait until a CPU is available
before
starting the next Gate simulation.
N.B. In my response to a question on July 16, I accidentally gave the
incorrect syntax for the terminal command ("<" should have been ">").
The
correct syntax for storing the output in a file (rather than printing it
in
the terminal is): "Gate -a ParameterName ParameterValue my_macro.mac >
terminal_output.out". If you just want to run a bunch of macros
simultaneously in the background manually, you can do so by inserting an
ampersand "&" at the end of each command.
Kind Regards,
Geron
---
Geron Bindseil
PhD Candidate, Physics
University of Western Ontario
London, Ontario, Canada
-------------- next part --------------
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx72
00\tx7920\tx8640\ql\qnatural\pardirnatural
\f0\fs24 \cf0 Using Multicore Computers to Run GATE Simulations
Simultaneously\
Geron Bindseil\
gbindsei at uwo.ca\
July 18 2011\
\
Summary: This is a small tutorial that explains how to run multiple GATE
simulations simultaneously on one computer with more than one logical
CPU. This method runs a set of Gate simulations and if the number of
simulations to be run are greater than the number of logical CPUs, the
script will wait until a CPU is available before starting the next Gate
simulation.\
\
Requirements: This method requires GATE to be installed and the
env_gate.sh or env_gate.csh shell script to have been sourced. Perl and
several perl modules are required.\
\
[[Configuring Perl to Install Modules]]\
\
Make sure you have perl installed on your computer. After that, install
the cpanm module installer which is a tool that automatically configures
and installs perl modules. Install cpanm by typing the following on the
terminal (use 'sudo' if your local account doesn't have write privileges
to system directories):\
\
sudo cpan App::cpanminus\
\
After that, any modules can be installed by typing the following:\
\
sudo cpanm Module::Name\
\
The instructions for doing this and installing CPAN modules can be found
here:\
http://www.cpan.org/modules/INSTALL.html\
\
[[Installing Required Perl Modules]]\
\
The script requires a couple modules to be installed. Install them by
typing the following into a terminal window:\
\
sudo cpanm Forks::Super (required: for managing the queue of GATE jobs)\
sudo cpanm File::Path (optional: to make creating directories easier)\
\
[[Running GATE script.]]\
\
Make a Gate macro and put the gate_batch.pl perl script into the same
directory. Modify gate_batch.pl to set the number of logical CPUs your
computer has (double the number of physical cores if your computer has
hyper-threading). You may also wish to modify the default path for
storage of the output root data files.\
\
To run the code, in a terminal window with the env_gate shell script
already sourced, execute the following command:\
\
perl gate_batch.pl\
\
The words "End of perl batch script." will be printed when all the
macros have completed.\
\
[[Notes]]\
\
- Originally, my script included a step to automatically determine the
number of CPUs but it did not treat hyper-threaded CPUs properly.\
- Originally, my script called a print statement when any particular
macro had finished running, but this was not working as indented.}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gate_batch.pl
Type: application/octet-stream
Size: 1913 bytes
Desc: not available
URL:
<http://lists.opengatecollaboration.org/mailman/private/gate-users/attac
hments/20110718/24c88491/attachment-0001.obj>
------------------------------
Message: 2
Date: Mon, 18 Jul 2011 16:58:17 -0400
From: "Konik, Arda" <Arda.Konik at umassmed.edu>
To: "gate-users at lists.opengatecollaboration.org"
<gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] Reading root histogram values
Message-ID: <103DE9ED-E33B-451B-AFB0-FEA037543DEE at umassmed.edu>
Content-Type: text/plain; charset="windows-1252"
Hi All,
How can I read the root histogram values ?
Currently, I just enable the " Event Statusbar " as in the attached
screenshot and bring the cursor on the horizontal line to read its y -
value at the bottom.
In this example, the cursor (invisible on this picture) is positioned
somewhere on the highlighted tab and the y-value correctly shows y = 56.
However, this is not practical when there are multiple quantities I need
to check as in the case of ComptVolname (i.e., compton scatter values of
different SD in the system), especially
when horizontal lines are very close to y = 0.
How can I read these values without using this graphical method ? I
tried to use some root commands but couldn't get what I needed?
I ll appreciate if you could give a command line example to get the
scatter values of , say 2 materials ( Vol1 and Vol2) in ComptVolname.
Thanks,
Arda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: root_histogram.png
Type: image/png
Size: 43908 bytes
Desc: root_histogram.png
URL:
<http://lists.opengatecollaboration.org/mailman/private/gate-users/attac
hments/20110718/3d8ab35a/attachment.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL:
<http://lists.opengatecollaboration.org/mailman/private/gate-users/attac
hments/20110718/3d8ab35a/attachment.txt>
------------------------------
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
End of Gate-users Digest, Vol 62, Issue 19
******************************************
More information about the Gate-users
mailing list