Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SolidStore.cc,v 1.16 2006/11/30 10:39:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4SolidStore.cc,v 1.17 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G4SolidStore
|
||||
//
|
||||
@@ -152,6 +152,27 @@ void G4SolidStore::DeRegister(G4VSolid* pSolid)
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Retrieve the first solid pointer in the container having that name
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4VSolid* G4SolidStore::GetSolid(const G4String& name, G4bool verbose) const
|
||||
{
|
||||
for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
|
||||
{
|
||||
if ((*i)->GetName() == name) { return *i; }
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
G4cerr << "ERROR - G4SolidStore::GetSolid()" << G4endl
|
||||
<< " Solid " << name << " not found in store !" << G4endl
|
||||
<< " Returning NULL pointer." << G4endl;
|
||||
G4Exception("G4SolidStore::GetSolid()", "InvalidQuery",
|
||||
JustWarning, "Solid NOT found in store !");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Return ptr to Store, setting if necessary
|
||||
// ***************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user