From 871f55822edf3886d556bfdab0fa5bbc3672177f Mon Sep 17 00:00:00 2001 From: ivana Date: Mon, 9 Oct 2000 11:06:11 +0000 Subject: [PATCH] added call to TG4GeometryManager to CloseOutFile(); added protection from reading geometry from file (exception) --- AliGeant4/AliMoreModulesConstruction.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/AliGeant4/AliMoreModulesConstruction.cxx b/AliGeant4/AliMoreModulesConstruction.cxx index 64fa1fb145f..d3a7f7a5e78 100644 --- a/AliGeant4/AliMoreModulesConstruction.cxx +++ b/AliGeant4/AliMoreModulesConstruction.cxx @@ -182,9 +182,17 @@ void AliMoreModulesConstruction::Construct() G4String dataFilePath = fModuleConstructionVector[i]->GetDataFilePath(); if (readGeometry) { - // create G3 geometry from g3calls.dat - pGeometryManager->SetWriteGeometry(false); - pGeometryManager->ReadG3Geometry(dataFilePath); + // TG4GeometryManager uses g3tog4 methods for reading + // g3calls.dat files - as these methods do not fill name map + // they cannot be used for constructing more modules + // together + // + // pGeometryManager->SetWriteGeometry(false); + // pGeometryManager->ReadG3Geometry(dataFilePath); + + G4String text = "AliMoreModulesConstruction::Construct - Limitation:\n"; + text = text + " Reading g3calls.dat is not implemented."; + AliGlobals::Exception(text); } else { // set geometry output stream for this module @@ -199,6 +207,9 @@ void AliMoreModulesConstruction::Construct() // construct G3 geometry module->CreateGeometry(); + + if (writeGeometry) + pGeometryManager->CloseOutFile(); } // all logical volumes will be made sensitive if any -- 2.43.0