35 #ifdef G4VIS_BUILD_VRML_DRIVER
71 G4VRML1SceneHandler::G4VRML1SceneHandler(G4VRML1& system,
const G4String&
name) :
80 G4VRML1SceneHandler::~G4VRML1SceneHandler()
82 #if defined DEBUG_FR_SCENE
90 #define G4VRML1SCENEHANDLER G4VRML1SceneHandler
91 #define IS_CONNECTED fDest.isConnected()
92 #include "G4VRML1SceneHandlerFunc.icc"
94 #undef G4VRML1SCENEHANDLER
97 void G4VRML1SceneHandler::connectPort(
G4int max_trial)
100 int port = fSystem.getPort();
101 for (trial = 0; !fDest.isConnected()&& trial < max_trial; trial++, port++ ) {
102 if (fDest.connect( (
const char * )fSystem.getHostName(), port)) {
105 G4cout <<
"*** GEANT4 is connected to port ";
106 G4cout << fDest.getPort();
107 G4cout <<
" of server " << fSystem.getHostName() <<
G4endl;
113 G4cout <<
"*** GEANT4 incremented targeting port to ";
122 if (!fDest.isConnected()) {
125 G4cout <<
" Maybe, you have not invoked viewer g4vrmlview yet, " <<
G4endl;
126 G4cout <<
" or too many viewers are already running in the " <<
G4endl;
127 G4cout <<
" server host(" << fSystem.getHostName() <<
"). " <<
G4endl;
132 void G4VRML1SceneHandler::closePort()
140 G4int G4VRML1SceneHandler::fSceneIdCount = 0;