89FRflag_in_modeling (false) ,
90flag_saving_g4_prim (false) ,
95 if ( getenv(
"G4DAWNFILE_DEST_DIR" ) == NULL ) {
96 strcpy( fG4PrimDestDir ,
"" ) ;
99 strcpy( fG4PrimDestDir , getenv(
"G4DAWNFILE_DEST_DIR" ) );
105 if ( getenv(
"G4DAWNFILE_MAX_FILE_NUM" ) != NULL ) {
107 sscanf( getenv(
"G4DAWNFILE_MAX_FILE_NUM"),
"%d", &fMaxFileNum ) ;
112 if( fMaxFileNum < 1 ) { fMaxFileNum = 1 ; }
116 if( getenv(
"G4DAWNFILE_PRECISION" ) != NULL ) {
117 sscanf( getenv(
"G4DAWNFILE_PRECISION"),
"%d", &fPrec ) ;
129#if defined DEBUG_FR_SCENE
146 const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
149 strcpy ( fG4PrimFileName, fG4PrimDestDir) ;
155 for(
int i = 0 ; i < fMaxFileNum ; i++) {
158 if( i == MAX_FILE_INDEX )
161 G4cout <<
"===========================================" <<
G4endl;
162 G4cout <<
"WARNING MESSAGE from DAWNFILE driver: " <<
G4endl;
163 G4cout <<
" This file name is the final one in the " <<
G4endl;
164 G4cout <<
" automatic updation of the output file name." <<
G4endl;
165 G4cout <<
" You may overwrite existing files, i.e. " <<
G4endl;
167 G4cout <<
"===========================================" <<
G4endl;
172 if( i >= 0 && i <= 9 ) {
173 sprintf( fG4PrimFileName,
"%s%s%s%d.prim" , fG4PrimDestDir,
G4PRIM_FILE_HEADER,
"0", i );
180 fin.open(fG4PrimFileName) ;
192 G4cout <<
"=========================================== " <<
G4endl;
194 G4cout <<
"Destination directory (current dir if NULL): " << fG4PrimDestDir <<
G4endl;
195 G4cout <<
"Maximal number of files in the destination directory: " << fMaxFileNum <<
G4endl;
197 G4cout <<
" * The maximal number is customizable as: " <<
G4endl;
198 G4cout <<
" % setenv G4DAWNFILE_MAX_FILE_NUM number " <<
G4endl;
199 G4cout <<
" * The destination directory is customizable as:" <<
G4endl;
200 G4cout <<
" % setenv G4DAWNFILE_DEST_DIR dir_name/ " <<
G4endl;
201 G4cout <<
" ** Do not forget \"/\" at the end of the " <<
G4endl;
203 G4cout <<
"=========================================== " <<
G4endl;
211#if defined DEBUG_FR_SCENE
213 G4cout <<
"***** BeginSavingG4Prim (called)\n";
218#if defined DEBUG_FR_SCENE
220 G4cout <<
"***** (started) " ;
225 fPrimDest.
Open(fG4PrimFileName) ;
228 flag_saving_g4_prim = true ;
234#if defined DEBUG_FR_SCENE
236 G4cout <<
"***** EndSavingG4Prim (called)\n";
241#if defined DEBUG_FR_SCENE
246 flag_saving_g4_prim = false ;
256#if defined DEBUG_FR_SCENE
258 G4cout <<
"***** G4DAWNFILESceneHandler::FRBeginModeling (called & started)" <<
G4endl;
268#if defined DEBUG_FR_SCENE
270 G4cout <<
"***** (!SetCamera in FRBeginModeling())" <<
G4endl;
275#if defined DEBUG_FR_SCENE
277 G4cout <<
"***** (!OpenDevice in FRBeginModeling())" <<
G4endl;
282#if defined DEBUG_FR_SCENE
284 G4cout <<
"***** (!BeginModeling in FRBeginModeling())" <<
G4endl;
297#define G4FRSCENEHANDLER G4DAWNFILESceneHandler
298#include "G4FRSceneFunc.icc"
299#undef G4FRSCENEHANDLER
306G4int G4DAWNFILESceneHandler::fSceneIdCount = 0;
const int FR_MAX_FILE_NUM
const char DEFAULT_G4PRIM_FILE_NAME[]
const char FR_ENV_CULL_INVISIBLE_OBJECTS[]
const char G4PRIM_FILE_HEADER[]
const char FR_G4_PRIM_HEADER[]
const char FR_OPEN_DEVICE[]
const char FR_BEGIN_MODELING[]
const char FR_SET_CAMERA[]
G4DLLIMPORT std::ostream G4cout
void SendBoundingBox(void)
G4bool IsSavingG4Prim(void)
void SendStr(const char *char_string)
G4DAWNFILESceneHandler(G4DAWNFILE &system, const G4String &name="")
void EndSavingG4Prim(void)
virtual ~G4DAWNFILESceneHandler()
void BeginSavingG4Prim(void)
void Open(const char *filename)
static Verbosity GetVerbosity()