Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B2a::DetectorMessenger Class Reference
basic » B2 » B2a

Messenger class that defines commands for DetectorConstruction. More...

#include <Doxymodules_basic.h>

Inheritance diagram for B2a::DetectorMessenger:
G4UImessenger

Public Member Functions

 DetectorMessenger (DetectorConstruction *)
 
 ~DetectorMessenger () override
 
void SetNewValue (G4UIcommand *, G4String) override
 

Private Attributes

DetectorConstructionfDetectorConstruction = nullptr
 
G4UIdirectoryfDirectory = nullptr
 
G4UIdirectoryfDetDirectory = nullptr
 
G4UIcmdWithAStringfTargMatCmd = nullptr
 
G4UIcmdWithAStringfChamMatCmd = nullptr
 
G4UIcmdWithADoubleAndUnitfStepMaxCmd = nullptr
 

Detailed Description

Messenger class that defines commands for DetectorConstruction.

It implements commands:

Definition at line 49 of file Doxymodules_basic.h.

Constructor & Destructor Documentation

◆ DetectorMessenger()

B2a::DetectorMessenger::DetectorMessenger ( DetectorConstruction det)

Definition at line 42 of file DetectorMessenger.cc.

44{
45 fDirectory = new G4UIdirectory("/B2/");
46 fDirectory->SetGuidance("UI commands specific to this example.");
47
48 fDetDirectory = new G4UIdirectory("/B2/det/");
49 fDetDirectory->SetGuidance("Detector construction control");
50
51 fTargMatCmd = new G4UIcmdWithAString("/B2/det/setTargetMaterial",this);
52 fTargMatCmd->SetGuidance("Select Material of the Target.");
53 fTargMatCmd->SetParameterName("choice",false);
54 fTargMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
55
56 fChamMatCmd = new G4UIcmdWithAString("/B2/det/setChamberMaterial",this);
57 fChamMatCmd->SetGuidance("Select Material of the Chamber.");
58 fChamMatCmd->SetParameterName("choice",false);
59 fChamMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
60
61 fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/B2/det/stepMax",this);
62 fStepMaxCmd->SetGuidance("Define a step max");
63 fStepMaxCmd->SetParameterName("stepMax",false);
64 fStepMaxCmd->SetUnitCategory("Length");
65 fStepMaxCmd->AvailableForStates(G4State_Idle);
66}
G4UIcmdWithAString * fTargMatCmd
G4UIdirectory * fDetDirectory
DetectorConstruction * fDetectorConstruction
G4UIcmdWithAString * fChamMatCmd
G4UIcmdWithADoubleAndUnit * fStepMaxCmd

◆ ~DetectorMessenger()

B2a::DetectorMessenger::~DetectorMessenger ( )
override

Definition at line 70 of file DetectorMessenger.cc.

71{
72 delete fTargMatCmd;
73 delete fChamMatCmd;
74 delete fStepMaxCmd;
75 delete fDirectory;
76 delete fDetDirectory;
77}

Member Function Documentation

◆ SetNewValue()

void B2a::DetectorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
override

Definition at line 81 of file DetectorMessenger.cc.

82{
83 if( command == fTargMatCmd )
85
86 if( command == fChamMatCmd )
88
89 if( command == fStepMaxCmd ) {
91 ->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));
92 }
93}

Member Data Documentation

◆ fDetectorConstruction

DetectorConstruction* B2a::DetectorMessenger::fDetectorConstruction = nullptr
private

Definition at line 61 of file DetectorMessenger.hh.

◆ fDirectory

G4UIdirectory* B2a::DetectorMessenger::fDirectory = nullptr
private

Definition at line 63 of file DetectorMessenger.hh.

◆ fDetDirectory

G4UIdirectory* B2a::DetectorMessenger::fDetDirectory = nullptr
private

Definition at line 64 of file DetectorMessenger.hh.

◆ fTargMatCmd

G4UIcmdWithAString* B2a::DetectorMessenger::fTargMatCmd = nullptr
private

Definition at line 66 of file DetectorMessenger.hh.

◆ fChamMatCmd

G4UIcmdWithAString* B2a::DetectorMessenger::fChamMatCmd = nullptr
private

Definition at line 67 of file DetectorMessenger.hh.

◆ fStepMaxCmd

G4UIcmdWithADoubleAndUnit* B2a::DetectorMessenger::fStepMaxCmd = nullptr
private

Definition at line 69 of file DetectorMessenger.hh.


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

Applications | User Support | Publications | Collaboration