63 :
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
64 kSceneHandler (sceneHandler)
67 std::strncpy( kG4GddViewer,
"gMocren", 8);
68 if( std::getenv(
"G4GMocrenFile_VIEWER" ) != NULL ) {
69 char * env = std::getenv(
"G4GMocrenFile_VIEWER" );
72 G4Exception(
"G4GMocrenFileViewer::G4GMocrenFileViewer(*)",
74 "Invalid length of string set in G4GMocrenFile_VIEWER");
76 std::strncpy( kG4GddViewer, env,
sizeof(kG4GddViewer) - 1);
77 kG4GddViewer[
sizeof(kG4GddViewer) - 1] =
'\0';
82 if ( !std::strcmp( kG4GddViewer,
"NONE" ) ) {
85 kG4GddViewerInvocation[0] =
'\0';
88 std::strncpy( kG4GddViewerInvocation, kG4GddViewer,
89 sizeof(kG4GddViewerInvocation) - 1);
90 kG4GddViewerInvocation[
sizeof(kG4GddViewerInvocation) - 1] =
'\0';
91 G4int n =
sizeof(kG4GddViewerInvocation)
92 - (
G4int)std::strlen(kG4GddViewerInvocation) - 1;
93 std::strncat( kG4GddViewerInvocation,
" ", n);
97 G4Exception(
"G4GMocrenFileViewer::G4GMocrenFileViewer(*)",
99 "Invalid length of the GDD file name");
101 n =
sizeof(kG4GddViewerInvocation)
102 - (
G4int)std::strlen(kG4GddViewerInvocation) - 1;
103 std::strncat( kG4GddViewerInvocation, gddfname, n);
168 G4cout <<
"***** G4GMocrenFileViewer::ShowView () " <<
G4endl;
181 if ( !strcmp( kG4GddViewer,
"NONE" ) ) {
183 kG4GddViewerInvocation[0] =
'\0';
187 std::strncpy( kG4GddViewerInvocation, kG4GddViewer,
188 sizeof(kG4GddViewerInvocation) - 1);
189 kG4GddViewerInvocation[
sizeof(kG4GddViewerInvocation) - 1] =
'\0';
190 G4int n =
sizeof(kG4GddViewerInvocation)
191 - (
G4int)std::strlen(kG4GddViewerInvocation) - 1;
192 std::strncat( kG4GddViewerInvocation,
" ", n);
198 "Invalid length of the GDD file name");
200 n =
sizeof(kG4GddViewerInvocation)
201 - (
G4int)std::strlen(kG4GddViewerInvocation) - 1;
202 std::strncat( kG4GddViewerInvocation, gddfname, n);