Public Member Functions | Private Attributes | List of all members
CaptWorldMessenger Class Reference
Inheritance diagram for CaptWorldMessenger:
EDepSim::BuilderMessenger

Public Member Functions

 CaptWorldMessenger (CaptWorldBuilder *c)
 
virtual ~CaptWorldMessenger ()
 
void SetNewValue (G4UIcommand *cmd, G4String val)
 
- Public Member Functions inherited from EDepSim::BuilderMessenger
 BuilderMessenger (EDepSim::Builder *c, const char *guide=NULL)
 
virtual ~BuilderMessenger ()
 
G4String GetDirectory (void)
 Return the name of the directory. More...
 
G4String CommandName (G4String cmd)
 Build a command name with the directory prefix. More...
 
void SetNewValue (G4UIcommand *cmd, G4String val)
 

Private Attributes

CaptWorldBuilderfBuilder
 
G4UIcmdWithADoubleAndUnit * fLengthCMD
 
G4UIcmdWithADoubleAndUnit * fWidthCMD
 
G4UIcmdWithADoubleAndUnit * fHeightCMD
 

Detailed Description

Definition at line 22 of file CaptWorldBuilder.cc.

Constructor & Destructor Documentation

CaptWorldMessenger::CaptWorldMessenger ( CaptWorldBuilder c)
inline

Definition at line 31 of file CaptWorldBuilder.cc.

32  : EDepSim::BuilderMessenger(c,"Control the world geometry."),
33  fBuilder(c) {
35  = new G4UIcmdWithADoubleAndUnit(CommandName("length"),this);
36  fLengthCMD->SetGuidance("Set the length of the world.");
37  fLengthCMD->SetParameterName("Length",false);
38  fLengthCMD->SetUnitCategory("Length");
39 
40  fWidthCMD = new G4UIcmdWithADoubleAndUnit(CommandName("width"),this);
41  fWidthCMD->SetGuidance("Set the width of the world.");
42  fWidthCMD->SetParameterName("Width",false);
43  fWidthCMD->SetUnitCategory("Length");
44 
45  fHeightCMD = new G4UIcmdWithADoubleAndUnit(CommandName("height"),this);
46  fHeightCMD->SetGuidance("Set the height of the world.");
47  fHeightCMD->SetParameterName("Height",false);
48  fHeightCMD->SetUnitCategory("Length");
49  };
G4UIcmdWithADoubleAndUnit * fHeightCMD
G4UIcmdWithADoubleAndUnit * fLengthCMD
G4UIcmdWithADoubleAndUnit * fWidthCMD
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
CaptWorldBuilder * fBuilder
virtual CaptWorldMessenger::~CaptWorldMessenger ( )
inlinevirtual

Definition at line 51 of file CaptWorldBuilder.cc.

51  {
52  delete fLengthCMD;
53  delete fWidthCMD;
54  delete fHeightCMD;
55  };
G4UIcmdWithADoubleAndUnit * fHeightCMD
G4UIcmdWithADoubleAndUnit * fLengthCMD
G4UIcmdWithADoubleAndUnit * fWidthCMD

Member Function Documentation

void CaptWorldMessenger::SetNewValue ( G4UIcommand *  cmd,
G4String  val 
)
inline

Definition at line 57 of file CaptWorldBuilder.cc.

57  {
58  if (cmd==fLengthCMD) {
59  fBuilder->SetLength(fLengthCMD->GetNewDoubleValue(val));
60  }
61  else if (cmd==fWidthCMD) {
62  fBuilder->SetWidth(fWidthCMD->GetNewDoubleValue(val));
63  }
64  else if (cmd==fHeightCMD) {
65  fBuilder->SetHeight(fHeightCMD->GetNewDoubleValue(val));
66  }
67  else {
69  }
70  };
void SetNewValue(G4UIcommand *cmd, G4String val)
G4UIcmdWithADoubleAndUnit * fHeightCMD
void SetHeight(double v)
Set the height of the world.
void SetWidth(double v)
Set the width of the world.
G4UIcmdWithADoubleAndUnit * fLengthCMD
void SetLength(double v)
Set the length of the world.
G4UIcmdWithADoubleAndUnit * fWidthCMD
list cmd
Definition: getreco.py:22
CaptWorldBuilder * fBuilder

Member Data Documentation

CaptWorldBuilder* CaptWorldMessenger::fBuilder
private

Definition at line 25 of file CaptWorldBuilder.cc.

G4UIcmdWithADoubleAndUnit* CaptWorldMessenger::fHeightCMD
private

Definition at line 28 of file CaptWorldBuilder.cc.

G4UIcmdWithADoubleAndUnit* CaptWorldMessenger::fLengthCMD
private

Definition at line 26 of file CaptWorldBuilder.cc.

G4UIcmdWithADoubleAndUnit* CaptWorldMessenger::fWidthCMD
private

Definition at line 27 of file CaptWorldBuilder.cc.


The documentation for this class was generated from the following file: