Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisManager.cc,v 1.131 2010/12/14 15:53:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
// $Id: G4VisManager.cc,v 1.131 2010-12-14 15:53:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "G4VisCommands.hh"
|
||||
#include "G4VisCommandsCompound.hh"
|
||||
#include "G4VisCommandsDefault.hh"
|
||||
#include "G4VisCommandsGeometry.hh"
|
||||
#include "G4VisCommandsGeometrySet.hh"
|
||||
#include "G4VisCommandsScene.hh"
|
||||
@@ -122,7 +123,9 @@ G4VisManager::G4VisManager (const G4String& verbosityString):
|
||||
|
||||
if (fpInstance) {
|
||||
G4Exception
|
||||
("G4VisManager: attempt to Construct more than one VisManager.");
|
||||
("G4VisManager::G4VisManager",
|
||||
"visman0001", FatalException,
|
||||
"Attempt to Construct more than one VisManager");
|
||||
}
|
||||
|
||||
fpInstance = this;
|
||||
@@ -212,7 +215,8 @@ G4VisManager::~G4VisManager () {
|
||||
G4VisManager* G4VisManager::GetInstance () {
|
||||
if (!fpInstance) {
|
||||
G4Exception
|
||||
("G4VisManager::GetInstance: VisManager not yet instantiated!");
|
||||
("G4VisManager::GetInstance",
|
||||
"visman0002", FatalException, "VisManager not yet instantiated");
|
||||
}
|
||||
return fpInstance;
|
||||
}
|
||||
@@ -310,11 +314,16 @@ void G4VisManager::Initialise () {
|
||||
if (fVerbosity >= startup) {
|
||||
G4cout <<
|
||||
"\nYou have successfully registered the following model factories."
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
PrintAvailableModels (fVerbosity);
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
if (fVerbosity >= startup) {
|
||||
PrintAvailableColours (fVerbosity);
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
fInitialised = true;
|
||||
}
|
||||
|
||||
@@ -1118,6 +1127,12 @@ void G4VisManager::RegisterMessengers () {
|
||||
RegisterMessenger(new G4VisCommandOpen);
|
||||
RegisterMessenger(new G4VisCommandSpecify);
|
||||
|
||||
directory = new G4UIdirectory ("/vis/default/");
|
||||
directory -> SetGuidance("Set default values for future operations.");
|
||||
fDirectoryList.push_back (directory);
|
||||
RegisterMessenger(new G4VisCommandDefaultHiddenEdge);
|
||||
RegisterMessenger(new G4VisCommandDefaultStyle);
|
||||
|
||||
directory = new G4UIdirectory ("/vis/geometry/");
|
||||
directory -> SetGuidance("Operations on vis attributes of Geant4 geometry.");
|
||||
fDirectoryList.push_back (directory);
|
||||
@@ -1297,6 +1312,19 @@ void G4VisManager::PrintAvailableModels (Verbosity verbosity) const
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::PrintAvailableColours (Verbosity) const {
|
||||
G4cout <<
|
||||
"Some /vis commands (optionally) take a string to specify colour."
|
||||
"\nAvailable colours:\n ";
|
||||
const std::map<G4String, G4Colour>& map = G4Colour::GetMap();
|
||||
for (std::map<G4String, G4Colour>::const_iterator i = map.begin();
|
||||
i != map.end();) {
|
||||
G4cout << i->first;
|
||||
if (++i != map.end()) G4cout << ", ";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::PrintInvalidPointers () const {
|
||||
if (fVerbosity >= errors) {
|
||||
G4cout << "ERROR: G4VisManager::PrintInvalidPointers:";
|
||||
|
||||
Reference in New Issue
Block a user