G4VisCommandSceneAddDigis Class Reference

#include <G4VisCommandsSceneAdd.hh>

Inheritance diagram for G4VisCommandSceneAddDigis:

G4VVisCommandScene G4VVisCommand G4UImessenger

Public Member Functions

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

Detailed Description

Definition at line 118 of file G4VisCommandsSceneAdd.hh.


Constructor & Destructor Documentation

G4VisCommandSceneAddDigis::G4VisCommandSceneAddDigis (  ) 

Definition at line 469 of file G4VisCommandsSceneAdd.cc.

00469                                                       {
00470   fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/digis", this);
00471   fpCommand -> SetGuidance ("Adds digis to current scene.");
00472   fpCommand -> SetGuidance
00473     ("Digis are drawn at end of event when the scene in which"
00474      "\nthey are added is current.");
00475 }

G4VisCommandSceneAddDigis::~G4VisCommandSceneAddDigis (  )  [virtual]

Definition at line 477 of file G4VisCommandsSceneAdd.cc.

00477                                                        {
00478   delete fpCommand;
00479 }


Member Function Documentation

G4String G4VisCommandSceneAddDigis::GetCurrentValue ( G4UIcommand command  )  [virtual]

Reimplemented from G4UImessenger.

Definition at line 481 of file G4VisCommandsSceneAdd.cc.

00481                                                                  {
00482   return "";
00483 }

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

Reimplemented from G4UImessenger.

Definition at line 485 of file G4VisCommandsSceneAdd.cc.

References G4VisManager::confirmations, G4VisManager::errors, G4VVisCommand::fpVisManager, G4cout, G4endl, G4VisManager::GetCurrentScene(), G4VisManager::GetVerbosity(), G4VVisCommand::UpdateVisManagerScene(), and G4VisManager::warnings.

00485                                                                    {
00486 
00487   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00488   G4bool warn(verbosity >= G4VisManager::warnings);
00489 
00490   G4Scene* pScene = fpVisManager->GetCurrentScene();
00491   if (!pScene) {
00492     if (verbosity >= G4VisManager::errors) {
00493       G4cout << "ERROR: No current scene.  Please create one." << G4endl;
00494     }
00495     return;
00496   }
00497 
00498   G4DigiModel* model = new G4DigiModel;
00499   const G4String& currentSceneName = pScene -> GetName ();
00500   G4bool successful = pScene -> AddEndOfEventModel (model, warn);
00501   if (successful) {
00502     if (verbosity >= G4VisManager::confirmations) {
00503       G4cout << "Digis, if any, will be drawn at end of run in scene \""
00504              << currentSceneName << "\"."
00505              << G4endl;
00506     }
00507   }
00508   else G4VisCommandsSceneAddUnsuccessful(verbosity);
00509   UpdateVisManagerScene (currentSceneName);
00510 }


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