59{
60 G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
61
62 G4RunManager::GetRunManager()->SetRandomNumberStore(true);
63 G4RunManager::GetRunManager()->SetRandomNumberStoreDir("random/");
64
66
67 G4cout << "*******************" << G4endl;
68 G4cout << "*** AUTOSEED ON ***" << G4endl;
69 G4cout << "*******************" << G4endl;
70 long seeds[2];
71 time_t systime = time(nullptr);
72 seeds[0] = (long) systime;
73 seeds[1] = (long) (systime*G4UniformRand());
74 G4Random::setTheSeeds(seeds);
75 G4Random::showEngineStatus();
76 } else {
77 G4Random::showEngineStatus();
78 }
79
81 {
82 std::ostringstream os;
83 os<<"beginOfRun_"<<G4Threading::G4GetThreadId()<<".rndm";
84 G4Random::saveEngineStatus(os.str().c_str());
85 }
86}