Geant4  10.02.p03
F04FieldMessenger Class Reference

#include <F04FieldMessenger.hh>

Inheritance diagram for F04FieldMessenger:
Collaboration diagram for F04FieldMessenger:

Public Member Functions

 F04FieldMessenger (F04GlobalField *, F04DetectorConstruction *)
 
virtual ~F04FieldMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- 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

F04GlobalFieldfGlobalField
 
G4UIdirectoryfDetDir
 
G4UIcmdWithADoubleAndUnitfCaptureB1Cmd
 
G4UIcmdWithADoubleAndUnitfCaptureB2Cmd
 
G4UIcmdWithADoubleAndUnitfTransferBCmd
 
G4UIcmdWithAnIntegerfStepperCMD
 
G4UIcmdWithADoubleAndUnitfMinStepCMD
 
G4UIcmdWithADoubleAndUnitfDeltaChordCMD
 
G4UIcmdWithADoubleAndUnitfDeltaOneStepCMD
 
G4UIcmdWithADoubleAndUnitfDeltaIntersectionCMD
 
G4UIcmdWithADoubleAndUnitfEpsMinCMD
 
G4UIcmdWithADoubleAndUnitfEpsMaxCMD
 
F04DetectorConstructionfDetector
 

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

Definition at line 47 of file F04FieldMessenger.hh.

Constructor & Destructor Documentation

◆ F04FieldMessenger()

F04FieldMessenger::F04FieldMessenger ( F04GlobalField pEMfield,
F04DetectorConstruction detector 
)

Definition at line 45 of file F04FieldMessenger.cc.

47  : fGlobalField(pEMfield)
48 {
49  fDetector = detector;
50 
51  fDetDir = new G4UIdirectory("/field/");
52  fDetDir->SetGuidance(" Field tracking control ");
53 
54  fCaptureB1Cmd = new G4UIcmdWithADoubleAndUnit("/field/SetCaptureB1",this);
55  fCaptureB1Cmd->SetGuidance("Set B1 of the Capture Magnet");
56  fCaptureB1Cmd->SetParameterName("CSizeB1",false,false);
57  fCaptureB1Cmd->SetDefaultUnit("tesla");
58  fCaptureB1Cmd->SetRange("CSizeB1>0.");
60 
61  fCaptureB2Cmd = new G4UIcmdWithADoubleAndUnit("/field/SetCaptureB2",this);
62  fCaptureB2Cmd->SetGuidance("Set B2 of the Capture Magnet");
63  fCaptureB2Cmd->SetParameterName("CSizeB2",false,false);
64  fCaptureB2Cmd->SetDefaultUnit("tesla");
65  fCaptureB2Cmd->SetRange("CSizeB2>0.");
67 
68  fTransferBCmd = new G4UIcmdWithADoubleAndUnit("/field/SetTransferB",this);
69  fTransferBCmd->SetGuidance("Set B of the Transfer Magnet");
70  fTransferBCmd->SetParameterName("TSizeB",false,false);
71  fTransferBCmd->SetDefaultUnit("tesla");
72  fTransferBCmd->SetRange("TSizeB>0.");
74 
75  fStepperCMD = new G4UIcmdWithAnInteger("/field/setStepperType",this);
76  fStepperCMD->SetGuidance("Select stepper type for field");
77  fStepperCMD->SetParameterName("choice",true);
80 
81  fMinStepCMD = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
82  fMinStepCMD->SetGuidance("Define minimal step");
83  fMinStepCMD->SetParameterName("min step",false,false);
86 
87  fDeltaChordCMD = new G4UIcmdWithADoubleAndUnit("/field/setDeltaChord",this);
88  fDeltaChordCMD->SetGuidance("Define delta chord");
89  fDeltaChordCMD->SetParameterName("delta chord",false,false);
92 
94  new G4UIcmdWithADoubleAndUnit("/field/setDeltaOneStep",this);
95  fDeltaOneStepCMD->SetGuidance("Define delta one step");
96  fDeltaOneStepCMD->SetParameterName("delta one step",false,false);
99 
101  new G4UIcmdWithADoubleAndUnit("/field/setDeltaIntersection",this);
102  fDeltaIntersectionCMD->SetGuidance("Define delta intersection");
103  fDeltaIntersectionCMD->SetParameterName("delta intersection",false,false);
106 
107  fEpsMinCMD = new G4UIcmdWithADoubleAndUnit("/field/setEpsMin",this);
108  fEpsMinCMD->SetGuidance("Define eps min");
109  fEpsMinCMD->SetParameterName("eps min",false,false);
110  fEpsMinCMD->SetDefaultUnit("mm");
112 
113  fEpsMaxCMD = new G4UIcmdWithADoubleAndUnit("/field/setEpsMax",this);
114  fEpsMaxCMD->SetGuidance("Define eps max");
115  fEpsMaxCMD->SetParameterName("eps max",false,false);
116  fEpsMaxCMD->SetDefaultUnit("mm");
118 }
G4UIcmdWithADoubleAndUnit * fCaptureB1Cmd
G4UIcmdWithADoubleAndUnit * fDeltaOneStepCMD
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fDeltaChordCMD
G4UIcmdWithADoubleAndUnit * fDeltaIntersectionCMD
F04DetectorConstruction * fDetector
G4UIcmdWithADoubleAndUnit * fCaptureB2Cmd
F04GlobalField * fGlobalField
G4UIdirectory * fDetDir
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * fEpsMaxCMD
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithADoubleAndUnit * fTransferBCmd
G4UIcmdWithADoubleAndUnit * fEpsMinCMD
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4int defVal)
G4UIcmdWithADoubleAndUnit * fMinStepCMD
G4UIcmdWithAnInteger * fStepperCMD
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~F04FieldMessenger()

