BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
RandomCenterMessenger.cpp
Go to the documentation of this file.
1#include "G4Svc/RandomCenterMessenger.h"
2#include "G4Svc/Goofy.h"
3
4#include "G4UIcommand.hh"
5#include "G4UImanager.hh"
6
7#include <string>
8#include <fstream.h>
9
11
12
14{
15 rm=v;
16
17 setSeed=new G4UIcommand("/Random/SetSeed",this);
18 setSeed->SetGuidance("Sets the seed to the current generator");
19 G4UIparameter* parameter;
20 G4bool omitable;
21 parameter = new G4UIparameter ("Random", 'i', omitable = false);
22 setSeed->SetParameter(parameter);
23
24 saveStatus=new G4UIcommand("/Random/SaveStatus",this);
25 saveStatus->SetGuidance("Saves the status of the current generator");
26 G4UIparameter* filename;
27 filename=new G4UIparameter ("Random", 's', omitable = false);
28 saveStatus->SetParameter(filename);
29
30 readStatus=new G4UIcommand("/Random/RetrieveStatus",this);
31 readStatus->SetGuidance("Retrieves the status for the current generator");
32 filename=new G4UIparameter ("Random", 's', omitable = false);
33 readStatus->SetParameter(filename);
34
35 setEngine=new G4UIcommand("/Random/SetEngine",this);
36 setEngine->SetGuidance("Allows to choose a new Random Number Engine");
37
38 resetEngine=new G4UIcommand("/Random/ResetEngine",this);
39 resetEngine->SetGuidance("Resets the engine to its default");
40
41}
42
44{
45 delete setSeed;
46 delete saveStatus;
47 delete readStatus;
48 delete setEngine;
49 delete resetEngine;
50}
51
52void RandomCenterMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
53{
54 if (command==setSeed)
55 {
56 long int i;
57 const char* s = newValues;
58 std::istrstream is ((char*)s);
59 is>>i;
61 rc.SetEngineSeed(i);
62 }
63 else if (command==saveStatus)
64 {
66 rc.SaveEngineStatus(newValues);
67 }
68 else if (command==readStatus)
69 {
71 rc.RestoreEngineStatus(newValues);
72 }
73 else if (command==setEngine)
74 {
76 rc.SetEngine();
77 }
78 else if (command==resetEngine)
79 {
80
81 }
82}
83
84G4String RandomCenterMessenger::GetCurrentValue(G4UIcommand * command)
85{
86 G4String s="Undefined";
87 return s;
88}
XmlRpcServer s
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
Definition Goofy.h:13
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValues)
void SaveEngineStatus(std::string)
void SetEngineSeed(long int)
void RestoreEngineStatus(std::string)
double precision pisqo6 parameter(pi=3.14159265358979d0, pisq=pi *pi, pisqo6=pisq/6d0) double precision zip