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

#include <G4VisCommandsCompound.hh>

+ Inheritance diagram for G4VisCommandSpecify:

Public Member Functions

 G4VisCommandSpecify ()
 
virtual ~G4VisCommandSpecify ()
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4VVisCommand
 G4VVisCommand ()
 
virtual ~G4VVisCommand ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
- Protected Member Functions inherited from G4VVisCommand
void UpdateVisManagerScene (const G4String &sceneName="")
 
- 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)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Static Protected Member Functions inherited from G4VVisCommand
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentLineWidth = 1.
 
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath
 

Detailed Description

Definition at line 80 of file G4VisCommandsCompound.hh.

Constructor & Destructor Documentation

◆ G4VisCommandSpecify()

G4VisCommandSpecify::G4VisCommandSpecify ( )

Definition at line 288 of file G4VisCommandsCompound.cc.

288 {
289 G4bool omitable;
290 fpCommand = new G4UIcommand("/vis/specify", this);
291 fpCommand->SetGuidance
292 ("Draws logical volume with Boolean components, voxels and readout geometry.");
293 fpCommand->SetGuidance
294 ("Creates a scene consisting of this logical volume and asks the"
295 "\n current viewer to draw it to the specified depth of descent"
296 "\n showing boolean components (if any), voxels (if any)"
297 "\n and readout geometry (if any), under control of the appropriate flag.");
298 fpCommand->SetGuidance
299 ("Note: voxels are not constructed until start of run - /run/beamOn.");
300 fpCommand->SetGuidance("The scene becomes current.");
301 G4UIparameter* parameter;
302 parameter = new G4UIparameter("logical-volume-name", 's', omitable = false);
303 fpCommand->SetParameter(parameter);
304 parameter = new G4UIparameter("depth-of-descent", 'i', omitable = true);
305 parameter->SetDefaultValue(1);
306 fpCommand->SetParameter(parameter);
307 parameter = new G4UIparameter("booleans-flag", 'b', omitable = true);
308 parameter->SetDefaultValue(true);
309 fpCommand->SetParameter(parameter);
310 parameter = new G4UIparameter("voxels-flag", 'b', omitable = true);
311 parameter->SetDefaultValue(true);
312 fpCommand->SetParameter(parameter);
313 parameter = new G4UIparameter("readout-flag", 'b', omitable = true);
314 parameter->SetDefaultValue(true);
315 fpCommand->SetParameter(parameter);
316}
bool G4bool
Definition: G4Types.hh:67
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:147
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetDefaultValue(const char *theDefaultValue)

◆ ~G4VisCommandSpecify()

G4VisCommandSpecify::~G4VisCommandSpecify ( )
virtual

Definition at line 318 of file G4VisCommandsCompound.cc.

318 {
319 delete fpCommand;
320}

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 322 of file G4VisCommandsCompound.cc.

322 {
325 G4int keepVerbose = UImanager->GetVerboseLevel();
326 G4int newVerbose(0);
327 if (keepVerbose >= 2 || verbosity >= G4VisManager::confirmations)
328 newVerbose = 2;
329 UImanager->SetVerboseLevel(newVerbose);
330 // UImanager->ApplyCommand(G4String("/geometry/print " + newValue));
331 UImanager->ApplyCommand("/vis/scene/create");
332 UImanager->ApplyCommand(G4String("/vis/scene/add/logicalVolume " + newValue));
333 UImanager->ApplyCommand("/vis/sceneHandler/attach");
334 UImanager->SetVerboseLevel(keepVerbose);
335 static G4bool warned = false;
336 if (verbosity >= G4VisManager::confirmations && !warned) {
337 G4cout <<
338 "NOTE: For systems which are not \"auto-refresh\" you will need to"
339 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
340 << G4endl;
341 warned = true;
342 }
343}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:369
G4int GetVerboseLevel() const
Definition: G4UImanager.hh:218
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:51
void SetVerboseLevel(G4int val)
Definition: G4UImanager.hh:216
static G4VisManager * fpVisManager
static Verbosity GetVerbosity()

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