F04FieldMessenger::~F04FieldMessenger ( )
virtual

Definition at line 122 of file F04FieldMessenger.cc.

123 {
124  delete fDetDir;
125 
126  delete fCaptureB1Cmd;
127  delete fCaptureB2Cmd;
128  delete fTransferBCmd;
129 
130  delete fStepperCMD;
131  delete fMinStepCMD;
132  delete fDeltaChordCMD;
133  delete fDeltaOneStepCMD;
134  delete fDeltaIntersectionCMD;
135  delete fEpsMinCMD;
136  delete fEpsMaxCMD;
137 }
G4UIcmdWithADoubleAndUnit * fCaptureB1Cmd
G4UIcmdWithADoubleAndUnit * fDeltaOneStepCMD
G4UIcmdWithADoubleAndUnit * fDeltaChordCMD
G4UIcmdWithADoubleAndUnit * fDeltaIntersectionCMD
G4UIcmdWithADoubleAndUnit * fCaptureB2Cmd
G4UIdirectory * fDetDir
G4UIcmdWithADoubleAndUnit * fEpsMaxCMD
G4UIcmdWithADoubleAndUnit * fTransferBCmd
G4UIcmdWithADoubleAndUnit * fEpsMinCMD
G4UIcmdWithADoubleAndUnit * fMinStepCMD
G4UIcmdWithAnInteger * fStepperCMD

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 141 of file F04FieldMessenger.cc.

142 {
143 
144  if( command == fCaptureB1Cmd )
146 
147  if( command == fCaptureB2Cmd )
149 
150  if( command == fTransferBCmd )
152 
153  if( command == fStepperCMD )
154  {
156  }
157  if( command == fMinStepCMD )
158  {
160  }
161  if( command == fDeltaChordCMD )
162  {
164  }
165  if( command == fDeltaOneStepCMD )
166  {
167  fGlobalField->
168  SetDeltaOneStep(fDeltaOneStepCMD->GetNewDoubleValue(newValue));
169  }
170  if( command == fDeltaIntersectionCMD )
171  {
172  fGlobalField->
173  SetDeltaIntersection(fDeltaIntersectionCMD->GetNewDoubleValue(newValue));
174  }
175  if( command == fEpsMinCMD )
176  {
178  }
179  if( command == fEpsMaxCMD )
180  {
182  }
183 }
G4UIcmdWithADoubleAndUnit * fCaptureB1Cmd
void SetEpsMax(G4double eps)
Set the maximum eps length.
G4UIcmdWithADoubleAndUnit * fDeltaOneStepCMD
G4UIcmdWithADoubleAndUnit * fDeltaChordCMD
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fDeltaIntersectionCMD
F04DetectorConstruction * fDetector
G4UIcmdWithADoubleAndUnit * fCaptureB2Cmd
void SetEpsMin(G4double eps)
Set the minimum eps length.
F04GlobalField * fGlobalField
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fEpsMaxCMD
void SetDeltaChord(G4double dcr)
Set the delta chord length.
G4UIcmdWithADoubleAndUnit * fTransferBCmd
G4UIcmdWithADoubleAndUnit * fEpsMinCMD
void SetMinStep(G4double stp)
Set the minimum step length.
G4UIcmdWithADoubleAndUnit * fMinStepCMD
G4UIcmdWithAnInteger * fStepperCMD
void SetStepperType(G4int i)
Set the Stepper types.
Here is the call graph for this function:

Member Data Documentation

◆ fCaptureB1Cmd

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fCaptureB1Cmd
private

Definition at line 61 of file F04FieldMessenger.hh.

◆ fCaptureB2Cmd

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fCaptureB2Cmd
private

Definition at line 62 of file F04FieldMessenger.hh.

◆ fDeltaChordCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fDeltaChordCMD
private

Definition at line 67 of file F04FieldMessenger.hh.

◆ fDeltaIntersectionCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fDeltaIntersectionCMD
private

Definition at line 69 of file F04FieldMessenger.hh.

◆ fDeltaOneStepCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fDeltaOneStepCMD
private

Definition at line 68 of file F04FieldMessenger.hh.

◆ fDetDir

G4UIdirectory* F04FieldMessenger::fDetDir
private

Definition at line 59 of file F04FieldMessenger.hh.

◆ fDetector

F04DetectorConstruction* F04FieldMessenger::fDetector
private

Definition at line 73 of file F04FieldMessenger.hh.

◆ fEpsMaxCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fEpsMaxCMD
private

Definition at line 71 of file F04FieldMessenger.hh.

◆ fEpsMinCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fEpsMinCMD
private

Definition at line 70 of file F04FieldMessenger.hh.

◆ fGlobalField

F04GlobalField* F04FieldMessenger::fGlobalField
private

Definition at line 57 of file F04FieldMessenger.hh.

◆ fMinStepCMD

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fMinStepCMD
private

Definition at line 66 of file F04FieldMessenger.hh.

◆ fStepperCMD

G4UIcmdWithAnInteger* F04FieldMessenger::fStepperCMD
private

Definition at line 65 of file F04FieldMessenger.hh.

◆ fTransferBCmd

G4UIcmdWithADoubleAndUnit* F04FieldMessenger::fTransferBCmd
private

Definition at line 63 of file F04FieldMessenger.hh.


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