G4VisCommandSceneAddHits Class Reference

#include <G4VisCommandsSceneAdd.hh>

Inheritance diagram for G4VisCommandSceneAddHits:

G4VVisCommandScene G4VVisCommand G4UImessenger

Public Member Functions

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

Detailed Description

Definition at line 186 of file G4VisCommandsSceneAdd.hh.


Constructor & Destructor Documentation

G4VisCommandSceneAddHits::G4VisCommandSceneAddHits (  ) 

Definition at line 839 of file G4VisCommandsSceneAdd.cc.

00839                                                     {
00840   fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/hits", this);
00841   fpCommand -> SetGuidance ("Adds hits to current scene.");
00842   fpCommand -> SetGuidance
00843     ("Hits are drawn at end of event when the scene in which"
00844      "\nthey are added is current.");
00845 }

G4VisCommandSceneAddHits::~G4VisCommandSceneAddHits (  )  [virtual]

Definition at line 847 of file G4VisCommandsSceneAdd.cc.

00847                                                      {
00848   delete fpCommand;
00849 }


Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 851 of file G4VisCommandsSceneAdd.cc.

00851                                                                 {
00852   return "";
00853 }

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

Reimplemented from G4UImessenger.

Definition at line 855 of file G4VisCommandsSceneAdd.cc.

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

00855                                                                   {
00856 
00857   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00858   G4bool warn(verbosity >= G4VisManager::warnings);
00859 
00860   G4Scene* pScene = fpVisManager->GetCurrentScene();
00861   if (!pScene) {
00862     if (verbosity >= G4VisManager::errors) {
00863       G4cout << "ERROR: No current scene.  Please create one." << G4endl;
00864     }
00865     return;
00866   }
00867 
00868   G4HitsModel* model = new G4HitsModel;
00869   const G4String& currentSceneName = pScene -> GetName ();
00870   G4bool successful = pScene -> AddEndOfEventModel (model, warn);
00871   if (successful) {
00872     if (verbosity >= G4VisManager::confirmations) {
00873       G4cout << "Hits, if any, will be drawn at end of run in scene \""
00874              << currentSceneName << "\"."
00875              << G4endl;
00876     }
00877   }
00878   else G4VisCommandsSceneAddUnsuccessful(verbosity);
00879   UpdateVisManagerScene (currentSceneName);
00880 }


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