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

#include <Doxymodules_field.h>

Inheritance diagram for G4BlineTracerMessenger:
G4UImessenger

Public Member Functions

 G4BlineTracerMessenger (G4BlineTracer *aBlineTool)
 
 ~G4BlineTracerMessenger () override
 
void SetNewValue (G4UIcommand *command, G4String newValues) override
 

Private Attributes

G4BlineTracerfTheBlineTool = nullptr
 
G4UIdirectoryfBlineToolDir = nullptr
 
G4UIcmdWithAnIntegerfBlineCmd = nullptr
 
G4UIcmdWithADoubleAndUnitfSetMaxTrackingStepCmd = nullptr
 
G4UIcmdWith3VectorfSetDrawColourCmd = nullptr
 
G4UIcmdWithABoolfSetDrawBlineCmd = nullptr
 
G4UIcmdWithABoolfSetDrawPointsCmd = nullptr
 
G4UIcmdWithADoublefSetPointSizeCmd = nullptr
 
G4UIcmdWithoutParameterfDrawCmd = nullptr
 
G4UIcmdWithoutParameterfResetCmd = nullptr
 

Detailed Description

Definition at line 23 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ G4BlineTracerMessenger()

G4BlineTracerMessenger::G4BlineTracerMessenger ( G4BlineTracer aBlineTool)

Definition at line 56 of file G4BlineTracerMessenger.cc.

57 : fTheBlineTool(aBlineTool)
58{
59 fBlineToolDir = new G4UIdirectory("/vis/blineTracer/");
60 fBlineToolDir->SetGuidance("Commands to trace and visualise magnetic field lines.");
61 fBlineToolDir->SetGuidance("These commands work only if a magnetic-field is set");
62 fBlineToolDir->SetGuidance("in the application.");
63
64 // commands
65
66 fBlineCmd = new G4UIcmdWithAnInteger("/vis/blineTracer/computeBline",this);
67 fBlineCmd->SetGuidance("Compute magnetic field lines for visualisation.");
68 fBlineCmd->SetParameterName("nb_of_lines",false);
69 fBlineCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
70
72 new G4UIcmdWithADoubleAndUnit("/vis/blineTracer/setMaxStepLength",this);
73 fSetMaxTrackingStepCmd->SetGuidance("Set the maximum length of tracking step");
74 fSetMaxTrackingStepCmd->SetGuidance("when integrating magnetic field line.");
75 fSetMaxTrackingStepCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
76
77 fSetDrawColourCmd = new G4UIcmdWith3Vector("/vis/blineTracer/setColour",this);
78 fSetDrawColourCmd->SetGuidance("Set the colour drawing trajectories");
79 fSetDrawColourCmd->SetGuidance("and magnetic field lines.");
80 fSetDrawColourCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81
82 fSetDrawBlineCmd = new G4UIcmdWithABool("/vis/blineTracer/stockLines",this);
83 fSetDrawBlineCmd->SetGuidance("If true field lines are stocked in lines");
84 fSetDrawBlineCmd->SetGuidance("to be drawn.");
85 fSetDrawBlineCmd->SetParameterName("StockLines",false);
86 fSetDrawBlineCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
87
88 fSetDrawPointsCmd = new G4UIcmdWithABool("/vis/blineTracer/stockPoints",this);
89 fSetDrawPointsCmd->SetGuidance("If true step field line points are stocked");
90 fSetDrawPointsCmd->SetGuidance("in vector of points to be drawn.");
91 fSetDrawPointsCmd->SetParameterName("StockPoints",false);
92 fSetDrawPointsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
93
94 fSetPointSizeCmd = new G4UIcmdWithADouble("/vis/blineTracer/setPointSize",this);
95 fSetPointSizeCmd->SetGuidance("Set the size of points for drawing.");
96 fSetPointSizeCmd->SetParameterName("StepSize",false);
97 fSetPointSizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
98
99 fDrawCmd = new G4UIcmdWithoutParameter("/vis/blineTracer/show",this);
100 fDrawCmd->SetGuidance("Show the stored magnetic field lines.");
101 fDrawCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
102
103 fResetCmd =
104 new G4UIcmdWithoutParameter("/vis/blineTracer/resetMaterialToBeDrawn",this);
105 fResetCmd->SetGuidance("Clear the vectors of lines and points to be drawn.");
106 fResetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
107}
G4UIcmdWith3Vector * fSetDrawColourCmd
G4UIcmdWithADouble * fSetPointSizeCmd
G4UIcmdWithADoubleAndUnit * fSetMaxTrackingStepCmd
G4UIcmdWithAnInteger * fBlineCmd
G4UIcmdWithoutParameter * fDrawCmd
G4UIcmdWithABool * fSetDrawBlineCmd
G4UIcmdWithoutParameter * fResetCmd
G4UIcmdWithABool * fSetDrawPointsCmd

