Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RandomCenterMessenger Class Reference

#include <RandomCenterMessenger.h>

List of all members.

Public Member Functions

G4String GetCurrentValue (G4UIcommand *command)
 RandomCenterMessenger (Goofy *v)
void SetNewValue (G4UIcommand *command, G4String newValues)
 ~RandomCenterMessenger ()

Private Attributes

G4UIcommand * readStatus
G4UIcommand * resetEngine
Goofyrm
G4UIcommand * saveStatus
G4UIcommand * setEngine
G4UIcommand * setSeed


Constructor & Destructor Documentation

RandomCenterMessenger::RandomCenterMessenger Goofy v  ) 
 

00014 {
00015         rm=v;
00016 
00017         setSeed=new G4UIcommand("/Random/SetSeed",this);
00018         setSeed->SetGuidance("Sets the seed to the current generator");
00019         G4UIparameter* parameter;
00020         G4bool omitable;
00021         parameter = new G4UIparameter ("Random", 'i', omitable = false);
00022         setSeed->SetParameter(parameter);
00023         
00024         saveStatus=new G4UIcommand("/Random/SaveStatus",this);
00025         saveStatus->SetGuidance("Saves the status of the current generator");
00026         G4UIparameter* filename;
00027         filename=new G4UIparameter ("Random", 's', omitable = false);
00028         saveStatus->SetParameter(filename);
00029         
00030         readStatus=new G4UIcommand("/Random/RetrieveStatus",this);
00031         readStatus->SetGuidance("Retrieves the status for the current generator");
00032         filename=new G4UIparameter ("Random", 's', omitable = false);
00033         readStatus->SetParameter(filename);
00034         
00035         setEngine=new G4UIcommand("/Random/SetEngine",this);
00036         setEngine->SetGuidance("Allows to choose a new Random Number Engine");
00037         
00038         resetEngine=new G4UIcommand("/Random/ResetEngine",this);
00039         resetEngine->SetGuidance("Resets the engine to its default");
00040         
00041 }

RandomCenterMessenger::~RandomCenterMessenger  ) 
 

00044 {
00045         delete setSeed;
00046         delete saveStatus;
00047         delete readStatus;
00048         delete setEngine;
00049         delete resetEngine;
00050 }


Member Function Documentation

G4String RandomCenterMessenger::GetCurrentValue G4UIcommand *  command  ) 
 

00085 {
00086         G4String s="Undefined";
00087         return s;
00088 }

void RandomCenterMessenger::SetNewValue G4UIcommand *  command,
G4String  newValues
 

00053 {
00054         if (command==setSeed)
00055         {
00056                 long int i;
00057                 const char* s = newValues;
00058                 std::istrstream is ((char*)s);
00059                 is>>i;
00060                 RandomNrCenter rc;
00061                 rc.SetEngineSeed(i);
00062         }
00063         else if (command==saveStatus)
00064         {
00065                 RandomNrCenter rc;
00066                 rc.SaveEngineStatus(newValues);
00067         }
00068         else if (command==readStatus)
00069         {
00070                 RandomNrCenter rc;
00071                 rc.RestoreEngineStatus(newValues);
00072         }
00073         else if (command==setEngine)
00074         {
00075                 RandomNrCenter rc;
00076                 rc.SetEngine();
00077         }
00078         else if (command==resetEngine)
00079         {
00080                 
00081         }
00082 }


Member Data Documentation

G4UIcommand* RandomCenterMessenger::readStatus [private]
 

G4UIcommand* RandomCenterMessenger::resetEngine [private]
 

Goofy* RandomCenterMessenger::rm [private]
 

G4UIcommand* RandomCenterMessenger::saveStatus [private]
 

G4UIcommand* RandomCenterMessenger::setEngine [private]
 

G4UIcommand* RandomCenterMessenger::setSeed [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:41:55 2011 for BOSS6.5.5 by  doxygen 1.3.9.1