Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UIcmdWith3Vector Class Reference

#include <G4UIcmdWith3Vector.hh>

+ Inheritance diagram for G4UIcmdWith3Vector:

Public Member Functions

 G4UIcmdWith3Vector (const char *theCommandPath, G4UImessenger *theMessenger)
 
void SetParameterName (const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
 
void SetDefaultValue (const G4ThreeVector &defVal)
 
- Public Member Functions inherited from G4UIcommand
 G4UIcommand ()=default
 
 G4UIcommand (const char *theCommandPath, G4UImessenger *theMessenger, G4bool tBB=true)
 
virtual ~G4UIcommand ()
 
G4bool operator== (const G4UIcommand &right) const
 
G4bool operator!= (const G4UIcommand &right) const
 
virtual G4int DoIt (G4String parameterList)
 
G4String GetCurrentValue ()
 
void AvailableForStates (G4ApplicationState s1)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3, G4ApplicationState s4)
 
void AvailableForStates (G4ApplicationState s1, G4ApplicationState s2, G4ApplicationState s3, G4ApplicationState s4, G4ApplicationState s5)
 
G4bool IsAvailable ()
 
virtual void List ()
 
void SetRange (const char *rs)
 
const G4StringGetRange () const
 
std::size_t GetGuidanceEntries () const
 
const G4StringGetGuidanceLine (G4int i) const
 
const G4StringGetCommandPath () const
 
const G4StringGetCommandName () const
 
std::size_t GetParameterEntries () const
 
G4UIparameterGetParameter (G4int i) const
 
std::vector< G4ApplicationState > * GetStateList ()
 
G4UImessengerGetMessenger () const
 
void SetParameter (G4UIparameter *const newParameter)
 
void SetGuidance (const char *aGuidance)
 
const G4String GetTitle () const
 
void SetToBeBroadcasted (G4bool val)
 
G4bool ToBeBroadcasted () const
 
void SetToBeFlushed (G4bool val)
 
G4bool ToBeFlushed () const
 
void SetWorkerThreadOnly (G4bool val=true)
 
G4bool IsWorkerThreadOnly () const
 
void CommandFailed (G4int errCode, G4ExceptionDescription &ed)
 
void CommandFailed (G4ExceptionDescription &ed)
 
G4int IfCommandFailed ()
 
const G4StringGetFailureDescription ()
 
void ResetFailure ()
 
CommandType GetCommandType () const
 
void SetCommandType (CommandType)
 
void SetDefaultSortFlag (G4bool val)
 

Static Public Member Functions

static G4ThreeVector GetNew3VectorValue (const char *paramString)
 
- Static Public Member Functions inherited from G4UIcommand
static G4String ConvertToString (G4bool boolVal)
 
static G4String ConvertToString (G4int intValue)
 
static G4String ConvertToString (G4long longValue)
 
static G4String ConvertToString (G4double doubleValue)
 
static G4String ConvertToString (G4double doubleValue, const char *unitName)
 
static G4String ConvertToString (const G4ThreeVector &vec)
 
static G4String ConvertToString (const G4ThreeVector &vec, const char *unitName)
 
static G4bool ConvertToBool (const char *st)
 
static G4int ConvertToInt (const char *st)
 
static G4long ConvertToLongInt (const char *st)
 
static G4double ConvertToDouble (const char *st)
 
static G4double ConvertToDimensionedDouble (const char *st)
 
static G4ThreeVector ConvertTo3Vector (const char *st)
 
static G4ThreeVector ConvertToDimensioned3Vector (const char *st)
 
static G4double ValueOf (const char *unitName)
 
static G4String CategoryOf (const char *unitName)
 
static G4String UnitsList (const char *unitCategory)
 

Additional Inherited Members

- Public Types inherited from G4UIcommand
enum  CommandType {
  BaseClassCmd , WithoutParameterCmd , WithABoolCmd , WithAnIntegerCmd ,
  WithALongIntCmd , WithADoubleCmd , WithADoubleAndUnitCmd , With3VectorCmd ,
  With3VectorAndUnitCmd , WithAStringCmd , CmdDirectory = -1
}
 
- Protected Types inherited from G4UIcommand
using yystype = G4UItokenNum::yystype
 
using tokenNum = G4UItokenNum::tokenNum
 
- Protected Member Functions inherited from G4UIcommand
G4int CheckNewValue (const char *newValue)
 
- Protected Attributes inherited from G4UIcommand
G4bool toBeBroadcasted = false
 
G4bool toBeFlushed = false
 
G4bool workerThreadOnly = false
 
G4int commandFailureCode = 0
 
G4String failureDescription = ""
 
G4bool ifSort = false
 

Detailed Description

Definition at line 42 of file G4UIcmdWith3Vector.hh.

Constructor & Destructor Documentation

◆ G4UIcmdWith3Vector()

G4UIcmdWith3Vector::G4UIcmdWith3Vector ( const char * theCommandPath,
G4UImessenger * theMessenger )

Definition at line 34 of file G4UIcmdWith3Vector.cc.

35 : G4UIcommand(theCommandPath, theMessenger)
36{
37 auto* dblParamX = new G4UIparameter('d');
38 SetParameter(dblParamX);
39 auto* dblParamY = new G4UIparameter('d');
40 SetParameter(dblParamY);
41 auto* dblParamZ = new G4UIparameter('d');
42 SetParameter(dblParamZ);
44}
G4UIcommand()=default
void SetCommandType(CommandType)
void SetParameter(G4UIparameter *const newParameter)

Member Function Documentation

◆ GetNew3VectorValue()

G4ThreeVector G4UIcmdWith3Vector::GetNew3VectorValue ( const char * paramString)
static

◆ SetDefaultValue()

void G4UIcmdWith3Vector::SetDefaultValue ( const G4ThreeVector & defVal)

Definition at line 72 of file G4UIcmdWith3Vector.cc.

73{
74 G4UIparameter* theParamX = GetParameter(0);
75 theParamX->SetDefaultValue(vec.x());
76 G4UIparameter* theParamY = GetParameter(1);
77 theParamY->SetDefaultValue(vec.y());
78 G4UIparameter* theParamZ = GetParameter(2);
79 theParamZ->SetDefaultValue(vec.z());
80}
G4UIparameter * GetParameter(G4int i) const
void SetDefaultValue(const char *theDefaultValue)

◆ SetParameterName()

void G4UIcmdWith3Vector::SetParameterName ( const char * theNameX,
const char * theNameY,
const char * theNameZ,
G4bool omittable,
G4bool currentAsDefault = false )

Definition at line 53 of file G4UIcmdWith3Vector.cc.

56{
57 G4UIparameter* theParamX = GetParameter(0);
58 theParamX->SetParameterName(theNameX);
59 theParamX->SetOmittable(omittable);
60 theParamX->SetCurrentAsDefault(currentAsDefault);
61 G4UIparameter* theParamY = GetParameter(1);
62 theParamY->SetParameterName(theNameY);
63 theParamY->SetOmittable(omittable);
64 theParamY->SetCurrentAsDefault(currentAsDefault);
65 G4UIparameter* theParamZ = GetParameter(2);
66 theParamZ->SetParameterName(theNameZ);
67 theParamZ->SetOmittable(omittable);
68 theParamZ->SetCurrentAsDefault(currentAsDefault);
69}
void SetParameterName(const char *pName)
void SetOmittable(G4bool om)
void SetCurrentAsDefault(G4bool val)

Referenced by G4MatScanMessenger::G4MatScanMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), and G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger().


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