◆ ~G4BlineTracerMessenger()

G4BlineTracerMessenger::~G4BlineTracerMessenger ( )
override

Definition at line 111 of file G4BlineTracerMessenger.cc.

112{
113 delete fResetCmd;
114 delete fDrawCmd;
115 delete fSetPointSizeCmd;
116 delete fSetDrawPointsCmd;
117 delete fSetDrawBlineCmd;
118 delete fSetDrawColourCmd;
120 delete fBlineCmd;
121 delete fBlineToolDir;
122}

Member Function Documentation

◆ SetNewValue()

void G4BlineTracerMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
override

Definition at line 126 of file G4BlineTracerMessenger.cc.

128{
129 if (command == fBlineCmd)
131 else if( command == fSetMaxTrackingStepCmd )
133 ->GetNewDoubleValue(newValues));
134 else if( command == fSetDrawBlineCmd )
136 ->GetNewBoolValue(newValues));
137 else if( command == fSetDrawColourCmd )
138 {
139 G4ThreeVector vec=fSetDrawColourCmd->GetNew3VectorValue(newValues);
141 SetDrawColour(G4Colour(vec.x(),vec.y(),vec.z()));
142 }
143 else if( command == fSetDrawPointsCmd )
145 ->GetNewBoolValue(newValues));
146 else if( command == fSetPointSizeCmd )
148 ->GetNewDoubleValue(newValues));
149 else if( command == fDrawCmd )
151 else if( command == fResetCmd )
153}
void SetDrawPoints(G4bool aBool)
void DrawFieldLines(G4double zoom, G4double theta, G4double phi)
void SetDrawBline(G4bool aBool)
void SetPointSize(G4double aVal)
void SetMaxTrackingStep(G4double max_step)
void ComputeBlines(G4int nlines)
G4BlineEventAction * GetEventAction()

Member Data Documentation

◆ fTheBlineTool

G4BlineTracer* G4BlineTracerMessenger::fTheBlineTool = nullptr
private

Definition at line 72 of file G4BlineTracerMessenger.hh.

◆ fBlineToolDir

G4UIdirectory* G4BlineTracerMessenger::fBlineToolDir = nullptr
private

Definition at line 73 of file G4BlineTracerMessenger.hh.

◆ fBlineCmd

G4UIcmdWithAnInteger* G4BlineTracerMessenger::fBlineCmd = nullptr
private

Definition at line 77 of file G4BlineTracerMessenger.hh.

◆ fSetMaxTrackingStepCmd

G4UIcmdWithADoubleAndUnit* G4BlineTracerMessenger::fSetMaxTrackingStepCmd = nullptr
private

Definition at line 78 of file G4BlineTracerMessenger.hh.

◆ fSetDrawColourCmd

G4UIcmdWith3Vector* G4BlineTracerMessenger::fSetDrawColourCmd = nullptr
private

Definition at line 79 of file G4BlineTracerMessenger.hh.

◆ fSetDrawBlineCmd

G4UIcmdWithABool* G4BlineTracerMessenger::fSetDrawBlineCmd = nullptr
private

Definition at line 80 of file G4BlineTracerMessenger.hh.

◆ fSetDrawPointsCmd

G4UIcmdWithABool* G4BlineTracerMessenger::fSetDrawPointsCmd = nullptr
private

Definition at line 81 of file G4BlineTracerMessenger.hh.

◆ fSetPointSizeCmd

G4UIcmdWithADouble* G4BlineTracerMessenger::fSetPointSizeCmd = nullptr
private

Definition at line 82 of file G4BlineTracerMessenger.hh.

◆ fDrawCmd

G4UIcmdWithoutParameter* G4BlineTracerMessenger::fDrawCmd = nullptr
private

Definition at line 83 of file G4BlineTracerMessenger.hh.

◆ fResetCmd

G4UIcmdWithoutParameter* G4BlineTracerMessenger::fResetCmd = nullptr
private

Definition at line 84 of file G4BlineTracerMessenger.hh.


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

Applications | User Support | Publications | Collaboration