Changeset 1315 for trunk/source/run
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- Location:
- trunk/source/run
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/run/History
r1196 r1315 1 $Id: History,v 1.19 1 2009/11/18 18:02:06gcosmo Exp $1 $Id: History,v 1.194 2010/06/11 09:03:14 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 June 10th, 2010 G.Cosmo (run-V09-03-01) 21 - Fixed definition of path for Windows in G4RunManager for random seeds 22 directory: use '\' instead of '/' and suitable system command. 23 - Use "const G4String&" as arguments and return value wherever applicable 24 in G4RunManager and G4RunManagerKernel. 25 26 May 30th, 2010 M.Asai (run-V09-03-00) 27 - Tag for v9.4-beta release 28 29 May 11th, 2010 J.Allison 30 - Correct printing of number of events processed on run abortion. 19 31 20 32 November 18th, 2009 G.Cosmo (run-V09-02-09) -
trunk/source/run/include/G4RunManager.hh
r1196 r1315 25 25 // 26 26 // 27 // $Id: G4RunManager.hh,v 1.5 2 2009/11/13 23:14:46 asaimExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: G4RunManager.hh,v 1.53 2010/06/11 09:02:14 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 92 92 #include "globals.hh" 93 93 #include <vector> 94 #include < stdlib.h>94 #include <algorithm> 95 95 96 96 class G4RunManager … … 202 202 // the user needs not invoke. 203 203 204 void DumpRegion( G4Stringrname) const;204 void DumpRegion(const G4String& rname) const; 205 205 // Dump information of a region. 206 206 … … 260 260 virtual void rndmSaveThisRun(); 261 261 virtual void rndmSaveThisEvent(); 262 virtual void RestoreRandomNumberStatus( G4StringfileN);262 virtual void RestoreRandomNumberStatus(const G4String& fileN); 263 263 264 264 public: // with description … … 320 320 // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack. 321 321 322 inline G4StringGetVersionString() const322 inline const G4String& GetVersionString() const 323 323 { return kernel->GetVersionString(); } 324 324 … … 343 343 inline G4bool GetRandomNumberStore() const 344 344 { return storeRandomNumberStatus; } 345 inline void SetRandomNumberStoreDir( G4Stringdir)345 inline void SetRandomNumberStoreDir(const G4String& dir) 346 346 { 347 347 G4String dirStr = dir; 348 348 if( dirStr(dirStr.length()-1) != '/' ) dirStr += "/"; 349 #ifndef WIN32 350 G4String shellCmd = "mkdir -p "; 351 #else 352 std::replace(dirStr.begin(), dirStr.end(),'/','\\'); 353 G4String shellCmd = "mkdir "; 354 #endif 355 shellCmd += dirStr; 349 356 randomNumberStatusDir = dirStr; 350 G4String shellCmd = "mkdir -p ";351 shellCmd += dirStr;352 357 system(shellCmd); 353 358 } 354 inline G4StringGetRandomNumberStoreDir() const359 inline const G4String& GetRandomNumberStoreDir() const 355 360 { return randomNumberStatusDir; } 356 361 inline const G4String& GetRandomNumberStatusForThisRun() const -
trunk/source/run/include/G4RunManagerKernel.hh
r1058 r1315 25 25 // 26 26 // 27 // $Id: G4RunManagerKernel.hh,v 1. 9 2007/05/30 00:42:09 asaimExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4RunManagerKernel.hh,v 1.10 2010/06/11 09:02:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 86 86 public: // with description 87 87 void DefineWorldVolume(G4VPhysicalVolume * worldVol, 88 88 G4bool topologyIsChanged=true); 89 89 // This method must be invoked if the geometry setup has been changed between 90 90 // runs. The flag 'topologyIsChanged' will specify if the geometry topology is … … 121 121 // the user needs not invoke. 122 122 123 void DumpRegion( G4Stringrname) const;123 void DumpRegion(const G4String& rname) const; 124 124 // Dump information of a region. 125 125 … … 170 170 { return eventManager->GetPrimaryTransformer(); } 171 171 172 inline G4StringGetVersionString() const172 inline const G4String& GetVersionString() const 173 173 { return versionString; } 174 174 -
trunk/source/run/src/G4RunManager.cc
r1058 r1315 25 25 // 26 26 // 27 // $Id: G4RunManager.cc,v 1.1 08 2007/11/09 13:57:39 asaimExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4RunManager.cc,v 1.110 2010/06/11 09:02:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 137 137 numberOfEventToBeProcessed = n_event; 138 138 ConstructScoringWorlds(); 139 printf("G4RunManager::BeamOn before INIT\n");140 139 RunInitialization(); 141 printf("G4RunManager::BeamOn after INIT\n");142 140 if(n_event>0) DoEventLoop(n_event,macroFile,n_select); 143 printf("G4RunManager::BeamOn before END\n");144 141 RunTermination(); 145 printf("G4RunManager::BeamOn after END\n");146 142 } 147 143 } … … 236 232 for( i_event=0; i_event<n_event; i_event++ ) 237 233 { 238 printf("1\n");239 234 currentEvent = GenerateEvent(i_event); 240 printf("2\n");241 235 eventManager->ProcessOneEvent(currentEvent); 242 printf("3\n");243 236 AnalyzeEvent(currentEvent); 244 printf("4\n");245 237 UpdateScoring(); 246 printf("5\n");247 238 if(i_event<n_select) G4UImanager::GetUIpointer()->ApplyCommand(msg); 248 printf("6\n");249 239 StackPreviousEvent(currentEvent); 250 printf("7\n");251 240 currentEvent = 0; 252 printf("8\n");253 241 if(runAborted) break; 254 printf("9\n");255 242 } 256 243 … … 261 248 G4cout << "Run Summary" << G4endl; 262 249 if(runAborted) 263 { G4cout << " Run Aborted after " << i_event << " events processed." << G4endl; }250 { G4cout << " Run Aborted after " << i_event + 1 << " events processed." << G4endl; } 264 251 else 265 252 { G4cout << " Number of events processed : " << n_event << G4endl; } … … 467 454 } 468 455 469 void G4RunManager::RestoreRandomNumberStatus( G4StringfileN)456 void G4RunManager::RestoreRandomNumberStatus(const G4String& fileN) 470 457 { 471 458 G4String fileNameWithDirectory; … … 481 468 } 482 469 483 void G4RunManager::DumpRegion( G4Stringrname) const470 void G4RunManager::DumpRegion(const G4String& rname) const 484 471 { 485 472 kernel->UpdateRegion(); -
trunk/source/run/src/G4RunManagerKernel.cc
r1196 r1315 25 25 // 26 26 // 27 // $Id: G4RunManagerKernel.cc,v 1.4 7 2009/11/13 23:13:40 asaimExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: G4RunManagerKernel.cc,v 1.48 2010/06/11 09:02:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 431 431 } 432 432 433 void G4RunManagerKernel::DumpRegion( G4Stringrname) const433 void G4RunManagerKernel::DumpRegion(const G4String& rname) const 434 434 { 435 435 G4Region* region = G4RegionStore::GetInstance()->GetRegion(rname);
Note: See TracChangeset
for help on using the changeset viewer.