Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
$Id: History 104289 2017-05-23 13:24:09Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,9 @@ committal in the CVS repository !
|
||||
History file for visualization/VRML sub-category
|
||||
------------------------------------------------
|
||||
|
||||
23rd May 2017 John Allison (VRML-V10-03-01)
|
||||
- Fixes for gcc-7.1 warnings.
|
||||
|
||||
19th November 2016 John Allison (VRML-V10-02-03)
|
||||
- Fixed the GetColour() problem.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRML1FileSceneHandler.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
// $Id: G4VRML1FileSceneHandler.cc 104289 2017-05-23 13:24:09Z gcosmo $
|
||||
//
|
||||
// G4VRML1FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VisManager.hh"
|
||||
@@ -146,14 +148,14 @@ void G4VRML1FileSceneHandler::connectPort()
|
||||
}
|
||||
|
||||
// re-determine file name as G4VRMLFILE_DEST_DIR/g4_XX.wrl
|
||||
if( i >= 0 && i <= 9 ) {
|
||||
sprintf( fVRMLFileName, "%s%s%s%d.wrl" , fVRMLFileDestDir, WRL_FILE_HEADER, "0", i );
|
||||
} else {
|
||||
sprintf( fVRMLFileName, "%s%s%d.wrl" , fVRMLFileDestDir, WRL_FILE_HEADER, i );
|
||||
}
|
||||
std::ostringstream filename;
|
||||
filename
|
||||
<< fVRMLFileDestDir << WRL_FILE_HEADER
|
||||
<< std::setw(2) << std::setfill('0') << i << ".wrl";
|
||||
strncpy(fVRMLFileName,filename.str().c_str(),sizeof(fVRMLFileName));
|
||||
|
||||
// check validity of the file name
|
||||
std::ifstream fin ;
|
||||
std::ifstream fin ;
|
||||
fin.open(fVRMLFileName) ;
|
||||
if(!fin) {
|
||||
// new file
|
||||
@@ -206,7 +208,9 @@ void G4VRML1FileSceneHandler::closePort()
|
||||
G4cout << " setenv " << ENV_VRML_VIEWER << " vrweb " << G4endl;
|
||||
}
|
||||
} else {
|
||||
sprintf( command, "%s %s", viewer, fVRMLFileName );
|
||||
std::ostringstream ossCommand;
|
||||
ossCommand << viewer << ' ' << fVRMLFileName;
|
||||
strncpy(command,ossCommand.str().c_str(),sizeof(command));
|
||||
(void) system( command );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRML2FileSceneHandler.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
// $Id: G4VRML2FileSceneHandler.cc 104289 2017-05-23 13:24:09Z gcosmo $
|
||||
//
|
||||
// G4VRML2FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -37,6 +37,8 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
@@ -161,11 +163,11 @@ void G4VRML2FileSceneHandler::connectPort()
|
||||
}
|
||||
|
||||
// re-determine file name as G4VRMLFILE_DEST_DIR/g4_XX.wrl
|
||||
if( i >= 0 && i <= 9 ) {
|
||||
sprintf( fVRMLFileName, "%s%s%s%d.wrl" , fVRMLFileDestDir, WRL_FILE_HEADER, "0", i );
|
||||
} else {
|
||||
sprintf( fVRMLFileName, "%s%s%d.wrl" , fVRMLFileDestDir, WRL_FILE_HEADER, i );
|
||||
}
|
||||
std::ostringstream filename;
|
||||
filename
|
||||
<< fVRMLFileDestDir << WRL_FILE_HEADER
|
||||
<< std::setw(2) << std::setfill('0') << i << ".wrl";
|
||||
strncpy(fVRMLFileName,filename.str().c_str(),sizeof(fVRMLFileName));
|
||||
|
||||
// check validity of the file name
|
||||
std::ifstream fin ;
|
||||
@@ -220,7 +222,9 @@ void G4VRML2FileSceneHandler::closePort()
|
||||
G4cout << " setenv " << ENV_VRML_VIEWER << " vrwave " << G4endl;
|
||||
}
|
||||
} else {
|
||||
sprintf( command, "%s %s", viewer, fVRMLFileName );
|
||||
std::ostringstream ossCommand;
|
||||
ossCommand << viewer << ' ' << fVRMLFileName;
|
||||
strncpy(command,ossCommand.str().c_str(),sizeof(command));
|
||||
(void) system( command );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user