Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -52,14 +52,14 @@ G4VRML1::G4VRML1() :
|
||||
{
|
||||
// port number
|
||||
fPort = FR_VRML_DEFAULT_PORT;
|
||||
char *pport = getenv(FR_VRML_PORT_ENV);
|
||||
char *pport = std::getenv(FR_VRML_PORT_ENV);
|
||||
if (pport) {
|
||||
sscanf(pport, "%d", &fPort);
|
||||
}
|
||||
|
||||
// host name
|
||||
fHostName = "localhost" ; // G4String::operator = ( const char* cs )
|
||||
char *phostname = getenv(FR_VRML_HOST_NAME_ENV);
|
||||
char *phostname = std::getenv(FR_VRML_HOST_NAME_ENV);
|
||||
if (phostname) {
|
||||
fHostName = phostname;
|
||||
}
|
||||
|
||||
@@ -81,17 +81,17 @@ G4VRML1FileSceneHandler::G4VRML1FileSceneHandler(G4VRML1File& system, const G4St
|
||||
fCurrentDEF = "";
|
||||
strcpy(fVRMLFileName, "");
|
||||
|
||||
if ( getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
if ( std::getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
strcpy( fVRMLFileDestDir, "" );
|
||||
} else {
|
||||
strcpy( fVRMLFileDestDir, getenv( VRMLFILE_DEST_DIR ) );
|
||||
strcpy( fVRMLFileDestDir, std::getenv( VRMLFILE_DEST_DIR ) );
|
||||
}
|
||||
|
||||
// maximum number of g4.wrl files in the dest directory
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ; // initialization
|
||||
if ( getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
if ( std::getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
|
||||
sscanf( getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
sscanf( std::getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
|
||||
} else {
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ;
|
||||
@@ -186,8 +186,8 @@ void G4VRML1FileSceneHandler::closePort()
|
||||
char command[256] ;
|
||||
char viewer [256] ;
|
||||
strcpy( viewer, NO_VRML_VIEWER ); // initialization
|
||||
if( getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, getenv( ENV_VRML_VIEWER ) ) ;
|
||||
if( std::getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, std::getenv( ENV_VRML_VIEWER ) ) ;
|
||||
}
|
||||
|
||||
// close VRML file
|
||||
|
||||
@@ -52,14 +52,14 @@ G4VRML2::G4VRML2() :
|
||||
{
|
||||
// port number
|
||||
fPort = FR_VRML_DEFAULT_PORT;
|
||||
char *pport = getenv(FR_VRML_PORT_ENV);
|
||||
char *pport = std::getenv(FR_VRML_PORT_ENV);
|
||||
if (pport) {
|
||||
sscanf(pport, "%d", &fPort);
|
||||
}
|
||||
|
||||
// host name
|
||||
fHostName = "localhost" ; // G4String::operator = ( const char* cs )
|
||||
char *phostname = getenv(FR_VRML_HOST_NAME_ENV);
|
||||
char *phostname = std::getenv(FR_VRML_HOST_NAME_ENV);
|
||||
if (phostname) {
|
||||
fHostName = phostname;
|
||||
}
|
||||
|
||||
@@ -82,18 +82,18 @@ G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4St
|
||||
strcpy(fVRMLFileName, "");
|
||||
|
||||
// destination directory
|
||||
if ( getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
if ( std::getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
strcpy( fVRMLFileDestDir, "" );
|
||||
} else {
|
||||
strcpy( fVRMLFileDestDir, getenv( VRMLFILE_DEST_DIR ) );
|
||||
strcpy( fVRMLFileDestDir, std::getenv( VRMLFILE_DEST_DIR ) );
|
||||
}
|
||||
|
||||
|
||||
// maximum number of g4.prim files in the dest directory
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ; // initialization
|
||||
if ( getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
if ( std::getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
|
||||
sscanf( getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
sscanf( std::getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
|
||||
} else {
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ;
|
||||
@@ -102,10 +102,10 @@ G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4St
|
||||
|
||||
|
||||
// PV name pickability
|
||||
if( getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
|
||||
int is_pickable ;
|
||||
sscanf( getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
sscanf( std::getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
|
||||
if ( is_pickable ) { SetPVPickability ( true ) ; }
|
||||
}
|
||||
@@ -200,8 +200,8 @@ void G4VRML2FileSceneHandler::closePort()
|
||||
char command[256] ;
|
||||
char viewer [256] ;
|
||||
strcpy( viewer, NO_VRML_VIEWER ); // initialization
|
||||
if( getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, getenv( ENV_VRML_VIEWER ) ) ;
|
||||
if( std::getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, std::getenv( ENV_VRML_VIEWER ) ) ;
|
||||
}
|
||||
|
||||
// close VRML file
|
||||
|
||||
@@ -75,10 +75,10 @@ G4VRML2SceneHandler::G4VRML2SceneHandler(G4VRML2& system, const G4String& name)
|
||||
{
|
||||
|
||||
// PV name pickability
|
||||
if( getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
|
||||
int is_pickable ;
|
||||
sscanf( getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
sscanf( std::getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
|
||||
if ( is_pickable ) { SetPVPickability ( true ) ; }
|
||||
}
|
||||
|
||||
@@ -712,11 +712,11 @@ G4double G4VRML2SCENEHANDLER::SetPVTransparency ()
|
||||
|
||||
G4double TRANSPARENCY = 0.7 ; // initialization
|
||||
|
||||
if( getenv( "G4VRML_TRANSPARENCY" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_TRANSPARENCY" ) != NULL ) {
|
||||
|
||||
// get a value from the env value
|
||||
// sscanf( getenv("G4VRML_TRANSPARENCY"), "%lg", &TRANSPARENCY ) ;
|
||||
std::istringstream iss( getenv("G4VRML_TRANSPARENCY") );
|
||||
std::istringstream iss( std::getenv("G4VRML_TRANSPARENCY") );
|
||||
iss >> TRANSPARENCY;
|
||||
|
||||
// truncation
|
||||
|
||||
Reference in New Issue
Block a user