Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VisCommandSpecify Class Reference

#include <G4VisCommandsCompound.hh>

Inheritance diagram for G4VisCommandSpecify:
Collaboration 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, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 
- 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, G4bool commandsToBeBroadcasted=true)
 
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
 
G4bool commandsShouldBeInMaster
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4int fErrorCode = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static
G4ModelingParameters::PVNameCopyNoPath 
fCurrentTouchablePath
 

Detailed Description

Definition at line 80 of file G4VisCommandsCompound.hh.

Constructor & Destructor Documentation

G4VisCommandSpecify::G4VisCommandSpecify ( )

Definition at line 306 of file G4VisCommandsCompound.cc.

306  {
307  G4bool omitable;
308  fpCommand = new G4UIcommand("/vis/specify", this);
309  fpCommand->SetGuidance
310  ("Draws logical volume with Boolean components, voxels and readout geometry.");
311  fpCommand->SetGuidance
312  ("Creates a scene consisting of this logical volume and asks the"
313  "\n current viewer to draw it to the specified depth of descent"
314  "\n showing boolean components (if any), voxels (if any),"
315  "\n readout geometry (if any) and local axes, under control of the"
316  "\n appropriate flag.");
317  fpCommand->SetGuidance
318  ("Note: voxels are not constructed until start of run - /run/beamOn."
319  "\n (For voxels without a run, \"/run/beamOn 0\".)");
320  fpCommand->SetGuidance("The scene becomes current.");
321  G4UIparameter* parameter;
322  parameter = new G4UIparameter("logical-volume-name", 's', omitable = false);
323  fpCommand->SetParameter(parameter);
324  parameter = new G4UIparameter("depth-of-descent", 'i', omitable = true);
325  parameter->SetDefaultValue(1);
326  fpCommand->SetParameter(parameter);
327  parameter = new G4UIparameter("booleans-flag", 'b', omitable = true);
328  parameter->SetDefaultValue(true);
329  fpCommand->SetParameter(parameter);
330  parameter = new G4UIparameter("voxels-flag", 'b', omitable = true);
331  parameter->SetDefaultValue(true);
332  fpCommand->SetParameter(parameter);
333  parameter = new G4UIparameter("readout-flag", 'b', omitable = true);
334  parameter->SetDefaultValue(true);
335  fpCommand->SetParameter(parameter);
336  parameter = new G4UIparameter("axes-flag", 'b', omitable = true);
337  parameter->SetDefaultValue(true);
338  parameter -> SetGuidance ("Set \"false\" to suppress axes.");
339  fpCommand->SetParameter(parameter);
340 }
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
void SetDefaultValue(const char *theDefaultValue)
bool G4bool
Definition: G4Types.hh:79
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161

Here is the call graph for this function:

G4VisCommandSpecify::~G4VisCommandSpecify ( )
virtual

Definition at line 342 of file G4VisCommandsCompound.cc.

342  {
343  delete fpCommand;
344 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 346 of file G4VisCommandsCompound.cc.

346  {
348  G4UImanager* UImanager = G4UImanager::GetUIpointer();
349  G4int keepVerbose = UImanager->GetVerboseLevel();
350  G4int newVerbose(0);
351  if (keepVerbose >= 2 || verbosity >= G4VisManager::confirmations)
352  newVerbose = 2;
353  UImanager->SetVerboseLevel(newVerbose);
354  // UImanager->ApplyCommand(G4String("/geometry/print " + newValue));
355  UImanager->ApplyCommand("/vis/scene/create");
356  UImanager->ApplyCommand(G4String("/vis/scene/add/logicalVolume " + newValue));
357  UImanager->ApplyCommand("/vis/sceneHandler/attach");
358  UImanager->SetVerboseLevel(keepVerbose);
359  static G4bool warned = false;
360  if (verbosity >= G4VisManager::confirmations && !warned) {
361  G4cout <<
362  "NOTE: For systems which are not \"auto-refresh\" you will need to"
363  "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
364  << G4endl;
365  warned = true;
366  }
367 }
G4int GetVerboseLevel() const
Definition: G4UImanager.hh:227
int G4int
Definition: G4Types.hh:78
void SetVerboseLevel(G4int val)
Definition: G4UImanager.hh:225
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static Verbosity GetVerbosity()
#define G4endl
Definition: G4ios.hh:61
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447
static G4VisManager * fpVisManager

Here is the call graph for this function:


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