Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/visualization/FukuiRenderer/src/G4DAWNFILESceneHandler.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /visualization/FukuiRenderer/src/G4DAWNFILESceneHandler.cc (Version 11.3.0) and /visualization/FukuiRenderer/src/G4DAWNFILESceneHandler.cc (Version 10.6.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 //                                                 27 //
 28 // Satoshi TANAKA                                  28 // Satoshi TANAKA
 29 // DAWNFILE scene.                                 29 // DAWNFILE scene.
 30                                                    30 
                                                   >>  31 
 31 #define __G_ANSI_C__                               32 #define __G_ANSI_C__
 32                                                    33 
 33 // #define DEBUG_FR_SCENE                          34 // #define DEBUG_FR_SCENE
 34                                                    35 
 35 //----- header files                           <<  36      //----- header files
 36 #include <fstream>                                 37 #include <fstream>
 37 #include <stdlib.h>                                38 #include <stdlib.h>
 38 #include <string.h>                                39 #include <string.h>
 39 #include <sstream>                                 40 #include <sstream>
 40 #include <iomanip>                                 41 #include <iomanip>
 41 #include "globals.hh"                              42 #include "globals.hh"
 42 #include "G4VisManager.hh"                         43 #include "G4VisManager.hh"
 43 #include "G4FRConst.hh"                            44 #include "G4FRConst.hh"
 44 #include "G4DAWNFILE.hh"                           45 #include "G4DAWNFILE.hh"
 45 #include "G4DAWNFILESceneHandler.hh"               46 #include "G4DAWNFILESceneHandler.hh"
 46 #include "G4DAWNFILEViewer.hh"                     47 #include "G4DAWNFILEViewer.hh"
 47 #include "G4Point3D.hh"                            48 #include "G4Point3D.hh"
 48 #include "G4VisAttributes.hh"                      49 #include "G4VisAttributes.hh"
 49 #include "G4Scene.hh"                              50 #include "G4Scene.hh"
 50 #include "G4Transform3D.hh"                        51 #include "G4Transform3D.hh"
 51 #include "G4Polyhedron.hh"                         52 #include "G4Polyhedron.hh"
 52 #include "G4Box.hh"                                53 #include "G4Box.hh"
 53 #include "G4Cons.hh"                               54 #include "G4Cons.hh"
 54 #include "G4Polyline.hh"                           55 #include "G4Polyline.hh"
 55 #include "G4Trd.hh"                                56 #include "G4Trd.hh"
 56 #include "G4Tubs.hh"                               57 #include "G4Tubs.hh"
 57 #include "G4Trap.hh"                               58 #include "G4Trap.hh"
 58 #include "G4Torus.hh"                              59 #include "G4Torus.hh"
 59 #include "G4Sphere.hh"                             60 #include "G4Sphere.hh"
 60 #include "G4Para.hh"                               61 #include "G4Para.hh"
 61 #include "G4Text.hh"                               62 #include "G4Text.hh"
 62 #include "G4Circle.hh"                             63 #include "G4Circle.hh"
 63 #include "G4Square.hh"                             64 #include "G4Square.hh"
 64 #include "G4VPhysicalVolume.hh"                    65 #include "G4VPhysicalVolume.hh"
 65                                                    66 
 66 //----- constants                                  67 //----- constants
 67 const char FR_ENV_CULL_INVISIBLE_OBJECTS[] = " <<  68 const char  FR_ENV_CULL_INVISIBLE_OBJECTS [] = "G4DAWN_CULL_INVISIBLE_OBJECTS";
 68 const char G4PRIM_FILE_HEADER[]            = " <<  69 const char  G4PRIM_FILE_HEADER      [] = "g4_";
 69 const char DEFAULT_G4PRIM_FILE_NAME[]      = " <<  70 const char  DEFAULT_G4PRIM_FILE_NAME[] = "g4_0000.prim";
 70 const int FR_MAX_FILE_NUM = 100;               <<  71 
                                                   >>  72 // const int   FR_MAX_FILE_NUM = 1 ;
                                                   >>  73 // const int   FR_MAX_FILE_NUM = 5 ;
                                                   >>  74 // const int   FR_MAX_FILE_NUM = 10 ;
                                                   >>  75 // const int   FR_MAX_FILE_NUM = 15 ;
                                                   >>  76 // const int   FR_MAX_FILE_NUM = 20 ;
                                                   >>  77    const int   FR_MAX_FILE_NUM = 100 ;
                                                   >>  78 
 71                                                    79 
 72 ///////////////////////////                        80 ///////////////////////////
 73 // Driver-dependent part //                        81 // Driver-dependent part //
 74 ///////////////////////////                        82 ///////////////////////////
 75                                                    83 
 76 //----- G4DAWNFILESceneHandler, constructor    <<  84 
 77 G4DAWNFILESceneHandler::G4DAWNFILESceneHandler <<  85   //----- G4DAWNFILESceneHandler, constructor
 78                                                <<  86 G4DAWNFILESceneHandler::G4DAWNFILESceneHandler (G4DAWNFILE& system, const G4String& name):
 79   : G4VSceneHandler(system, fSceneIdCount++, n <<  87 G4VSceneHandler  (system, fSceneIdCount++, name) ,
 80   , fSystem(system)                            <<  88 fSystem   (system)                        ,
 81   , fPrimDest()                                <<  89 fPrimDest ()                              ,
 82   , FRflag_in_modeling(false)                  <<  90 FRflag_in_modeling     (false)            ,
 83   , flag_saving_g4_prim(false)                 <<  91 flag_saving_g4_prim    (false)            ,
 84   , COMMAND_BUF_SIZE(G4FRofstream::SEND_BUFMAX <<  92 COMMAND_BUF_SIZE       (G4FRofstream::SEND_BUFMAX),
 85   , fPrec(9)                                   <<  93 fPrec (9), fPrec2 (16)
 86   , fPrec2(16)                                 << 
 87 {                                                  94 {
 88   // g4.prim filename and its directory        <<  95   // g4.prim filename and its directory
 89   if(std::getenv("G4DAWNFILE_DEST_DIR") == NUL <<  96   if ( std::getenv( "G4DAWNFILE_DEST_DIR" ) == NULL ) {
 90   {                                            <<  97     strcpy( fG4PrimDestDir , "" )                      ;  // output dir
 91     strcpy(fG4PrimDestDir, "");                <<  98     strcpy( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME );  // filename
 92     strcpy(fG4PrimFileName, DEFAULT_G4PRIM_FIL <<  99   } else {
 93   }                                            << 100     strcpy( fG4PrimDestDir , std::getenv( "G4DAWNFILE_DEST_DIR" ) ); // output dir
 94   else                                         << 101     strcpy( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME        ); // filename 
 95   {                                            << 102   }
 96     strcpy(fG4PrimDestDir, std::getenv("G4DAWN << 103     
 97     strcpy(fG4PrimFileName, DEFAULT_G4PRIM_FIL << 104   // maximum number of g4.prim files in the dest directory
 98   }                                            << 105   fMaxFileNum = FR_MAX_FILE_NUM ; // initialization
 99                                                << 106   if ( std::getenv( "G4DAWNFILE_MAX_FILE_NUM" ) != NULL ) { 
100   // maximum number of g4.prim files in the de << 107     
101   fMaxFileNum = FR_MAX_FILE_NUM;  // initializ << 108     sscanf( std::getenv("G4DAWNFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
102   if(std::getenv("G4DAWNFILE_MAX_FILE_NUM") != << 109 
103   {                                            << 110   } else {
104     sscanf(std::getenv("G4DAWNFILE_MAX_FILE_NU << 111     fMaxFileNum = FR_MAX_FILE_NUM ;
105   }                                            << 112   }
106   else                                         << 113   if( fMaxFileNum < 1 ) { fMaxFileNum = 1 ; }
107   {                                            << 114 
108     fMaxFileNum = FR_MAX_FILE_NUM;             << 115 
109   }                                            << 116     //----- precision control
110   if(fMaxFileNum < 1)                          << 117   if( std::getenv( "G4DAWNFILE_PRECISION" ) != NULL ) {
111   {                                            << 118     sscanf( std::getenv("G4DAWNFILE_PRECISION"), "%d", &fPrec ) ;
112     fMaxFileNum = 1;                           << 119   } else {
113   }                                            << 120                 fPrec = 9 ;
114                                                << 121   }
115   //----- precision control                    << 122   fPrec2 = fPrec + 7 ;
116   if(std::getenv("G4DAWNFILE_PRECISION") != NU << 
117   {                                            << 
118     sscanf(std::getenv("G4DAWNFILE_PRECISION") << 
119   }                                            << 
120   else                                         << 
121   {                                            << 
122     fPrec = 9;                                 << 
123   }                                            << 
124   fPrec2 = fPrec + 7;                          << 
125 }                                              << 
126                                                   123 
127 //----- G4DAWNFILESceneHandler, destructor     << 124 } 
128 G4DAWNFILESceneHandler::~G4DAWNFILESceneHandle << 125 
                                                   >> 126 
                                                   >> 127   //----- G4DAWNFILESceneHandler, destructor
                                                   >> 128 G4DAWNFILESceneHandler::~G4DAWNFILESceneHandler () 
129 {                                                 129 {
130 #if defined DEBUG_FR_SCENE                        130 #if defined DEBUG_FR_SCENE
131   if(G4VisManager::GetVerbosity() >= G4VisMana << 131   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
132     G4cout << "***** ~G4DAWNFILESceneHandler"  << 132   G4cout << "***** ~G4DAWNFILESceneHandler" << G4endl;
133 #endif                                         << 133 #endif 
134   if(fPrimDest.IsOpen())                       << 134   if (fPrimDest.IsOpen()) 
135   {                                            << 135     {
136     //----- End of modeling                    << 136       //----- End of modeling
137     // !EndModeling, !DrawAll, !CloseDevice,   << 137       // !EndModeling, !DrawAll, !CloseDevice,
138     // close g4.prim                           << 138       // close g4.prim
139     FREndModeling();                           << 139     FREndModeling();
140   }                                            << 140   }
141 }                                                 141 }
142                                                   142 
143 //-----                                           143 //-----
144 void G4DAWNFILESceneHandler::SetG4PrimFileName << 144 void  G4DAWNFILESceneHandler::SetG4PrimFileName() 
145 {                                                 145 {
146   // g4_0000.prim, g4_0001.prim, ..., g4_MAX_F << 146   // g4_0000.prim, g4_0001.prim, ..., g4_MAX_FILE_INDEX.prim
147   const int MAX_FILE_INDEX = fMaxFileNum - 1;  << 147   const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
148                                                   148 
149   // dest directory (null if no environmental  << 149   // dest directory (null if no environmental variables is set)
150   strcpy(fG4PrimFileName, fG4PrimDestDir);     << 150   strcpy ( fG4PrimFileName, fG4PrimDestDir) ; 
151                                                   151 
152   // create full path name (default)           << 152   // create full path name (default)
153   strcat(fG4PrimFileName, DEFAULT_G4PRIM_FILE_ << 153   strcat ( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME );
154                                                   154 
155   // Automatic updation of file names          << 155   // Automatic updation of file names
156   for(int i = 0; i < fMaxFileNum; i++)         << 156   for( int i = 0 ; i < fMaxFileNum ; i++) { 
157   {                                            << 157 
158     // Message in the final execution          << 158     // Message in the final execution
159     if(i == MAX_FILE_INDEX)                    << 159     if( i == MAX_FILE_INDEX ) 
160     {                                          << 160     {
161       if(G4VisManager::GetVerbosity() >= G4Vis << 161       if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
162       {                                        << 162         G4cout << "==========================================="   << G4endl; 
163         G4cout << "=========================== << 163         G4cout << "WARNING MESSAGE from DAWNFILE driver:      "   << G4endl;
164         G4cout << "WARNING MESSAGE from DAWNFI << 164         G4cout << "  This file name is the final one in the   "   << G4endl;
165         G4cout << "  This file name is the fin << 165         G4cout << "  automatic updation of the output file name." << G4endl; 
166         G4cout << "  automatic updation of the << 166         G4cout << "  You may overwrite existing files, i.e.   "   << G4endl; 
167         G4cout << "  You may overwrite existin << 167         G4cout << "  g4_XXXX.prim and g4_XXXX.eps             "   << G4endl;
168         G4cout << "  g4_XXXX.prim and g4_XXXX. << 168         G4cout << "==========================================="   << G4endl; 
169         G4cout << "=========================== << 169       }
170       }                                        << 170     }
171     }                                          << 171 
172                                                << 172     // re-determine file name as G4DAWNFILE_DEST_DIR/g4_XXXX.prim
173     // re-determine file name as G4DAWNFILE_DE << 173     std::ostringstream filename; filename
174     std::ostringstream filename;               << 174     << fG4PrimDestDir << G4PRIM_FILE_HEADER
175     filename << fG4PrimDestDir << G4PRIM_FILE_ << 175     << std::setw(4) << std::setfill('0') << i << ".prim";
176              << std::setfill('0') << i << ".pr << 176     strncpy(fG4PrimFileName,filename.str().c_str(),sizeof(fG4PrimFileName)-1);
177     strncpy(fG4PrimFileName, filename.str().c_ << 177                 fG4PrimFileName[sizeof(fG4PrimFileName)-1] = '\0';
178             sizeof(fG4PrimFileName) - 1);      << 178 
179     fG4PrimFileName[sizeof(fG4PrimFileName) -  << 179     // check validity of the file name
180                                                << 180     std::ifstream  fin ; 
181     // check validity of the file name         << 181     fin.open(fG4PrimFileName) ;
182     std::ifstream fin;                         << 182     if(!fin) { 
183     fin.open(fG4PrimFileName);                 << 183       // new file 
184     if(!fin)                                   << 184       fin.close();  
185     {                                          << 185       break; 
186       // new file                              << 186     } else { 
187       fin.close();                             << 187       // already exists (try next) 
188       break;                                   << 188       fin.close(); 
189     }                                          << 189     } 
190     else                                       << 190 
191     {                                          << 191   } // for 
192       // already exists (try next)             << 192 
193       fin.close();                             << 193   G4cout << "===========================================    " << G4endl; 
194     }                                          << 194   G4cout << "Output file: " <<    fG4PrimFileName             << G4endl; 
195                                                << 195   G4cout << "Destination directory (current dir if NULL): "       << fG4PrimDestDir    << G4endl; 
196   }  // for                                    << 196   G4cout << "Maximal number of files in the destination directory: " << fMaxFileNum << G4endl; 
197                                                << 197   G4cout << "Note:                                                " << G4endl; 
198   G4cout << "================================= << 198   G4cout << "  * The maximal number is customizable as:           " << G4endl;
199   G4cout << "Output file: " << fG4PrimFileName << 199   G4cout << "       % setenv  G4DAWNFILE_MAX_FILE_NUM  number " << G4endl;        
200   G4cout << "Destination directory (current di << 200   G4cout << "  * The destination directory is customizable as:" << G4endl;
201          << G4endl;                            << 201   G4cout << "       % setenv  G4DAWNFILE_DEST_DIR  dir_name/  " << G4endl;        
202   G4cout << "Maximal number of files in the de << 202   G4cout << "     ** Do not forget \"/\" at the end of the    " << G4endl;              
203          << fMaxFileNum << G4endl;             << 203   G4cout << "        dir_name, e.g. \"./tmp/\".  " << G4endl;              
204   G4cout << "Note:                             << 204   G4cout << "===========================================      " << G4endl; 
205   G4cout << "  * The maximal number is customi << 205 
206   G4cout << "       % setenv  G4DAWNFILE_MAX_F << 206 } // G4DAWNFILESceneHandler::SetG4PrimFileName()
207   G4cout << "  * The destination directory is  << 
208   G4cout << "       % setenv  G4DAWNFILE_DEST_ << 
209   G4cout << "     ** Do not forget \"/\" at th << 
210   G4cout << "        dir_name, e.g. \"./tmp/\" << 
211   G4cout << "================================= << 
212                                                   207 
213 }  // G4DAWNFILESceneHandler::SetG4PrimFileNam << 
214                                                   208 
215 //-----                                           209 //-----
216 void G4DAWNFILESceneHandler::BeginSavingG4Prim << 210 void  G4DAWNFILESceneHandler::BeginSavingG4Prim( void ) 
217 {                                                 211 {
218 #if defined DEBUG_FR_SCENE                        212 #if defined DEBUG_FR_SCENE
219   if(G4VisManager::GetVerbosity() >= G4VisMana << 213   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
220     G4cout << "***** BeginSavingG4Prim (called << 214   G4cout << "***** BeginSavingG4Prim (called)\n";
221 #endif                                            215 #endif
222                                                   216 
223   if(!IsSavingG4Prim())                        << 217   if( !IsSavingG4Prim() ) 
224   {                                            << 218   { 
225 #if defined DEBUG_FR_SCENE                        219 #if defined DEBUG_FR_SCENE
226     if(G4VisManager::GetVerbosity() >= G4VisMa << 220     if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
227     {                                          << 221           G4cout << "*****                   (started) " ;
228       G4cout << "*****                   (star << 222           G4cout << "(open g4.prim, ##)"  << G4endl;
229       G4cout << "(open g4.prim, ##)" << G4endl << 223     }
230     }                                          << 
231 #endif                                            224 #endif
232     SetG4PrimFileName();  // result set to fG4 << 225     SetG4PrimFileName() ; // result set to fG4PrimFileName
233     fPrimDest.Open(fG4PrimFileName);           << 226     fPrimDest.Open(fG4PrimFileName)   ;
234                                                   227 
235     SendStr(FR_G4_PRIM_HEADER);                << 228     SendStr( FR_G4_PRIM_HEADER   )    ; 
236     flag_saving_g4_prim = true;                << 229     flag_saving_g4_prim = true        ; 
237   }                                            << 230   } 
238 }                                                 231 }
239                                                   232 
240 void G4DAWNFILESceneHandler::EndSavingG4Prim(v << 233 void  G4DAWNFILESceneHandler::EndSavingG4Prim  ( void ) 
241 {                                                 234 {
242 #if defined DEBUG_FR_SCENE                        235 #if defined DEBUG_FR_SCENE
243   if(G4VisManager::GetVerbosity() >= G4VisMana << 236   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
244     G4cout << "***** EndSavingG4Prim (called)\ << 237   G4cout << "***** EndSavingG4Prim (called)\n";
245 #endif                                            238 #endif
246                                                   239 
247   if(IsSavingG4Prim())                         << 240   if(  IsSavingG4Prim() )
248   {                                            << 241   {
249 #if defined DEBUG_FR_SCENE                        242 #if defined DEBUG_FR_SCENE
250     if(G4VisManager::GetVerbosity() >= G4VisMa << 243     if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
251       G4cout << "*****                 (starte << 244       G4cout << "*****                 (started) (close g4.prim)" << G4endl;
252 #endif                                            245 #endif
253     fPrimDest.Close();                         << 246     fPrimDest.Close()               ;
254     flag_saving_g4_prim = false;               << 247     flag_saving_g4_prim = false ; 
255   }                                            << 248   } 
256 }                                                 249 }
257                                                   250 
258 //-----                                        << 251 
259 void G4DAWNFILESceneHandler::FRBeginModeling(v << 252 //----- 
                                                   >> 253 void G4DAWNFILESceneHandler::FRBeginModeling( void )
260 {                                                 254 {
261   if(!FRIsInModeling())                        << 255   if( !FRIsInModeling() )   
262   {                                            << 256   {
263 #if defined DEBUG_FR_SCENE                        257 #if defined DEBUG_FR_SCENE
264     if(G4VisManager::GetVerbosity() >= G4VisMa << 258     if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
265       G4cout                                   << 259       G4cout << "***** G4DAWNFILESceneHandler::FRBeginModeling (called & started)" << G4endl;
266         << "***** G4DAWNFILESceneHandler::FRBe << 
267         << G4endl;                             << 
268 #endif                                            260 #endif
269                                                   261 
270     //----- Send saving command and heading co << 262       //----- Send saving command and heading comment
271     BeginSavingG4Prim();                       << 263     BeginSavingG4Prim();
272                                                   264 
273     //----- Send bounding box command          << 265       //----- Send bounding box command
274     SendBoundingBox();                         << 266     SendBoundingBox();
275                                                   267 
276     //----- send SET_CAMERA command            << 268       //----- send SET_CAMERA command 
277 #if defined DEBUG_FR_SCENE                        269 #if defined DEBUG_FR_SCENE
278     if(G4VisManager::GetVerbosity() >= G4VisMa << 270     if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
279       G4cout << "*****   (!SetCamera in FRBegi << 271       G4cout << "*****   (!SetCamera in FRBeginModeling())" << G4endl;
280 #endif                                            272 #endif
281     SendStr(FR_SET_CAMERA);                    << 273     SendStr( FR_SET_CAMERA );
282                                                   274 
283     //----- open device                        << 275     //----- open device
284 #if defined DEBUG_FR_SCENE                        276 #if defined DEBUG_FR_SCENE
285     if(G4VisManager::GetVerbosity() >= G4VisMa << 277     if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
286       G4cout << "*****   (!OpenDevice in FRBeg << 278       G4cout << "*****   (!OpenDevice in FRBeginModeling())" << G4endl;
287 #endif                                            279 #endif
288     SendStr(FR_OPEN_DEVICE);                   << 280     SendStr( FR_OPEN_DEVICE      );
289                                                   281 
290     //----- begin sending primitives           << 282     //----- begin sending primitives
291 #if defined DEBUG_FR_SCENE                        283 #if defined DEBUG_FR_SCENE
292     if(G4VisManager::GetVerbosity() >= G4VisMa << 284     if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
293       G4cout << "*****   (!BeginModeling in FR << 285       G4cout << "*****   (!BeginModeling in FRBeginModeling())" << G4endl;
294 #endif                                            286 #endif
295     SendStr(FR_BEGIN_MODELING);                << 287     SendStr( FR_BEGIN_MODELING );  FRflag_in_modeling = true ;
296     FRflag_in_modeling = true;                 << 288 
                                                   >> 289   } // if
                                                   >> 290 
                                                   >> 291 } 
297                                                   292 
298   }  // if                                     << 
299 }                                              << 
300                                                   293 
301 /////////////////////////////////////////         294 /////////////////////////////////////////
302 // Common to DAWN and DAWNFILE drivers //         295 // Common to DAWN and DAWNFILE drivers //
303 /////////////////////////////////////////         296 /////////////////////////////////////////
304                                                   297 
305 #define G4FRSCENEHANDLER G4DAWNFILESceneHandle << 298 #define  G4FRSCENEHANDLER  G4DAWNFILESceneHandler
306 #include "G4FRSceneFunc.icc"                      299 #include "G4FRSceneFunc.icc"
307 #undef G4FRSCENEHANDLER                        << 300 #undef   G4FRSCENEHANDLER 
308                                                   301 
309 //////////////////////                            302 //////////////////////
310 // static variables //                            303 // static variables //
311 //////////////////////                            304 //////////////////////
312                                                   305 
313 //----- static variables                       << 306   //----- static variables
314 G4int G4DAWNFILESceneHandler::fSceneIdCount =  << 307 G4int G4DAWNFILESceneHandler::fSceneIdCount = 0; 
315                                                   308