Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
RadioBio::DoseMessenger Class Reference

#include <Doxymodules_medical.h>

Inheritance diagram for RadioBio::DoseMessenger:
G4UImessenger

Public Member Functions

 DoseMessenger (Dose *)
 
 ~DoseMessenger () override
 
void SetNewValue (G4UIcommand *, G4String) override
 

Private Attributes

DosefDose = nullptr
 
G4UIdirectoryfDoseDir = nullptr
 
G4UIcmdWithABoolfCalculationCmd = nullptr
 
G4UIcmdWithAnIntegerfVerbosityCmd = nullptr
 
G4UIcmdWithoutParameterfResetCmd = nullptr
 
G4UIcmdWithAStringfDosePathCmd = nullptr
 
G4UIcmdWithoutParameterfPrintCmd = nullptr
 

Detailed Description

Definition at line 131 of file Doxymodules_medical.h.

Constructor & Destructor Documentation

◆ DoseMessenger()

RadioBio::DoseMessenger::DoseMessenger ( Dose dose)

Definition at line 45 of file DoseMessenger.cc.

45 : G4UImessenger(), fDose(dose)
46{
47 // Diretory for dose commands
48 fDoseDir = new G4UIdirectory("/dose/");
49 fDoseDir->SetGuidance("commands to setup dose calculation");
50
51 // Activate dose calculation
52 fCalculationCmd = new G4UIcmdWithABool("/dose/calculate", this);
53 fCalculationCmd->SetGuidance("Whether to enable dose calculation");
54 fCalculationCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
55 fCalculationCmd->SetToBeBroadcasted(false);
56
57 // Set dose verbosity
58 fVerbosityCmd = new G4UIcmdWithAnInteger("/dose/verbose", this);
59 fVerbosityCmd->SetGuidance("Set verbosity level of dose");
60 fVerbosityCmd->SetGuidance("0 = quiet");
61 fVerbosityCmd->SetGuidance("1 = important messages (~10 per run)");
62 fVerbosityCmd->SetGuidance("2 = debug");
63 fVerbosityCmd->SetToBeBroadcasted(false);
64
65 // Reset dose data
66 fResetCmd = new G4UIcmdWithoutParameter("/dose/reset", this);
67 fResetCmd->SetGuidance("Reset accumulated data");
68 fResetCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
69 fResetCmd->SetToBeBroadcasted(false);
70
71 // Set dose filename
72 fDosePathCmd = new G4UIcmdWithAString("/dose/fileName", this);
73 fDosePathCmd->SetGuidance("Set the filename for the dose file");
74 fDosePathCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
75 fDosePathCmd->SetToBeBroadcasted(false);
76
77 // Print Parameters
78 fPrintCmd = new G4UIcmdWithoutParameter("/dose/print", this);
79 fPrintCmd->SetGuidance("Print dose parameters");
80 fPrintCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
81 fPrintCmd->SetToBeBroadcasted(false);
82}
G4UIcmdWithAString * fDosePathCmd
G4UIcmdWithABool * fCalculationCmd
G4UIcmdWithoutParameter * fPrintCmd
G4UIdirectory * fDoseDir
G4UIcmdWithAnInteger * fVerbosityCmd
G4UIcmdWithoutParameter * fResetCmd

◆ ~DoseMessenger()

RadioBio::DoseMessenger::~DoseMessenger ( )
override

Definition at line 86 of file DoseMessenger.cc.

87{
88 delete fDoseDir;
89 delete fCalculationCmd;
90 delete fVerbosityCmd;
91 delete fResetCmd;
92 delete fDosePathCmd;
93 delete fPrintCmd;
94}

Member Function Documentation

◆ SetNewValue()

void RadioBio::DoseMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
override

Definition at line 98 of file DoseMessenger.cc.

99{
100 if (command == fCalculationCmd) {
101 fDose->SetCalculationEnabled(fCalculationCmd->GetNewBoolValue(newValue));
102 }
103
104 if (command == fVerbosityCmd) {
105 fDose->SetVerboseLevel(fVerbosityCmd->GetNewIntValue(newValue));
106 }
107
108 if (command == fResetCmd) {
109 fDose->Reset();
110 }
111
112 if (command == fDosePathCmd) {
113 fDose->SetPath(newValue);
114 }
115
116 if (command == fPrintCmd) {
118 }
119}
void Reset() override
Definition Dose.cc:165
void PrintParameters() override
Definition Dose.cc:177

Member Data Documentation

◆ fDose

Dose* RadioBio::DoseMessenger::fDose = nullptr
private

Definition at line 57 of file DoseMessenger.hh.

◆ fDoseDir

G4UIdirectory* RadioBio::DoseMessenger::fDoseDir = nullptr
private

Definition at line 59 of file DoseMessenger.hh.

◆ fCalculationCmd

G4UIcmdWithABool* RadioBio::DoseMessenger::fCalculationCmd = nullptr
private

Definition at line 60 of file DoseMessenger.hh.

◆ fVerbosityCmd

G4UIcmdWithAnInteger* RadioBio::DoseMessenger::fVerbosityCmd = nullptr
private

Definition at line 61 of file DoseMessenger.hh.

◆ fResetCmd

G4UIcmdWithoutParameter* RadioBio::DoseMessenger::fResetCmd = nullptr
private

Definition at line 62 of file DoseMessenger.hh.

◆ fDosePathCmd

G4UIcmdWithAString* RadioBio::DoseMessenger::fDosePathCmd = nullptr
private

Definition at line 63 of file DoseMessenger.hh.

◆ fPrintCmd

G4UIcmdWithoutParameter* RadioBio::DoseMessenger::fPrintCmd = nullptr
private

Definition at line 64 of file DoseMessenger.hh.


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

Applications | User Support | Publications | Collaboration