Geant4  10.02.p03
G4BlineTracerMessenger Class Reference

#include <G4BlineTracerMessenger.hh>

Inheritance diagram for G4BlineTracerMessenger:
Collaboration diagram for G4BlineTracerMessenger:

Public Member Functions

 G4BlineTracerMessenger (G4BlineTracer *aBlineTool)
 
virtual ~G4BlineTracerMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
- 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

G4BlineTracerfTheBlineTool
 
G4UIdirectoryfBlineToolDir
 
G4UIcmdWithAnIntegerfBlineCmd
 
G4UIcmdWithADoubleAndUnitfSetMaxTrackingStepCmd
 
G4UIcmdWith3VectorfSetDrawColourCmd
 
G4UIcmdWithABoolfSetDrawBlineCmd
 
G4UIcmdWithABoolfSetDrawPointsCmd
 
G4UIcmdWithADoublefSetPointSizeCmd
 
G4UIcmdWithoutParameterfDrawCmd
 
G4UIcmdWithoutParameterfResetCmd
 

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 62 of file G4BlineTracerMessenger.hh.

Constructor & Destructor Documentation

◆ G4BlineTracerMessenger()

G4BlineTracerMessenger::G4BlineTracerMessenger ( G4BlineTracer aBlineTool)

Definition at line 57 of file G4BlineTracerMessenger.cc.

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

◆ ~G4BlineTracerMessenger()

G4BlineTracerMessenger::~G4BlineTracerMessenger ( )
virtual

Definition at line 112 of file G4BlineTracerMessenger.cc.

113 {
114  delete fResetCmd;
115  delete fDrawCmd;
116  delete fSetPointSizeCmd;
117  delete fSetDrawPointsCmd;
118  delete fSetDrawBlineCmd;
119  delete fSetDrawColourCmd;
120  delete fSetMaxTrackingStepCmd;
121  delete fBlineCmd;
122  delete fBlineToolDir;
123 }
G4UIcmdWith3Vector * fSetDrawColourCmd
G4UIcmdWithoutParameter * fResetCmd
G4UIcmdWithAnInteger * fBlineCmd
G4UIcmdWithoutParameter * fDrawCmd
G4UIcmdWithABool * fSetDrawBlineCmd
G4UIcmdWithADouble * fSetPointSizeCmd
G4UIcmdWithADoubleAndUnit * fSetMaxTrackingStepCmd
G4UIcmdWithABool * fSetDrawPointsCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 127 of file G4BlineTracerMessenger.cc.

129 {
130  if (command == fBlineCmd)
132  else if( command == fSetMaxTrackingStepCmd )
134  ->GetNewDoubleValue(newValues));
135  else if( command == fSetDrawBlineCmd )
137  ->GetNewBoolValue(newValues));
138  else if( command == fSetDrawColourCmd )
139  {
142  SetDrawColour(G4Colour(vec.x(),vec.y(),vec.z()));
143  }
144  else if( command == fSetDrawPointsCmd )
146  ->GetNewBoolValue(newValues));
147  else if( command == fSetPointSizeCmd )
149  ->GetNewDoubleValue(newValues));
150  else if( command == fDrawCmd )
152  else if( command == fResetCmd )
154 }
G4UIcmdWith3Vector * fSetDrawColourCmd
void SetDrawBline(G4bool aBool)
void DrawFieldLines(G4double zoom, G4double theta, G4double phi)
void SetDrawPoints(G4bool aBool)
G4UIcmdWithoutParameter * fResetCmd
G4UIcmdWithAnInteger * fBlineCmd
G4UIcmdWithoutParameter * fDrawCmd
G4UIcmdWithABool * fSetDrawBlineCmd
static G4ThreeVector GetNew3VectorValue(const char *paramString)
G4UIcmdWithADouble * fSetPointSizeCmd
void ComputeBlines(G4int nlines)
double x() const
void SetMaxTrackingStep(G4double max_step)
double y() const
void SetPointSize(G4double aVal)
double z() const
G4BlineEventAction * GetEventAction()
G4UIcmdWithADoubleAndUnit * fSetMaxTrackingStepCmd
G4UIcmdWithABool * fSetDrawPointsCmd
Here is the call graph for this function:

Member Data Documentation

◆ fBlineCmd

G4UIcmdWithAnInteger* G4BlineTracerMessenger::fBlineCmd
private

Definition at line 78 of file G4BlineTracerMessenger.hh.

◆ fBlineToolDir

G4UIdirectory* G4BlineTracerMessenger::fBlineToolDir
private

Definition at line 74 of file G4BlineTracerMessenger.hh.

◆ fDrawCmd

G4UIcmdWithoutParameter* G4BlineTracerMessenger::fDrawCmd
private

Definition at line 84 of file G4BlineTracerMessenger.hh.

◆ fResetCmd

G4UIcmdWithoutParameter* G4BlineTracerMessenger::fResetCmd
private

Definition at line 85 of file G4BlineTracerMessenger.hh.

◆ fSetDrawBlineCmd

G4UIcmdWithABool* G4BlineTracerMessenger::fSetDrawBlineCmd
private

Definition at line 81 of file G4BlineTracerMessenger.hh.

◆ fSetDrawColourCmd

G4UIcmdWith3Vector* G4BlineTracerMessenger::fSetDrawColourCmd
private

Definition at line 80 of file G4BlineTracerMessenger.hh.

◆ fSetDrawPointsCmd

G4UIcmdWithABool* G4BlineTracerMessenger::fSetDrawPointsCmd
private

Definition at line 82 of file G4BlineTracerMessenger.hh.

◆ fSetMaxTrackingStepCmd

G4UIcmdWithADoubleAndUnit* G4BlineTracerMessenger::fSetMaxTrackingStepCmd
private

Definition at line 79 of file G4BlineTracerMessenger.hh.

◆ fSetPointSizeCmd

G4UIcmdWithADouble* G4BlineTracerMessenger::fSetPointSizeCmd
private

Definition at line 83 of file G4BlineTracerMessenger.hh.

◆ fTheBlineTool

G4BlineTracer* G4BlineTracerMessenger::fTheBlineTool
private

Definition at line 73 of file G4BlineTracerMessenger.hh.


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