34#ifdef G4VIS_BUILD_VRML_DRIVER
70G4VRML1SceneHandler::G4VRML1SceneHandler(G4VRML1& system,
const G4String& name) :
79G4VRML1SceneHandler::~G4VRML1SceneHandler()
81#if defined DEBUG_FR_SCENE
89#define G4VRML1SCENEHANDLER G4VRML1SceneHandler
90#define IS_CONNECTED fDest.isConnected()
91#include "G4VRML1SceneHandlerFunc.icc"
93#undef G4VRML1SCENEHANDLER
96void G4VRML1SceneHandler::connectPort(
G4int max_trial)
99 int port = fSystem.getPort();
100 for (trial = 0; !fDest.isConnected()&& trial < max_trial; trial++, port++ ) {
101 if (fDest.connect( (
const char * )fSystem.getHostName(), port)) {
104 G4cout <<
"*** GEANT4 is connected to port ";
105 G4cout << fDest.getPort();
106 G4cout <<
" of server " << fSystem.getHostName() <<
G4endl;
112 G4cout <<
"*** GEANT4 incremented targeting port to ";
121 if (!fDest.isConnected()) {
124 G4cout <<
" Maybe, you have not invoked viewer g4vrmlview yet, " <<
G4endl;
125 G4cout <<
" or too many viewers are already running in the " <<
G4endl;
126 G4cout <<
" server host(" << fSystem.getHostName() <<
"). " <<
G4endl;
131void G4VRML1SceneHandler::closePort()
139G4int G4VRML1SceneHandler::fSceneIdCount = 0;
G4GLOB_DLL std::ostream G4cout
static Verbosity GetVerbosity()
const char * name(G4int ptype)