BOSS 8.0.0
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 <fstream.h>
8#include <string>
9
10#include "G4Svc/RandomNrCenter.h"
11
13 rm = v;
14
15 setSeed = new G4UIcommand( "/Random/SetSeed", this );
16 setSeed->SetGuidance( "Sets the seed to the current generator" );
17 G4UIparameter* parameter;
18 G4bool omitable;
19 parameter = new G4UIparameter( "Random", 'i', omitable = false );
20 setSeed->SetParameter( parameter );
21
22 saveStatus = new G4UIcommand( "/Random/SaveStatus", this );
23 saveStatus->SetGuidance( "Saves the status of the current generator" );
24 G4UIparameter* filename;
25 filename = new G4UIparameter( "Random", 's', omitable = false );
26 saveStatus->SetParameter( filename );
27
28 readStatus = new G4UIcommand( "/Random/RetrieveStatus", this );
29 readStatus->SetGuidance( "Retrieves the status for the current generator" );
30 filename = new G4UIparameter( "Random", 's', omitable = false );
31 readStatus->SetParameter( filename );
32
33 setEngine = new G4UIcommand( "/Random/SetEngine", this );
34 setEngine->SetGuidance( "Allows to choose a new Random Number Engine" );
35
36 resetEngine = new G4UIcommand( "/Random/ResetEngine", this );
37 resetEngine->SetGuidance( "Resets the engine to its default" );
38}
39
41 delete setSeed;
42 delete saveStatus;
43 delete readStatus;
44 delete setEngine;
45 delete resetEngine;
46}
47
48void RandomCenterMessenger::SetNewValue( G4UIcommand* command, G4String newValues ) {
49 if ( command == setSeed )
50 {
51 long int i;
52 const char* s = newValues;
53 std::istrstream is( (char*)s );
54 is >> i;
56 rc.SetEngineSeed( i );
57 }
58 else if ( command == saveStatus )
59 {
61 rc.SaveEngineStatus( newValues );
62 }
63 else if ( command == readStatus )
64 {
66 rc.RestoreEngineStatus( newValues );
67 }
68 else if ( command == setEngine )
69 {
71 rc.SetEngine();
72 }
73 else if ( command == resetEngine ) {}
74}
75
76G4String RandomCenterMessenger::GetCurrentValue( G4UIcommand* command ) {
77 G4String s = "Undefined";
78 return s;
79}
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)