Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
@@ -170,9 +170,17 @@ std::shared_ptr<FT> G4TFileManager<FT>::CreateTFile(const G4String& fileName)
{
// Check if file already exists
if ( GetFileInFunction(fileName, "CreateTFile", false) ) {
G4Analysis::Warn("File " + fileName + " already exists.",
fkClass, "CreateTFile");
return nullptr;
// Do not issue the warning if cycle > 0
if (fAMState.GetCycle() == 0) {
G4Analysis::Warn("File " + fileName + " already exists.",
fkClass, "CreateTFile");
return nullptr;
}
else {
return GetFileInFunction(fileName, "CreateTFile", false);
// should we also update fileInformation ??
}
}
auto fileInformation = GetFileInfoInFunction(fileName, "CreateTFile", false);