G4VisCommandSpecify Class Reference

#include <G4VisCommandsCompound.hh>

Inheritance diagram for G4VisCommandSpecify:

G4VVisCommand G4UImessenger

Public Member Functions

 G4VisCommandSpecify ()
virtual ~G4VisCommandSpecify ()
void SetNewValue (G4UIcommand *command, G4String newValue)

Detailed Description

Definition at line 80 of file G4VisCommandsCompound.hh.


Constructor & Destructor Documentation

G4VisCommandSpecify::G4VisCommandSpecify (  ) 

Definition at line 288 of file G4VisCommandsCompound.cc.

References G4UIparameter::SetDefaultValue(), G4UIcommand::SetGuidance(), and G4UIcommand::SetParameter().

00288                                          {
00289   G4bool omitable;
00290   fpCommand = new G4UIcommand("/vis/specify", this);
00291   fpCommand->SetGuidance
00292     ("Draws logical volume with Boolean components, voxels and readout geometry.");
00293   fpCommand->SetGuidance
00294     ("Creates a scene consisting of this logical volume and asks the"
00295      "\n  current viewer to draw it to the specified depth of descent"
00296      "\n  showing boolean components (if any), voxels (if any)"
00297      "\n  and readout geometry (if any), under control of the appropriate flag.");
00298   fpCommand->SetGuidance
00299     ("Note: voxels are not constructed until start of run - /run/beamOn.");
00300   fpCommand->SetGuidance("The scene becomes current.");
00301   G4UIparameter* parameter;
00302   parameter = new G4UIparameter("logical-volume-name", 's', omitable = false);
00303   fpCommand->SetParameter(parameter);
00304   parameter = new G4UIparameter("depth-of-descent", 'i', omitable = true);
00305   parameter->SetDefaultValue(1);
00306   fpCommand->SetParameter(parameter);
00307   parameter = new G4UIparameter("booleans-flag", 'b', omitable = true);
00308   parameter->SetDefaultValue(true);
00309   fpCommand->SetParameter(parameter);
00310   parameter = new G4UIparameter("voxels-flag", 'b', omitable = true);
00311   parameter->SetDefaultValue(true);
00312   fpCommand->SetParameter(parameter);
00313   parameter = new G4UIparameter("readout-flag", 'b', omitable = true);
00314   parameter->SetDefaultValue(true);
00315   fpCommand->SetParameter(parameter);
00316 }

G4VisCommandSpecify::~G4VisCommandSpecify (  )  [virtual]

Definition at line 318 of file G4VisCommandsCompound.cc.

00318                                           {
00319   delete fpCommand;
00320 }


Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 322 of file G4VisCommandsCompound.cc.

References G4UImanager::ApplyCommand(), G4VisManager::confirmations, G4VVisCommand::fpVisManager, G4cout, G4endl, G4UImanager::GetUIpointer(), G4UImanager::GetVerboseLevel(), G4VisManager::GetVerbosity(), and G4UImanager::SetVerboseLevel().

00322                                                                      {
00323   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00324   G4UImanager* UImanager = G4UImanager::GetUIpointer();
00325   G4int keepVerbose = UImanager->GetVerboseLevel();
00326   G4int newVerbose(0);
00327   if (keepVerbose >= 2 || verbosity >= G4VisManager::confirmations)
00328     newVerbose = 2;
00329   UImanager->SetVerboseLevel(newVerbose);
00330   // UImanager->ApplyCommand(G4String("/geometry/print " + newValue));
00331   UImanager->ApplyCommand("/vis/scene/create");
00332   UImanager->ApplyCommand(G4String("/vis/scene/add/logicalVolume " + newValue));
00333   UImanager->ApplyCommand("/vis/sceneHandler/attach");
00334   UImanager->SetVerboseLevel(keepVerbose);
00335   static G4bool warned = false;
00336   if (verbosity >= G4VisManager::confirmations && !warned) {
00337     G4cout <<
00338       "NOTE: For systems which are not \"auto-refresh\" you will need to"
00339       "\n  issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
00340            << G4endl;
00341     warned = true;
00342   }
00343 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:45 2013 for Geant4 by  doxygen 1.4.7