Page MenuHomeHEPForge

refSettings.html
No OneTemporary

refSettings.html

<!--
//==============================================================================
// refSettings.html
//
// Copyright (C) 2010-2013 Tobias Toll and Thomas Ullrich
//
// This file is part of Sartre version: 1.1
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation.
// This program is distributed in the hope that it will be useful,
// but without any warranty; without even the implied warranty of
// merchantability or fitness for a particular purpose. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// Author: Thomas Ullrich
// Last update:
// $Date: 2013-05-29 21:25:21 +0100 (Wed, 29 May 2013) $
// $Author: thomas.ullrich@bnl.gov $
//==============================================================================
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<title>Sartre - Settings Class Reference</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" /> <link href="sartre.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="120" align="left" valign="top"><img src="images/sartreLogo.png" alt="" border="0" align="right" /></td>
<td width="10">&nbsp;&nbsp;</td>
<td align="left" valign="middle" class="postheader"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot;
<a href="overview.html"><font color="#004faf">Overview</font></a>&nbsp;&middot;
<a href="usersGuide.html"><font color="#004faf">Users Guide</font></a>&nbsp;&middot;
<a href="referenceGuide.html"><font color="#004faf">Reference Guide</font> </a></td></tr>
</table>
<h1 class="title">Settings Class Reference</h1>
<p><code> Settings </code>is the virtual base class for the <a href="refEventGeneratorSettings.html">EventGeneratorSettings</a> and
TableGeneratorSettings classes. <a href="#details">More...</a></p>
<pre><span class="preprocessor"> #include</span> "Settings.h"</pre>
<h2>Inheritance</h2>
Inherited by <a href="refEventGeneratorSettings.html">EventGeneratorSettings</a>, TableGeneratorSettings.
<hr>
<h2>Public Member Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="memItemLeft" align="right" valign="top"> </td>
<td class="memItemRight" valign="top"><a href="#Settings">Settings</a>() </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> virtual </td>
<td class="memItemRight" valign="top"><a href="#~Settings">~Settings</a>() </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> bool </td>
<td class="memItemRight" valign="top"><a href="#readSettingsFromFile">readSettingsFromFile</a>(const char*) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> virtual bool </td>
<td class="memItemRight" valign="top"><a href="#list">list</a>(ostream&amp; = cout) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> TParticlePDG* </td>
<td class="memItemRight" valign="top"><a href="#lookupPDG">lookupPDG</a>(int) const </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> string </td>
<td class="memItemRight" valign="top"><a href="#particleName">particleName</a>(int pdgID) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> static TRandom3* </td>
<td class="memItemRight" valign="top"><a href="#randomGenerator">randomGenerator</a>() </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> unsigned int </td>
<td class="memItemRight" valign="top"><a href="#seed">seed</a>() const </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> void </td>
<td class="memItemRight" valign="top"><a href="#setSeed">setSeed</a>(unsigned int) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> int </td>
<td class="memItemRight" valign="top"><a href="#userInt">userInt</a>() const</td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> double </td>
<td class="memItemRight" valign="top"><a href="#userDouble">userDouble</a>() const</td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> string </td>
<td class="memItemRight" valign="top"><a href="#userString">userString</a>() const</td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> void </td>
<td class="memItemRight" valign="top"><a href="#setUserInt">setUserInt</a>(int) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> void </td>
<td class="memItemRight" valign="top"><a href="#setUserDouble">setUserDouble</a>(double) </td></tr>
<tr>
<td class="memItemLeft" align="right" valign="top"> void </td>
<td class="memItemRight" valign="top"><a href="#setUserString">setUserString</a>(const string&amp;) </td></tr>
</tbody></table>
<hr>
<h2><a name="details" id="details"></a>Detailed Description</h2>
<p>The Settings class is the virtual base class for the <a href="refEventGeneratorSettings.html">EventGeneratorSettings</a> and
TableGeneratorSettings classes. It is not directly used in Sar<em>t</em>re
but defines
the basic features of the &quot;Settings&quot; mechanism in Sar<em>t</em>re.
<hr>
<h2>Public Member Function Documentation</h2>
<h3 class="fn"><span class="memItemRight"><a name="Settings" id="Settings"></a> Settings() </span></h3>
<p>Constructor.</p>
<h3 class="fn"><span class="memItemRight"><a name="~Settings" id="~Settings"></a> virtual ~Settings() </span></h3>
<p>Destructor.</p>
<h3 class="fn"><span class="memItemRight"><a name="readSettingsFromFile" id="readSettingsFromFile"></a> bool
readSettingsFromFile(const char* <var>file</var>) </span></h3>
<p>Reads and sets all parameters from <var>file</var> (runcard). For file format
and syntax see the <a href="runcardRef.html">runcard reference</a> page.
Returns <code>false</code> if <var>file</var> does not exist or could not be read, otherwise
return <code>true</code>.</p>
<h3 class="fn"><span class="memItemRight"><a name="list" id="list"></a> virtual
bool list(ostream&amp; os = cout) </span></h3>
<p>Prints all parameter with their current value. Useful to call after <a href="refSartre.html#init">Sartre::init()</a> to verify that all parameters are set and to keep log.</p>
<h3 class="fn"><span class="memItemRight"><a name="lookupPDG" id="lookupPDG"></a> TParticlePDG*
lookupPDG(int <var>pdgID</var>) const </span></h3>
<p>Return pointer to <span class="memItemRight">TParticlePDG</span>, a ROOT class
that provides PDG information (e.g. mass, spin, etc.) on particle <var>pdgId</var>.</p>
<h3 class="fn"><span class="memItemRight"><a name="particleName" id="particleName"></a> string
particleName(int pdgId) </span></h3>
<p>Returns name of the particle for given PDG identifier <var>pdgId</var>.</p>
<h3 class="fn"><span class="memItemRight"><a name="randomGenerator" id="randomGenerator"></a> static TRandom3* randomGenerator() </span></h3>
<p>Static method. Returns pointer to the main random generator used in Sar<em>t</em>re.
Note that there is only one instance of <span class="memItemRight">TRandom3 in </span>Sar<em>t</em>re.</p>
<h3 class="fn"><span class="memItemRight"><a name="seed" id="seed"></a> unsigned int seed() const </span></h3>
<p>Returns the set seed for Sar<em>t</em>re's random number generator. Note that
it is not the current seed at the time when the method is used but the original
seed defined, that is the one set in <a href="refSartre.html#init">Sartre::init()</a>. </p>
<h3 class="fn"><span class="memItemRight"><a name="setSeed" id="setSeed"></a> void
setSeed(unsigned int <var>value</var>) </span></h3>
<p>Sets the seed for Sar<em>t</em>re's random number generator to <em>value</em>.
Be aware that when called after <a href="refSartre.html#init">Sartre::init()</a> this
method will set the new seed, ignoring previously defined seeds. The
equivalent runcard entry is <a href="runcardRef.html#seed">seed</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="userInt" id="userInt"></a> int userInt() const</span></h3>
<p>Returns integer user variable. See also <a href="#setUserInt">setUserInt</a>().
Main advantage of adding variables to the &quot;Settings&quot; mechanism is to give
the user some parameters to use in his application that can be set via <a href="runcardRef.html">runcards</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="userDouble" id="userDouble"></a> double userDouble() const</span></h3>
<p>Returns floating point user variable. See also <a href="#setUserDouble">setUserDouble</a>().
Main advantage of adding variables to the &quot;Settings&quot; mechanism
is to give the user some parameters to use in his application that can be
set via <a href="runcardRef.html">runcards</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="userString" id="userString"></a> string userString() const</span></h3>
<p>Returns string user variable. See also <a href="#setUserString">setUserString</a>().
Main advantage of adding variables to the &quot;Settings&quot; mechanism
is to give the user some parameters to use in his application that can be
set via <a href="runcardRef.html">runcards</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="setUserInt" id="setUserInt"></a> void
setUserInt(int <var>val</var>) </span></h3>
<p>Sets user integer parameter to <var>val</var>. See also <a href="#userInt">userInt</a>().
The equivalent runcard entry is <a href="runcardRef.html#userInt">userInt</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="setUserDouble" id="setUserDouble"></a> void
setUserDouble(double <var>val</var>) </span></h3>
<p>Sets user floating point parameter to <var>val</var>. See also <a href="#userDouble">userDouble</a>().
The equivalent runcard entry is <a href="runcardRef.html#userDouble">userDouble</a>.</p>
<h3 class="fn"><span class="memItemRight"><a name="setUserString" id="setUserString"></a> void
setUserString(const string&amp;<var>val</var>) </span></h3>
<p>Sets user string parameter to <var>val</var>. See also <a href="#userString">userString</a>().
The equivalent runcard entry is <a href="runcardRef.html#userString">userString</a>.</p>
<p>&nbsp;</p>
<address><div align="center">
<table border="0" cellspacing="0" width="100%"><tbody><tr class="address">
<td align="left" width="40%">&nbsp;</td>
<td align="center" width="20%">&nbsp;</td>
<td align="right" width="40%"><div align="right"><br>Last Update:
<!-- #BeginDate format:Am1 -->January 8, 2013<!-- #EndDate -->
</div></td>
</tr></tbody></table></div></address>
</body></html>

File Metadata

Mime Type
text/html
Expires
Sat, Dec 21, 6:06 PM (7 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3985682
Default Alt Text
refSettings.html (12 KB)

Event Timeline