34#define G4GMocrenFile_STRUCTURE_PRIORITY 1.
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" );
70 G4int len = std::strlen(env);
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 - std::strlen(kG4GddViewerInvocation) - 1;
93 std::strncat( kG4GddViewerInvocation,
" ", n);
95 G4int len = std::strlen(gddfname);
97 G4Exception(
"G4GMocrenFileViewer::G4GMocrenFileViewer(*)",
99 "Invalid length of the GDD file name");
101 n =
sizeof(kG4GddViewerInvocation)
102 - std::strlen(kG4GddViewerInvocation) - 1;
103 std::strncat( kG4GddViewerInvocation, gddfname, n);
117 G4cout <<
"***** G4GMocrenFileViewer::SetView(): No effects" <<
G4endl;
130 G4cout <<
"***** G4GMocrenFileViewer::ClearView (): No effects " <<
G4endl;
137 kSceneHandler.kFlagInModeling =
false;
148 G4cout <<
"***** G4GMocrenFileViewer::DrawView () " <<
G4endl;
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 - std::strlen(kG4GddViewerInvocation) - 1;
192 std::strncat( kG4GddViewerInvocation,
" ", n);
194 G4int len = std::strlen(gddfname);
198 "Invalid length of the GDD file name");
200 n =
sizeof(kG4GddViewerInvocation)
201 - std::strlen(kG4GddViewerInvocation) - 1;
202 std::strncat( kG4GddViewerInvocation, gddfname, n);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
const char * GetGddFileName()
virtual ~G4GMocrenFileViewer()
G4GMocrenFileViewer(G4GMocrenFileSceneHandler &scene, G4GMocrenMessenger &messenger, const G4String &name="")
static Verbosity GetVerbosity()