Import Geant4 11.0.2 source tree

This commit is contained in:
Gabriele Cosmo
2022-05-25 15:50:57 +02:00
parent de4f28d823
commit b3bf75a2a1
341 changed files with 93127 additions and 39343 deletions
@@ -216,11 +216,12 @@ void G4LogicalVolumeStore::DeRegister(G4LogicalVolume* pVolume)
}
// ***************************************************************************
// Retrieve the first volume pointer in the container having that name
// Retrieve the first or last volume pointer in the container having that name
// ***************************************************************************
//
G4LogicalVolume*
G4LogicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4LogicalVolumeStore::GetVolume(const G4String& name, G4bool verbose,
G4bool reverseSearch) const
{
G4LogicalVolumeStore* store = GetInstance();
if (!store->mvalid) { store->UpdateMap(); }
@@ -236,7 +237,14 @@ G4LogicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4Exception("G4LogicalVolumeStore::GetVolume()",
"GeomMgt1001", JustWarning, message);
}
return pos->second[0];
if(reverseSearch)
{
return pos->second[pos->second.size()-1];
}
else
{
return pos->second[0];
}
}
if (verbose)
{
@@ -220,11 +220,12 @@ void G4PhysicalVolumeStore::DeRegister(G4VPhysicalVolume* pVolume)
}
// ***************************************************************************
// Retrieve the first volume pointer in the container having that name
// Retrieve the first or last volume pointer in the container having that name
// ***************************************************************************
//
G4VPhysicalVolume*
G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose,
G4bool reverseSearch) const
{
G4PhysicalVolumeStore* store = GetInstance();
if (!store->mvalid) { store->UpdateMap(); }
@@ -240,7 +241,14 @@ G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
G4Exception("G4PhysicalVolumeStore::GetVolume()",
"GeomMgt1001", JustWarning, message);
}
return pos->second[0];
if(reverseSearch)
{
return pos->second[pos->second.size()-1];
}
else
{
return pos->second[0];
}
}
if (verbose)
{
+11 -3
View File
@@ -215,10 +215,11 @@ void G4SolidStore::DeRegister(G4VSolid* pSolid)
}
// ***************************************************************************
// Retrieve the first solid pointer in the container having that name
// Retrieve the first or last solid pointer in the container having that name
// ***************************************************************************
//
G4VSolid* G4SolidStore::GetSolid(const G4String& name, G4bool verbose) const
G4VSolid* G4SolidStore::GetSolid(const G4String& name, G4bool verbose,
G4bool reverseSearch) const
{
G4SolidStore* store = GetInstance();
if (!store->mvalid) { store->UpdateMap(); }
@@ -234,7 +235,14 @@ G4VSolid* G4SolidStore::GetSolid(const G4String& name, G4bool verbose) const
G4Exception("G4SolidStore::GetSolid()",
"GeomMgt1001", JustWarning, message);
}
return pos->second[0];
if(reverseSearch)
{
return pos->second[pos->second.size()-1];
}
else
{
return pos->second[0];
}
}
if (verbose)
{