Import Geant4 11.1.2 source tree
This commit is contained in:
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-03-22 Gabriele Cosmo (geommng-V11-00-11)
|
||||
- G4Region: issue fatal exception if attempting to add a root logical volume
|
||||
which is already set as root for another region.
|
||||
|
||||
## 2023-01-09 Gabriele Cosmo (geommng-V11-00-10)
|
||||
- G4LogicalVolume: use std::shared_ptr for handling visualization attributes.
|
||||
Ignore calls to SetVisAttributes() from worker threads.
|
||||
|
||||
@@ -292,6 +292,20 @@ void G4Region::ScanVolumeTree(G4LogicalVolume* lv, G4bool region)
|
||||
//
|
||||
void G4Region::AddRootLogicalVolume(G4LogicalVolume* lv, G4bool search)
|
||||
{
|
||||
// Check if logical volume is already belonging to another region
|
||||
//
|
||||
if ((lv->IsRootRegion()) && (lv->GetRegion() != this))
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Logical volume <" << lv->GetName() << "> is already set as" << G4endl
|
||||
<< "root for region <" << lv->GetRegion()->GetName() << ">." << G4endl
|
||||
<< "It cannot be root logical volume for another region <" << GetName()
|
||||
<< ">" << G4endl;
|
||||
G4Exception("G4Region::AddRootLogicalVolume()", "GeomMgt0002", FatalException,
|
||||
message, "A logical volume cannot belong to more than one region!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the logical volume is not already in the list
|
||||
//
|
||||
if (search)
|
||||
|
||||
Reference in New Issue
Block a user