Geant4  10.02.p03
ExG4DetectorConstruction02Messenger Class Reference

#include <ExG4DetectorConstruction02Messenger.hh>

Inheritance diagram for ExG4DetectorConstruction02Messenger:
Collaboration diagram for ExG4DetectorConstruction02Messenger:

Public Member Functions

 ExG4DetectorConstruction02Messenger (ExG4DetectorConstruction02 *)
 
virtual ~ExG4DetectorConstruction02Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4DetectorConstruction02Messenger (ExG4DetectorConstruction02 *)
 
virtual ~ExG4DetectorConstruction02Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
 ExG4DetectorConstruction02Messenger (ExG4DetectorConstruction02 *)
 
virtual ~ExG4DetectorConstruction02Messenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

ExG4DetectorConstruction02fDetectorConstruction
 
G4UIdirectoryfTopDirectory
 
G4UIdirectoryfDirectory
 
G4UIcmdWithAStringfSetBoxMaterialCmd
 
G4UIcmdWithAStringfSetWorldMaterialCmd
 
G4UIcmdWith3VectorAndUnitfSetBoxDimensionsCmd
 
G4UIcmdWithADoublefSetWorldSizeFactorCmd
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Messenger class that defines commands for ExG4DetectorConstruction02.

It implements commands:

  • /ExG4/det/setBoxMaterialName name
  • /ExG4/det/setWorldMaterialName name
  • /ExG4/det/setBoxDimensions hx hy hz unit
  • /ExG4/det/setWorldSizeFactor value

Definition at line 53 of file common/include/ExG4DetectorConstruction02Messenger.hh.

Constructor & Destructor Documentation

◆ ExG4DetectorConstruction02Messenger() [1/3]

ExG4DetectorConstruction02Messenger::ExG4DetectorConstruction02Messenger ( ExG4DetectorConstruction02 detectorConstruction)

Definition at line 41 of file common/src/ExG4DetectorConstruction02Messenger.cc.

43  : G4UImessenger(),
44  fDetectorConstruction(detectorConstruction),
45  fTopDirectory(0),
46  fDirectory(0),
51 
52 {
53  fTopDirectory = new G4UIdirectory("/ExG4/");
54  fTopDirectory->SetGuidance("UI commands of common example classes");
55 
56  fDirectory = new G4UIdirectory("/ExG4/det/");
57  fDirectory->SetGuidance("Detector control");
58 
60  = new G4UIcmdWithAString("/ExG4/det/setBoxMaterial",this);
61  fSetBoxMaterialCmd->SetGuidance("Select material of the box.");
62  fSetBoxMaterialCmd->SetParameterName("BoxMaterial", false);
64 
66  = new G4UIcmdWithAString("/ExG4/det/setWorldMaterial",this);
67  fSetWorldMaterialCmd->SetGuidance("Select material of the world.");
68  fSetWorldMaterialCmd->SetParameterName("WorldMaterial", false);
70 
72  = new G4UIcmdWith3VectorAndUnit("/ExG4/det/setBoxDimensions",this);
73  fSetBoxDimensionsCmd->SetGuidance("Set box dimensions (in half lentgh).");
75  "BoxDimensionsHx", "BoxDimensionsHy","BoxDimensionsHz",
76  false);
77  //fSetBoxDimensionsCmd->SetUnitCategory("Length");
79 
81  = new G4UIcmdWithADouble("/ExG4/det/setWorldSizeFactor",this);
83  "Set the multiplication factor from box dimensions to world dimensions.");
84  fSetWorldSizeFactorCmd->SetParameterName("WorldSizeFactor", false);
85  fSetWorldSizeFactorCmd->SetRange("WorldSizeFactor >= 1");
87 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~ExG4DetectorConstruction02Messenger() [1/3]

◆ ExG4DetectorConstruction02Messenger() [2/3]

ExG4DetectorConstruction02Messenger::ExG4DetectorConstruction02Messenger ( ExG4DetectorConstruction02 )

◆ ~ExG4DetectorConstruction02Messenger() [2/3]

virtual ExG4DetectorConstruction02Messenger::~ExG4DetectorConstruction02Messenger ( )
virtual

◆ ExG4DetectorConstruction02Messenger() [3/3]

ExG4DetectorConstruction02Messenger::ExG4DetectorConstruction02Messenger ( ExG4DetectorConstruction02 )

◆ ~ExG4DetectorConstruction02Messenger() [3/3]

virtual ExG4DetectorConstruction02Messenger::~ExG4DetectorConstruction02Messenger ( )
virtual

Member Function Documentation

◆ SetNewValue() [1/3]

void ExG4DetectorConstruction02Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 103 of file common/src/ExG4DetectorConstruction02Messenger.cc.

105 {
106  if( command == fSetBoxMaterialCmd ) {
108  }
109  else if( command == fSetWorldMaterialCmd ) {
111  }
112  else if( command == fSetBoxDimensionsCmd ) {
113  G4ThreeVector newDimensions
117  newDimensions.x(), newDimensions.y(), newDimensions.z());
118  }
119  else if ( command == fSetWorldSizeFactorCmd ) {
122  }
123 }
void SetWorldMaterial(const G4String &materialName)
void SetBoxDimensions(G4double hx, G4double hy, G4double hz)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetBoxMaterial(const G4String &materialName)
double x() const
double y() const
double z() const
Here is the call graph for this function:

◆ SetNewValue() [2/3]

virtual void ExG4DetectorConstruction02Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

◆ SetNewValue() [3/3]

virtual void ExG4DetectorConstruction02Messenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Member Data Documentation

◆ fDetectorConstruction

ExG4DetectorConstruction02 * ExG4DetectorConstruction02Messenger::fDetectorConstruction
private

◆ fDirectory

G4UIdirectory * ExG4DetectorConstruction02Messenger::fDirectory
private

◆ fSetBoxDimensionsCmd

G4UIcmdWith3VectorAndUnit * ExG4DetectorConstruction02Messenger::fSetBoxDimensionsCmd
private

◆ fSetBoxMaterialCmd

G4UIcmdWithAString * ExG4DetectorConstruction02Messenger::fSetBoxMaterialCmd
private

◆ fSetWorldMaterialCmd

G4UIcmdWithAString * ExG4DetectorConstruction02Messenger::fSetWorldMaterialCmd
private

◆ fSetWorldSizeFactorCmd

G4UIcmdWithADouble * ExG4DetectorConstruction02Messenger::fSetWorldSizeFactorCmd
private

◆ fTopDirectory

G4UIdirectory * ExG4DetectorConstruction02Messenger::fTopDirectory
private

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