#include <G4VisCommandsSceneAdd.hh>
Inheritance diagram for G4VisCommandSceneAddDigis:
Public Member Functions | |
G4VisCommandSceneAddDigis () | |
virtual | ~G4VisCommandSceneAddDigis () |
G4String | GetCurrentValue (G4UIcommand *command) |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Definition at line 118 of file G4VisCommandsSceneAdd.hh.
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] |
G4String G4VisCommandSceneAddDigis::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
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 }