Changeset 1347 for trunk/source/persistency
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (15 years ago)
- Location:
- trunk/source/persistency
- Files:
-
- 122 edited
-
ascii/GNUmakefile (modified) (1 diff)
-
ascii/History (modified) (2 diffs)
-
ascii/include/G4tgbDetectorBuilder.hh (modified) (1 diff)
-
ascii/include/G4tgbDetectorConstruction.hh (modified) (1 diff)
-
ascii/include/G4tgbElement.hh (modified) (1 diff)
-
ascii/include/G4tgbIsotope.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterial.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialMgr.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialMixture.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialMixtureByNoAtoms.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialMixtureByVolume.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialMixtureByWeight.hh (modified) (1 diff)
-
ascii/include/G4tgbMaterialSimple.hh (modified) (1 diff)
-
ascii/include/G4tgbPlaceParamCircle.hh (modified) (1 diff)
-
ascii/include/G4tgbPlaceParamLinear.hh (modified) (1 diff)
-
ascii/include/G4tgbPlaceParamSquare.hh (modified) (1 diff)
-
ascii/include/G4tgbPlaceParameterisation.hh (modified) (1 diff)
-
ascii/include/G4tgbRotationMatrix.hh (modified) (1 diff)
-
ascii/include/G4tgbRotationMatrixMgr.hh (modified) (1 diff)
-
ascii/include/G4tgbVolume.hh (modified) (1 diff)
-
ascii/include/G4tgbVolumeMgr.hh (modified) (1 diff)
-
ascii/include/G4tgrElement.hh (modified) (1 diff)
-
ascii/include/G4tgrElementFromIsotopes.hh (modified) (1 diff)
-
ascii/include/G4tgrElementSimple.hh (modified) (1 diff)
-
ascii/include/G4tgrEvaluator.hh (modified) (1 diff)
-
ascii/include/G4tgrFileIn.hh (modified) (2 diffs)
-
ascii/include/G4tgrFileReader.hh (modified) (1 diff)
-
ascii/include/G4tgrIsotope.hh (modified) (1 diff)
-
ascii/include/G4tgrLineProcessor.hh (modified) (1 diff)
-
ascii/include/G4tgrMaterial.hh (modified) (1 diff)
-
ascii/include/G4tgrMaterialFactory.hh (modified) (1 diff)
-
ascii/include/G4tgrMaterialMixture.hh (modified) (1 diff)
-
ascii/include/G4tgrMaterialSimple.hh (modified) (1 diff)
-
ascii/include/G4tgrMessenger.hh (modified) (1 diff)
-
ascii/include/G4tgrParameterMgr.hh (modified) (1 diff)
-
ascii/include/G4tgrPlace.hh (modified) (1 diff)
-
ascii/include/G4tgrPlaceDivRep.hh (modified) (1 diff)
-
ascii/include/G4tgrPlaceParameterisation.hh (modified) (1 diff)
-
ascii/include/G4tgrPlaceSimple.hh (modified) (1 diff)
-
ascii/include/G4tgrRotationMatrix.hh (modified) (1 diff)
-
ascii/include/G4tgrRotationMatrixFactory.hh (modified) (1 diff)
-
ascii/include/G4tgrSolid.hh (modified) (1 diff)
-
ascii/include/G4tgrSolidBoolean.hh (modified) (1 diff)
-
ascii/include/G4tgrUtils.hh (modified) (2 diffs)
-
ascii/include/G4tgrVolume.hh (modified) (1 diff)
-
ascii/include/G4tgrVolumeAssembly.hh (modified) (1 diff)
-
ascii/include/G4tgrVolumeDivision.hh (modified) (1 diff)
-
ascii/include/G4tgrVolumeMgr.hh (modified) (2 diffs)
-
ascii/src/G4tgbDetectorBuilder.cc (modified) (1 diff)
-
ascii/src/G4tgbDetectorConstruction.cc (modified) (1 diff)
-
ascii/src/G4tgbElement.cc (modified) (1 diff)
-
ascii/src/G4tgbGeometryDumper.cc (modified) (7 diffs)
-
ascii/src/G4tgbIsotope.cc (modified) (2 diffs)
-
ascii/src/G4tgbMaterial.cc (modified) (3 diffs)
-
ascii/src/G4tgbMaterialMgr.cc (modified) (2 diffs)
-
ascii/src/G4tgbMaterialMixture.cc (modified) (1 diff)
-
ascii/src/G4tgbMaterialMixtureByNoAtoms.cc (modified) (1 diff)
-
ascii/src/G4tgbMaterialMixtureByVolume.cc (modified) (1 diff)
-
ascii/src/G4tgbMaterialMixtureByWeight.cc (modified) (1 diff)
-
ascii/src/G4tgbMaterialSimple.cc (modified) (2 diffs)
-
ascii/src/G4tgbPlaceParamCircle.cc (modified) (1 diff)
-
ascii/src/G4tgbPlaceParamLinear.cc (modified) (1 diff)
-
ascii/src/G4tgbPlaceParamSquare.cc (modified) (1 diff)
-
ascii/src/G4tgbPlaceParameterisation.cc (modified) (3 diffs)
-
ascii/src/G4tgbRotationMatrix.cc (modified) (3 diffs)
-
ascii/src/G4tgbRotationMatrixMgr.cc (modified) (1 diff)
-
ascii/src/G4tgbVolume.cc (modified) (16 diffs)
-
ascii/src/G4tgbVolumeMgr.cc (modified) (4 diffs)
-
ascii/src/G4tgrElement.cc (modified) (1 diff)
-
ascii/src/G4tgrElementFromIsotopes.cc (modified) (2 diffs)
-
ascii/src/G4tgrElementSimple.cc (modified) (2 diffs)
-
ascii/src/G4tgrEvaluator.cc (modified) (1 diff)
-
ascii/src/G4tgrFileIn.cc (modified) (5 diffs)
-
ascii/src/G4tgrFileReader.cc (modified) (2 diffs)
-
ascii/src/G4tgrIsotope.cc (modified) (2 diffs)
-
ascii/src/G4tgrLineProcessor.cc (modified) (1 diff)
-
ascii/src/G4tgrMaterial.cc (modified) (2 diffs)
-
ascii/src/G4tgrMaterialFactory.cc (modified) (1 diff)
-
ascii/src/G4tgrMaterialMixture.cc (modified) (1 diff)
-
ascii/src/G4tgrMaterialSimple.cc (modified) (2 diffs)
-
ascii/src/G4tgrMessenger.cc (modified) (1 diff)
-
ascii/src/G4tgrParameterMgr.cc (modified) (1 diff)
-
ascii/src/G4tgrPlace.cc (modified) (2 diffs)
-
ascii/src/G4tgrPlaceDivRep.cc (modified) (2 diffs)
-
ascii/src/G4tgrPlaceParameterisation.cc (modified) (1 diff)
-
ascii/src/G4tgrPlaceSimple.cc (modified) (1 diff)
-
ascii/src/G4tgrRotationMatrix.cc (modified) (3 diffs)
-
ascii/src/G4tgrRotationMatrixFactory.cc (modified) (1 diff)
-
ascii/src/G4tgrSolid.cc (modified) (1 diff)
-
ascii/src/G4tgrSolidBoolean.cc (modified) (1 diff)
-
ascii/src/G4tgrUtils.cc (modified) (7 diffs)
-
ascii/src/G4tgrVolume.cc (modified) (4 diffs)
-
ascii/src/G4tgrVolumeAssembly.cc (modified) (1 diff)
-
ascii/src/G4tgrVolumeDivision.cc (modified) (1 diff)
-
ascii/src/G4tgrVolumeMgr.cc (modified) (2 diffs)
-
gdml/GNUmakefile (modified) (2 diffs)
-
gdml/History (modified) (2 diffs)
-
gdml/include/G4GDMLEvaluator.hh (modified) (2 diffs)
-
gdml/include/G4GDMLParameterisation.hh (modified) (2 diffs)
-
gdml/include/G4GDMLParser.hh (modified) (6 diffs)
-
gdml/include/G4GDMLParser.icc (modified) (8 diffs)
-
gdml/include/G4GDMLRead.hh (modified) (2 diffs)
-
gdml/include/G4GDMLReadStructure.hh (modified) (4 diffs)
-
gdml/src/G4GDMLEvaluator.cc (modified) (3 diffs)
-
gdml/src/G4GDMLParser.cc (modified) (5 diffs)
-
gdml/src/G4GDMLRead.cc (modified) (8 diffs)
-
gdml/src/G4GDMLReadDefine.cc (modified) (13 diffs)
-
gdml/src/G4GDMLReadMaterials.cc (modified) (18 diffs)
-
gdml/src/G4GDMLReadParamvol.cc (modified) (17 diffs)
-
gdml/src/G4GDMLReadSetup.cc (modified) (3 diffs)
-
gdml/src/G4GDMLReadSolids.cc (modified) (40 diffs)
-
gdml/src/G4GDMLReadStructure.cc (modified) (29 diffs)
-
gdml/src/G4GDMLWrite.cc (modified) (7 diffs)
-
gdml/src/G4GDMLWriteDefine.cc (modified) (2 diffs)
-
gdml/src/G4GDMLWriteMaterials.cc (modified) (2 diffs)
-
gdml/src/G4GDMLWriteSolids.cc (modified) (2 diffs)
-
gdml/src/G4GDMLWriteStructure.cc (modified) (5 diffs)
-
gdml/src/G4STRead.cc (modified) (2 diffs)
-
mctruth/include/G4PersistencyCenter.hh (modified) (1 diff)
-
mctruth/src/G4MCTSimParticle.cc (modified) (1 diff)
-
mctruth/src/G4MCTSimVertex.cc (modified) (1 diff)
-
mctruth/src/G4PersistencyCenter.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/persistency/ascii/GNUmakefile
r1035 r1347 1 # $Id: GNUmakefile,v 1. 3 2008/11/21 16:27:42gcosmo Exp $1 # $Id: GNUmakefile,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 2 2 # ----------------------------------------------------------------------- 3 3 # GNUmakefile for persistency library. Gabriele Cosmo, 16/11/96. -
trunk/source/persistency/ascii/History
r1337 r1347 1 $Id: History,v 1.1 4 2010/06/14 15:09:34 gcosmoExp $1 $Id: History,v 1.19 2010/12/15 11:32:48 arce Exp $ 2 2 ------------------------------------------------------------------- 3 3 ========================================================= … … 16 16 * Reverse chronological order (last date on top), please * 17 17 ---------------------------------------------------------- 18 19 15 December, 10 P.Arce (ascii-V09-03-05) 20 - Introduced fixes for Coverity reports... 21 22 7 November, 10 G.Cosmo (ascii-V09-03-04) 23 - Removed wrong assumption for NULL pointer condition previously introduced 24 in G4tgbVolume. Fixes crash in example P03. 25 26 2 November, 10 G.Cosmo (ascii-V09-03-03) 27 - Fixed minor left Coverity reports. 28 29 13 October, 10 G.Cosmo (ascii-V09-03-02) 30 - Synchronised HEAD revision with current production code. 31 - Added missing static data initialisation to constructors in G4tgrFileIn, 32 G4tgbGeometryDumper, G4tgbIsotope, G4tgbMaterial, G4tgbMaterialSimple, 33 G4tgbPlaceParameterisation, G4tgbVolume, G4tgrElementFromIsotopes, 34 G4tgrElementSimple, G4tgrIsotope, G4tgrMaterial, G4tgrMaterialSimple, 35 G4tgrPlace, G4tgrPlaceDivRep, G4tgrRotationMatrix, G4tgrVolume. 36 - Fixed potential cases of dereferencing a NULL pointer in G4tgbMaterialMgr, 37 - Fixed cases of unreachable code in G4tbrVolumeMgr. 38 - Fixed leaks in G4tgrFileReader. 39 - G4tgrUtils: fixed logic in WordIsUnit() and fixed restoring of cout 40 precision in Dump3v(). 41 42 3 September, 10 G.Cosmo (ascii-V09-03-01) 43 - Fixed signature for std::map in G4tgrVolumeMgr.hh.. 44 - Added missing inclusion of <sstream> header in G4tgrFileIn.cc. 18 45 19 46 14 June, 10 G.Cosmo (ascii-V09-03-00) -
trunk/source/persistency/ascii/include/G4tgbDetectorBuilder.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbDetectorBuilder.hh,v 1. 2.6.1 2010/06/14 15:09:19gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbDetectorBuilder.hh,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbDetectorConstruction.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbDetectorConstruction.hh,v 1. 2 2008/12/18 12:58:02 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbDetectorConstruction.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbElement.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbElement.hh,v 1. 2 2008/12/18 12:58:04 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbElement.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbIsotope.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbIsotope.hh,v 1. 2 2008/12/18 12:58:06 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbIsotope.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterial.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterial.hh,v 1. 5 2008/12/18 12:58:08 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterial.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialMgr.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMgr.hh,v 1. 4 2008/12/18 12:58:10 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMgr.hh,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialMixture.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixture.hh,v 1. 2 2008/12/18 12:58:12 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixture.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByNoAtoms.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByNoAtoms.hh,v 1. 3 2008/12/18 12:58:14 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByNoAtoms.hh,v 1.4 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByVolume.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByVolume.hh,v 1. 4 2008/12/18 12:58:16 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByVolume.hh,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByWeight.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByWeight.hh,v 1. 2 2008/12/18 12:58:18 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByWeight.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbMaterialSimple.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialSimple.hh,v 1. 2 2008/12/18 12:58:20 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialSimple.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbPlaceParamCircle.hh
r1337 r1347 26 26 // 27 27 // $Id: G4tgbPlaceParamCircle.hh,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbPlaceParamLinear.hh
r1337 r1347 26 26 // 27 27 // $Id: G4tgbPlaceParamLinear.hh,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbPlaceParamSquare.hh
r1337 r1347 26 26 // 27 27 // $Id: G4tgbPlaceParamSquare.hh,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbPlaceParameterisation.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbPlaceParameterisation.hh,v 1. 4 2008/11/21 15:37:18gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbPlaceParameterisation.hh,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbRotationMatrix.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbRotationMatrix.hh,v 1. 2 2008/12/18 12:58:22 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbRotationMatrix.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbRotationMatrixMgr.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbRotationMatrixMgr.hh,v 1. 2 2008/12/18 12:58:24 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbRotationMatrixMgr.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbVolume.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbVolume.hh,v 1. 4 2008/12/18 12:58:26 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbVolume.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgbVolumeMgr.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbVolumeMgr.hh,v 1. 3 2008/12/18 12:58:28 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbVolumeMgr.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrElement.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrElement.hh,v 1. 2 2008/12/18 12:58:30 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrElement.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrElementFromIsotopes.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrElementFromIsotopes.hh,v 1. 6 2008/12/18 12:58:32 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrElementFromIsotopes.hh,v 1.7 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrElementSimple.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrElementSimple.hh,v 1. 6 2008/12/18 12:58:34 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrElementSimple.hh,v 1.7 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrEvaluator.hh
r1337 r1347 26 26 // 27 27 // $Id: G4tgrEvaluator.hh,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrFileIn.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrFileIn.hh,v 1. 3 2008/12/18 12:58:36 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrFileIn.hh,v 1.5 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 77 77 private: 78 78 79 G4tgrFileIn( const G4String& name ) : the Name(name) {}79 G4tgrFileIn( const G4String& name ) : theCurrentFile(-1), theName(name) {} 80 80 81 81 private: -
trunk/source/persistency/ascii/include/G4tgrFileReader.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrFileReader.hh,v 1. 2 2008/11/12 08:41:19 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrFileReader.hh,v 1.4 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrIsotope.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrIsotope.hh,v 1. 4 2008/12/18 12:58:38 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrIsotope.hh,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrLineProcessor.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrLineProcessor.hh,v 1. 1 2008/10/23 14:43:43gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrLineProcessor.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrMaterial.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterial.hh,v 1. 5 2008/12/18 12:58:40 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterial.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrMaterialFactory.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialFactory.hh,v 1. 2 2008/12/18 12:58:42 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialFactory.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrMaterialMixture.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialMixture.hh,v 1. 2 2008/12/18 12:58:44 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialMixture.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrMaterialSimple.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialSimple.hh,v 1. 2 2008/12/18 12:58:46 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialSimple.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrMessenger.hh
r1337 r1347 26 26 // 27 27 // $Id: G4tgrMessenger.hh,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrParameterMgr.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrParameterMgr.hh,v 1. 2 2008/12/18 12:58:48 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrParameterMgr.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrPlace.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlace.hh,v 1. 4 2008/12/18 12:58:50 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlace.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrPlaceDivRep.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceDivRep.hh,v 1. 5 2008/12/18 12:58:52 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceDivRep.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrPlaceParameterisation.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceParameterisation.hh,v 1. 7 2008/12/18 12:58:54 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceParameterisation.hh,v 1.8 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrPlaceSimple.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceSimple.hh,v 1. 5 2008/12/18 12:58:56 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceSimple.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrRotationMatrix.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrRotationMatrix.hh,v 1. 5 2008/12/18 12:58:58 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrRotationMatrix.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrRotationMatrixFactory.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrRotationMatrixFactory.hh,v 1. 2 2008/12/18 12:59:00 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrRotationMatrixFactory.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrSolid.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrSolid.hh,v 1. 2 2008/12/18 12:59:02 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrSolid.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrSolidBoolean.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrSolidBoolean.hh,v 1. 2 2008/12/18 12:59:04 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrSolidBoolean.hh,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrUtils.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrUtils.hh,v 1. 6 2008/12/18 12:59:06 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrUtils.hh,v 1.8 2010/12/15 11:29:54 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 64 64 static G4bool IsInteger( const G4double val, 65 65 const G4double precision = 1.e-6 ); 66 static G4bool WordIsUnit( const G4String& word ); 67 static G4bool WordIsFunction( const G4String& word ); 66 static G4bool IsFunction( const G4String& word ); 68 67 // Checks that every character in a G4String is a number 69 68 // (also '.' or exponencial notation: 'E') -
trunk/source/persistency/ascii/include/G4tgrVolume.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolume.hh,v 1.1 0 2009/11/23 11:38:54 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolume.hh,v 1.11 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrVolumeAssembly.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeAssembly.hh,v 1. 5 2008/12/18 12:59:10 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeAssembly.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrVolumeDivision.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeDivision.hh,v 1. 5 2008/12/18 12:59:12 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeDivision.hh,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/include/G4tgrVolumeMgr.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeMgr.hh,v 1. 5 2008/12/18 12:59:14 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeMgr.hh,v 1.8 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 53 53 #include <map> 54 54 55 typedef std::map< const G4String, constG4tgrSolid* > G4mapssol;56 typedef std::map< const G4String, constG4tgrVolume* > G4mapsvol;55 typedef std::map< G4String, G4tgrSolid* > G4mapssol; 56 typedef std::map< G4String, G4tgrVolume* > G4mapsvol; 57 57 typedef std::multimap< const G4String, const G4tgrPlace* > G4mmapspl; 58 58 -
trunk/source/persistency/ascii/src/G4tgbDetectorBuilder.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbDetectorBuilder.cc,v 1. 4 2008/12/18 12:59:16 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbDetectorBuilder.cc,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbDetectorConstruction.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbDetectorConstruction.cc,v 1. 4 2008/12/18 12:59:18 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbDetectorConstruction.cc,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbElement.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbElement.cc,v 1. 4 2008/12/18 12:59:20 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbElement.cc,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbGeometryDumper.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbGeometryDumper.cc,v 1.1 2 2009/11/19 13:29:04 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbGeometryDumper.cc,v 1.15 2010/11/02 11:13:05 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 81 81 //------------------------------------------------------------------------ 82 82 G4tgbGeometryDumper::G4tgbGeometryDumper() 83 { 84 85 theRotationNumber = 0; 83 : theFile(0), theRotationNumber(0) 84 { 86 85 } 87 86 … … 649 648 } else if (solidType == "REFLECTEDSOLID") { 650 649 G4ReflectedSolid* solidrefl = dynamic_cast<G4ReflectedSolid*>(solid); 650 if (!solidrefl) 651 { 652 G4Exception("G4tgbGeometryDumper::DumpSolid()", 653 "InvalidType", FatalException, "Invalid reflected solid!"); 654 return solidName; 655 } 651 656 G4VSolid* solidori = solidrefl->GetConstituentMovedSolid(); 652 657 DumpSolid( solidori ); … … 669 674 { 670 675 G4BooleanSolid * bso = dynamic_cast < G4BooleanSolid * > (so); 676 if (!bso) { return; } 671 677 G4VSolid* solid0 = bso->GetConstituentSolid( 0 ); 672 678 G4VSolid* solid1 = bso->GetConstituentSolid( 1 ); … … 676 682 { 677 683 solid1Disp = dynamic_cast<G4DisplacedSolid*>(solid1); 678 solid1 = solid1Disp->GetConstituentMovedSolid();684 if (solid1Disp) { solid1 = solid1Disp->GetConstituentMovedSolid(); } 679 685 } 680 686 DumpSolid( solid0 ); … … 736 742 if (solidType == "BOX") { 737 743 const G4Box * sb = dynamic_cast < const G4Box*>(so); 738 params.push_back( sb->GetXHalfLength() ); 739 params.push_back( sb->GetYHalfLength() ); 740 params.push_back( sb->GetZHalfLength() ); 741 744 if (sb) { 745 params.push_back( sb->GetXHalfLength() ); 746 params.push_back( sb->GetYHalfLength() ); 747 params.push_back( sb->GetZHalfLength() ); 748 } 742 749 } else if (solidType == "TUBS") { 743 750 const G4Tubs * tu = dynamic_cast < const G4Tubs * > (so); 744 params.push_back( tu->GetInnerRadius() ); 745 params.push_back( tu->GetOuterRadius() ); 746 params.push_back( tu->GetZHalfLength() ); 747 params.push_back( tu->GetStartPhiAngle()/deg ); 748 params.push_back( tu->GetDeltaPhiAngle()/deg ); 749 751 if (tu) { 752 params.push_back( tu->GetInnerRadius() ); 753 params.push_back( tu->GetOuterRadius() ); 754 params.push_back( tu->GetZHalfLength() ); 755 params.push_back( tu->GetStartPhiAngle()/deg ); 756 params.push_back( tu->GetDeltaPhiAngle()/deg ); 757 } 750 758 } else if (solidType == "TRAP") { 751 759 const G4Trap * trp = dynamic_cast < const G4Trap * > (so); 752 G4ThreeVector symAxis(trp->GetSymAxis());753 G4double theta, phi;754 theta = symAxis.theta()/deg;755 phi = symAxis.phi()/deg;756 params.push_back( trp->GetZHalfLength() );757 params.push_back( theta );758 params.push_back( phi);759 params.push_back( trp->GetYHalfLength1() );760 params.push_back( trp->GetXHalfLength1() );761 params.push_back( trp->GetXHalfLength2() );762 params.push_back( std::atan(trp->GetTanAlpha1())/deg );763 params.push_back( trp->GetYHalfLength2() );764 params.push_back( trp->GetXHalfLength3() );765 params.push_back( trp->GetXHalfLength4() );766 params.push_back( std::atan(trp->GetTanAlpha2())/deg );767 760 if (trp) { 761 G4ThreeVector symAxis(trp->GetSymAxis()); 762 G4double theta = symAxis.theta()/deg; 763 G4double phi = symAxis.phi()/deg; 764 params.push_back( trp->GetZHalfLength() ); 765 params.push_back( theta ); 766 params.push_back( phi); 767 params.push_back( trp->GetYHalfLength1() ); 768 params.push_back( trp->GetXHalfLength1() ); 769 params.push_back( trp->GetXHalfLength2() ); 770 params.push_back( std::atan(trp->GetTanAlpha1())/deg ); 771 params.push_back( trp->GetYHalfLength2() ); 772 params.push_back( trp->GetXHalfLength3() ); 773 params.push_back( trp->GetXHalfLength4() ); 774 params.push_back( std::atan(trp->GetTanAlpha2())/deg ); 775 } 768 776 } else if (solidType == "TRD") { 769 777 const G4Trd * tr = dynamic_cast < const G4Trd * > (so); 770 params.push_back( tr->GetXHalfLength1() ); 771 params.push_back( tr->GetXHalfLength2() ); 772 params.push_back( tr->GetYHalfLength1() ); 773 params.push_back( tr->GetYHalfLength2() ); 774 params.push_back( tr->GetZHalfLength()); 775 778 if (tr) { 779 params.push_back( tr->GetXHalfLength1() ); 780 params.push_back( tr->GetXHalfLength2() ); 781 params.push_back( tr->GetYHalfLength1() ); 782 params.push_back( tr->GetYHalfLength2() ); 783 params.push_back( tr->GetZHalfLength()); 784 } 776 785 } else if (solidType == "PARA") { 777 786 const G4Para * para = dynamic_cast < const G4Para * > (so); 778 double phi; 779 if(para->GetSymAxis().z()!=1.0) 780 { phi = std::atan(para->GetSymAxis().y()/para->GetSymAxis().x()); } 781 else 782 { phi = 0; } 783 params.push_back( para->GetXHalfLength()); 784 params.push_back( para->GetYHalfLength()); 785 params.push_back( para->GetZHalfLength()); 786 params.push_back( std::atan(para->GetTanAlpha())/deg); 787 params.push_back( std::acos(para->GetSymAxis().z())/deg); 788 params.push_back( phi/deg); 789 787 if (para) { 788 G4double phi = 0.; 789 if(para->GetSymAxis().z()!=1.0) 790 { phi = std::atan(para->GetSymAxis().y()/para->GetSymAxis().x()); } 791 params.push_back( para->GetXHalfLength()); 792 params.push_back( para->GetYHalfLength()); 793 params.push_back( para->GetZHalfLength()); 794 params.push_back( std::atan(para->GetTanAlpha())/deg); 795 params.push_back( std::acos(para->GetSymAxis().z())/deg); 796 params.push_back( phi/deg); 797 } 790 798 } else if (solidType == "CONS") { 791 799 const G4Cons * cn = dynamic_cast < const G4Cons * > (so); 792 params.push_back( cn->GetInnerRadiusMinusZ() ); 793 params.push_back( cn->GetOuterRadiusMinusZ() ); 794 params.push_back( cn->GetInnerRadiusPlusZ() ); 795 params.push_back( cn->GetOuterRadiusPlusZ() ); 796 params.push_back( cn->GetZHalfLength() ); 797 params.push_back( cn->GetStartPhiAngle()/deg ); 798 params.push_back( cn->GetDeltaPhiAngle()/deg ); 799 800 if (cn) { 801 params.push_back( cn->GetInnerRadiusMinusZ() ); 802 params.push_back( cn->GetOuterRadiusMinusZ() ); 803 params.push_back( cn->GetInnerRadiusPlusZ() ); 804 params.push_back( cn->GetOuterRadiusPlusZ() ); 805 params.push_back( cn->GetZHalfLength() ); 806 params.push_back( cn->GetStartPhiAngle()/deg ); 807 params.push_back( cn->GetDeltaPhiAngle()/deg ); 808 } 800 809 } else if (solidType == "SPHERE") { 801 810 const G4Sphere * sphere = dynamic_cast < const G4Sphere * > (so); 802 params.push_back( sphere->GetInnerRadius()); 803 params.push_back( sphere->GetOuterRadius()); 804 params.push_back( sphere->GetStartPhiAngle()/deg); 805 params.push_back( sphere->GetDeltaPhiAngle()/deg); 806 params.push_back( sphere->GetStartThetaAngle()/deg); 807 params.push_back( sphere->GetDeltaThetaAngle()/deg); 808 811 if (sphere) { 812 params.push_back( sphere->GetInnerRadius()); 813 params.push_back( sphere->GetOuterRadius()); 814 params.push_back( sphere->GetStartPhiAngle()/deg); 815 params.push_back( sphere->GetDeltaPhiAngle()/deg); 816 params.push_back( sphere->GetStartThetaAngle()/deg); 817 params.push_back( sphere->GetDeltaThetaAngle()/deg); 818 } 809 819 } else if (solidType == "ORB") { 810 820 const G4Orb * orb = dynamic_cast < const G4Orb * > (so); 811 params.push_back( orb->GetRadius()); 812 821 if (orb) { 822 params.push_back( orb->GetRadius()); 823 } 813 824 } else if (solidType == "TORUS") { 814 825 const G4Torus * torus = dynamic_cast < const G4Torus * > (so); 815 params.push_back( torus->GetRmin()); 816 params.push_back( torus->GetRmax()); 817 params.push_back( torus->GetRtor()); 818 params.push_back( torus->GetSPhi()/deg); 819 params.push_back( torus->GetDPhi()/deg); 820 826 if (torus) { 827 params.push_back( torus->GetRmin()); 828 params.push_back( torus->GetRmax()); 829 params.push_back( torus->GetRtor()); 830 params.push_back( torus->GetSPhi()/deg); 831 params.push_back( torus->GetDPhi()/deg); 832 } 821 833 } else if (solidType == "POLYCONE") { 822 834 //--- Dump RZ corners, as original parameters will not be present 823 835 // if it was build from RZ corners 824 836 const G4Polycone * pc = dynamic_cast < const G4Polycone * > (so); 837 if (pc) { 838 G4double angphi = pc->GetStartPhi()/deg; 839 if( angphi > 180*deg ) { angphi -= 360*deg; } 840 G4int ncor = pc->GetNumRZCorner(); 841 params.push_back( angphi ); 842 params.push_back( pc->GetOriginalParameters()->Opening_angle/deg ); 843 params.push_back( ncor ); 825 844 826 G4double angphi = pc->GetStartPhi()/deg; 827 if( angphi > 180*deg ) { angphi -= 360*deg; } 828 G4int ncor = pc->GetNumRZCorner(); 829 params.push_back( angphi ); 830 params.push_back( pc->GetOriginalParameters()->Opening_angle/deg ); 831 params.push_back( ncor ); 832 833 for( G4int ii = 0; ii < ncor; ii++ ) 834 { 835 params.push_back( pc->GetCorner(ii).r ); 836 params.push_back( pc->GetCorner(ii).z ); 837 } 838 839 845 for( G4int ii = 0; ii < ncor; ii++ ) 846 { 847 params.push_back( pc->GetCorner(ii).r ); 848 params.push_back( pc->GetCorner(ii).z ); 849 } 850 } 840 851 } else if (solidType == "POLYHEDRA") { 841 852 //--- Dump RZ corners, as original parameters will not be present 842 853 // if it was build from RZ corners 843 854 const G4Polyhedra * ph = (dynamic_cast < const G4Polyhedra * > (so)); 855 if (ph) { 856 G4double angphi = ph->GetStartPhi()/deg; 857 if( angphi > 180*deg ) angphi -= 360*deg; 858 859 G4int ncor = ph->GetNumRZCorner(); 844 860 845 G4double angphi = ph->GetStartPhi()/deg; 846 if( angphi > 180*deg ) angphi -= 360*deg; 847 848 G4int ncor = ph->GetNumRZCorner(); 849 850 params.push_back( angphi ); 851 params.push_back( ph->GetOriginalParameters()->Opening_angle/deg ); 852 params.push_back( ph->GetNumSide() ); 853 params.push_back( ncor ); 854 855 for( G4int ii = 0; ii < ncor; ii++ ) 856 { 857 params.push_back( ph->GetCorner(ii).r ); 858 params.push_back( ph->GetCorner(ii).z ); 859 } 860 861 params.push_back( angphi ); 862 params.push_back( ph->GetOriginalParameters()->Opening_angle/deg ); 863 params.push_back( ph->GetNumSide() ); 864 params.push_back( ncor ); 865 866 for( G4int ii = 0; ii < ncor; ii++ ) 867 { 868 params.push_back( ph->GetCorner(ii).r ); 869 params.push_back( ph->GetCorner(ii).z ); 870 } 871 } 861 872 } else if (solidType == "ELLIPTICALTUBE") { 862 873 const G4EllipticalTube * eltu = 863 874 dynamic_cast < const G4EllipticalTube * > (so); 864 params.push_back( eltu->GetDx()); 865 params.push_back( eltu->GetDy()); 866 params.push_back( eltu->GetDz()); 867 875 if (eltu) { 876 params.push_back( eltu->GetDx()); 877 params.push_back( eltu->GetDy()); 878 params.push_back( eltu->GetDz()); 879 } 868 880 } else if (solidType == "ELLIPSOID" ){ 869 881 const G4Ellipsoid* dso = dynamic_cast < const G4Ellipsoid * > (so); 870 params.push_back( dso->GetSemiAxisMax(0) ); 871 params.push_back( dso->GetSemiAxisMax(1) ); 872 params.push_back( dso->GetSemiAxisMax(2) ); 873 params.push_back( dso->GetZBottomCut() ); 874 params.push_back( dso->GetZTopCut() ); 875 882 if (dso) { 883 params.push_back( dso->GetSemiAxisMax(0) ); 884 params.push_back( dso->GetSemiAxisMax(1) ); 885 params.push_back( dso->GetSemiAxisMax(2) ); 886 params.push_back( dso->GetZBottomCut() ); 887 params.push_back( dso->GetZTopCut() ); 888 } 876 889 } else if (solidType == "ELLIPTICAL_CONE") { 877 890 const G4EllipticalCone * elco = 878 891 dynamic_cast < const G4EllipticalCone * > (so); 879 params.push_back( elco-> GetSemiAxisX() ); 880 params.push_back( elco-> GetSemiAxisY() ); 881 params.push_back( elco-> GetZMax() ); 882 params.push_back( elco-> GetZTopCut() ); 883 892 if (elco) { 893 params.push_back( elco-> GetSemiAxisX() ); 894 params.push_back( elco-> GetSemiAxisY() ); 895 params.push_back( elco-> GetZMax() ); 896 params.push_back( elco-> GetZTopCut() ); 897 } 884 898 } else if (solidType == "HYPE") { 885 899 const G4Hype* hype = dynamic_cast < const G4Hype * > (so); 886 params.push_back( hype->GetInnerRadius()); 887 params.push_back( hype->GetOuterRadius()); 888 params.push_back( hype->GetInnerStereo()/deg); 889 params.push_back( hype->GetOuterStereo()/deg); 890 params.push_back( 2*hype->GetZHalfLength()); 891 900 if (hype) { 901 params.push_back( hype->GetInnerRadius()); 902 params.push_back( hype->GetOuterRadius()); 903 params.push_back( hype->GetInnerStereo()/deg); 904 params.push_back( hype->GetOuterStereo()/deg); 905 params.push_back( 2*hype->GetZHalfLength()); 906 } 892 907 // } else if( solidType == "TET" ) { 893 908 894 909 } else if( solidType == "TWISTEDBOX" ) { 895 910 const G4TwistedBox* tbox = dynamic_cast < const G4TwistedBox * > (so); 896 params.push_back( tbox->GetPhiTwist()/deg ); 897 params.push_back( tbox->GetXHalfLength() ); 898 params.push_back( tbox->GetYHalfLength() ); 899 params.push_back( tbox->GetZHalfLength() ); 900 911 if (tbox) { 912 params.push_back( tbox->GetPhiTwist()/deg ); 913 params.push_back( tbox->GetXHalfLength() ); 914 params.push_back( tbox->GetYHalfLength() ); 915 params.push_back( tbox->GetZHalfLength() ); 916 } 901 917 } else if( solidType == "TWISTEDTRAP" ) { 902 918 const G4TwistedTrap * ttrap = dynamic_cast < const G4TwistedTrap * > (so); 903 params.push_back( ttrap->GetPhiTwist()/deg ); 904 params.push_back( ttrap->GetZHalfLength() ); 905 params.push_back( ttrap->GetPolarAngleTheta()/deg ); 906 params.push_back( ttrap->GetAzimuthalAnglePhi()/deg ); 907 params.push_back( ttrap->GetY1HalfLength() ); 908 params.push_back( ttrap->GetX1HalfLength() ); 909 params.push_back( ttrap->GetX2HalfLength() ); 910 params.push_back( ttrap->GetY2HalfLength() ); 911 params.push_back( ttrap->GetX3HalfLength() ); 912 params.push_back( ttrap->GetX4HalfLength() ); 913 params.push_back( ttrap->GetTiltAngleAlpha()/deg ); 914 919 if (ttrap) { 920 params.push_back( ttrap->GetPhiTwist()/deg ); 921 params.push_back( ttrap->GetZHalfLength() ); 922 params.push_back( ttrap->GetPolarAngleTheta()/deg ); 923 params.push_back( ttrap->GetAzimuthalAnglePhi()/deg ); 924 params.push_back( ttrap->GetY1HalfLength() ); 925 params.push_back( ttrap->GetX1HalfLength() ); 926 params.push_back( ttrap->GetX2HalfLength() ); 927 params.push_back( ttrap->GetY2HalfLength() ); 928 params.push_back( ttrap->GetX3HalfLength() ); 929 params.push_back( ttrap->GetX4HalfLength() ); 930 params.push_back( ttrap->GetTiltAngleAlpha()/deg ); 931 } 915 932 } else if( solidType == "TWISTEDTRD" ) { 916 933 const G4TwistedTrd * ttrd = dynamic_cast < const G4TwistedTrd * > (so); 917 params.push_back( ttrd->GetX1HalfLength()); 918 params.push_back( ttrd->GetX2HalfLength() ); 919 params.push_back( ttrd->GetY1HalfLength() ); 920 params.push_back( ttrd->GetY2HalfLength() ); 921 params.push_back( ttrd->GetZHalfLength() ); 922 params.push_back( ttrd->GetPhiTwist()/deg ); 923 934 if (ttrd) { 935 params.push_back( ttrd->GetX1HalfLength()); 936 params.push_back( ttrd->GetX2HalfLength() ); 937 params.push_back( ttrd->GetY1HalfLength() ); 938 params.push_back( ttrd->GetY2HalfLength() ); 939 params.push_back( ttrd->GetZHalfLength() ); 940 params.push_back( ttrd->GetPhiTwist()/deg ); 941 } 924 942 } else if( solidType == "TWISTEDTUBS" ) { 925 943 const G4TwistedTubs * ttub = dynamic_cast < const G4TwistedTubs * > (so); 926 params.push_back( ttub->GetInnerRadius() ); 927 params.push_back( ttub->GetOuterRadius() ); 928 params.push_back( ttub->GetZHalfLength() ); 929 params.push_back( ttub->GetDPhi()/deg ); 930 params.push_back( ttub->GetPhiTwist()/deg ); 931 944 if (ttub) { 945 params.push_back( ttub->GetInnerRadius() ); 946 params.push_back( ttub->GetOuterRadius() ); 947 params.push_back( ttub->GetZHalfLength() ); 948 params.push_back( ttub->GetDPhi()/deg ); 949 params.push_back( ttub->GetPhiTwist()/deg ); 950 } 932 951 } 933 952 else … … 945 964 G4String G4tgbGeometryDumper::DumpRotationMatrix( G4RotationMatrix* rotm ) 946 965 { 966 if (!rotm) { rotm = new G4RotationMatrix(); } 967 947 968 G4double de = MatDeterminant(rotm); 948 949 969 G4String rotName = LookForExistingRotation( rotm ); 950 970 if( rotName != "" ) { return rotName; } 951 952 if (!rotm) { rotm = new G4RotationMatrix(); }953 971 954 972 G4ThreeVector v(1.,1.,1.); -
trunk/source/persistency/ascii/src/G4tgbIsotope.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbIsotope.cc,v 1. 4 2008/12/18 12:59:24 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbIsotope.cc,v 1.6 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 40 40 //---------------------------------------------------------------------- 41 41 G4tgbIsotope::G4tgbIsotope() 42 : theTgrIsot(0), theG4Isot(0) 42 43 { 43 44 } -
trunk/source/persistency/ascii/src/G4tgbMaterial.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterial.cc,v 1. 2 2008/12/18 12:59:26 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterial.cc,v 1.5 2010/12/15 11:29:54 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 41 41 // ------------------------------------------------------------------------- 42 42 G4tgbMaterial::G4tgbMaterial() 43 : theTgrMate(0), theG4Mate(0) 43 44 { 44 45 } … … 51 52 // ------------------------------------------------------------------------- 52 53 G4tgbMaterial::G4tgbMaterial( G4tgrMaterial* hg ) 54 : theTgrMate(hg), theG4Mate(0) 53 55 { 54 theTgrMate = hg;55 theG4Mate = 0;56 56 } 57 57 -
trunk/source/persistency/ascii/src/G4tgbMaterialMgr.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMgr.cc,v 1. 5 2008/12/18 12:59:28 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMgr.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 151 151 } else if( tgr->GetType() == "MaterialMixtureByVolume" ) { 152 152 tgb = new G4tgbMaterialMixtureByVolume( tgr ); 153 } 153 } else { 154 return; 155 } 154 156 theG4tgbMaterials[tgb->GetName()] = tgb; 155 157 } -
trunk/source/persistency/ascii/src/G4tgbMaterialMixture.cc
r1337 r1347 26 26 // 27 27 // $Id: G4tgbMaterialMixture.cc,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByNoAtoms.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByNoAtoms.cc,v 1. 6 2008/12/18 12:59:30 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByNoAtoms.cc,v 1.7 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByVolume.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByVolume.cc,v 1. 8 2008/12/18 12:59:32 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByVolume.cc,v 1.9 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByWeight.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialMixtureByWeight.cc,v 1. 4 2008/12/18 12:59:34 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialMixtureByWeight.cc,v 1.5 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbMaterialSimple.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbMaterialSimple.cc,v 1. 5 2008/12/18 12:59:36 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbMaterialSimple.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 41 41 // ------------------------------------------------------------------------- 42 42 G4tgbMaterialSimple::G4tgbMaterialSimple() 43 : theZ(0.), theA(0.) 43 44 { 44 45 } -
trunk/source/persistency/ascii/src/G4tgbPlaceParamCircle.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbPlaceParamCircle.cc,v 1. 5 2008/12/03 16:16:01 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbPlaceParamCircle.cc,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbPlaceParamLinear.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbPlaceParamLinear.cc,v 1. 5 2008/12/03 16:16:01 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbPlaceParamLinear.cc,v 1.6 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbPlaceParamSquare.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbPlaceParamSquare.cc,v 1. 6 2008/12/03 16:16:01 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbPlaceParamSquare.cc,v 1.7 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbPlaceParameterisation.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbPlaceParameterisation.cc,v 1. 4 2008/11/21 15:37:18gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbPlaceParameterisation.cc,v 1.6 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // class G4tgbPlaceParameterisation … … 45 45 G4tgbPlaceParameterisation:: 46 46 G4tgbPlaceParameterisation( G4tgrPlaceParameterisation* tgrParam) 47 : theNCopies(0), theAxis(kUndefined) 47 48 { 48 49 theRotationMatrix = G4tgbRotationMatrixMgr::GetInstance() … … 52 53 G4tgbPlaceParameterisation::~G4tgbPlaceParameterisation() 53 54 { 55 delete theRotationMatrix; 54 56 } 55 57 -
trunk/source/persistency/ascii/src/G4tgbRotationMatrix.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbRotationMatrix.cc,v 1. 8 2008/12/18 12:59:38 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbRotationMatrix.cc,v 1.10 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 43 43 // ------------------------------------------------------------------------- 44 44 G4tgbRotationMatrix::G4tgbRotationMatrix() 45 : theTgrRM(0), theG4RM(0) 45 46 { 46 47 } … … 55 56 // ------------------------------------------------------------------------- 56 57 G4tgbRotationMatrix::G4tgbRotationMatrix( G4tgrRotationMatrix* tgr ) 58 : theTgrRM(tgr), theG4RM(0) 57 59 { 58 theTgrRM = tgr;59 60 } 60 61 -
trunk/source/persistency/ascii/src/G4tgbRotationMatrixMgr.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbRotationMatrixMgr.cc,v 1. 2 2008/12/18 12:59:40 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbRotationMatrixMgr.cc,v 1.3 2010/10/13 07:56:55 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgbVolume.cc
r1228 r1347 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4tgbVolume.cc,v 1.23 2010/11/05 08:58:36 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 26 29 // 27 30 // … … 110 113 //------------------------------------------------------------------- 111 114 G4tgbVolume::G4tgbVolume() 115 : theTgrVolume(0), theG4AssemblyVolume(0) 112 116 { 113 117 } … … 155 159 g4vmgr->RegisterMe( logvol ); 156 160 g4vmgr->RegisterChildParentLVs( logvol, parentLV ); 157 158 } 159 } 161 } 162 else 163 { 164 return; 165 } 166 } 167 else 168 { 169 return; 170 } 160 171 } 161 172 //--- Construct PhysVol … … 291 302 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 292 303 "InvalidSetup", FatalException, ErrMessage); 304 return 0; 293 305 } 294 306 … … 367 379 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 368 380 "InvalidSetup", FatalException, ErrMessage); 381 return 0; 369 382 } 370 383 … … 427 440 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 428 441 "InvalidSetup", FatalException, ErrMessage); 442 return 0; 429 443 } 430 444 … … 655 669 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 656 670 "InvalidSetup", FatalException, ErrMessage); 671 return 0; 657 672 } 658 673 … … 679 694 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 680 695 "InvalidSetup", FatalException, ErrMessage); 696 return 0; 681 697 } 682 698 facet = new G4TriangularFacet( pt0, vt1, vt2, vertexType ); … … 705 721 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 706 722 "InvalidSetup", FatalException, ErrMessage); 723 return 0; 707 724 } 708 725 facet = new G4QuadrangularFacet( pt0, vt1, vt2, vt3, vertexType ); … … 716 733 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 717 734 "InvalidSetup", FatalException, ErrMessage); 735 return 0; 718 736 } 719 737 … … 748 766 { 749 767 const G4tgrSolidBoolean* solb = dynamic_cast<const G4tgrSolidBoolean*>(sol); 768 if (!solb) 769 { 770 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 771 "InvalidSetup", FatalException, "Invalid Solid pointer"); 772 return 0; 773 } 750 774 G4VSolid* sol1 = FindOrConstructG4Solid( solb->GetSolid(0)); 751 775 G4VSolid* sol2 = FindOrConstructG4Solid( solb->GetSolid(1)); … … 771 795 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", 772 796 "InvalidSetup", FatalException, ErrMessage); 797 return 0; 773 798 } 774 799 } … … 779 804 G4Exception("G4tgbVolume::FindOrConstructG4Solid()", "NotImplemented", 780 805 FatalException, ErrMessage); 806 return 0; 781 807 } 782 808 … … 1069 1095 G4Exception("G4tgbVolume::ConstructG4PhysVol", "WrongArgument", 1070 1096 FatalException, ErrMessage); 1097 return 0; 1071 1098 } 1072 1099 #ifdef G4VERBOSE … … 1249 1276 } 1250 1277 #endif 1251 1252 1278 } 1253 1279 } … … 1384 1410 G4Exception("G4tgbVolume::BuildSolidForDivision()", "NotImplemented", 1385 1411 FatalException, ErrMessage); 1412 return 0; 1386 1413 } 1387 1414 -
trunk/source/persistency/ascii/src/G4tgbVolumeMgr.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgbVolumeMgr.cc,v 1. 5 2008/12/18 12:59:44 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgbVolumeMgr.cc,v 1.10 2010/12/15 11:29:54 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 185 185 186 186 G4VSolid* oldSolid = 0; 187 G4mmssol::const_iterator mmsscite;188 187 std::pair<G4mmssol::iterator, G4mmssol::iterator> mmssdi; 189 188 mmssdi = theSolids.equal_range( name ); 190 189 191 for( mmsscite = mmssdi.first; mmsscite != mmssdi.second; mmsscite++ ) 192 { 193 #ifdef G4VERBOSE 194 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 195 { 196 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Solid finding " 197 << name << G4endl; 198 } 190 if( mmssdi.first != mmssdi.second ) { // check there is a solid found 191 G4mmssol::const_iterator mmsscite = mmssdi.first; 192 193 #ifdef G4VERBOSE 194 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 195 { 196 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Solid finding " 197 << name << G4endl; 198 } 199 199 #endif 200 200 /* … … 214 214 oldSolid = (*mmsscite).second; 215 215 #ifdef G4VERBOSE 216 if( G4tgrMessenger::GetVerboseLevel() >= 1 ) 217 { 218 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Solid already found " 219 << name << G4endl; 220 } 221 #endif 222 break; 216 if( G4tgrMessenger::GetVerboseLevel() >= 1 ) 217 { 218 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Solid already found " 219 << name << G4endl; 220 } 221 #endif 223 222 } 224 223 … … 226 225 if( G4tgrMessenger::GetVerboseLevel() >= 2 ) 227 226 { 228 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Old solid: " 229 << oldSolid << G4endl; 230 } 231 #endif 227 G4cout << " G4tgbVolumeMgr::FindG4Solid() - Old solid: " 228 << oldSolid << G4endl; 229 } 230 #endif 231 232 232 return oldSolid; 233 233 } -
trunk/source/persistency/ascii/src/G4tgrElement.cc
r1337 r1347 26 26 // 27 27 // $Id: G4tgrElement.cc,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrElementFromIsotopes.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrElementFromIsotopes.cc,v 1. 5 2008/12/18 12:59:46 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrElementFromIsotopes.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 42 42 // ------------------------------------------------------------------------- 43 43 G4tgrElementFromIsotopes::G4tgrElementFromIsotopes() 44 : theNoIsotopes(0) 44 45 { 45 46 } -
trunk/source/persistency/ascii/src/G4tgrElementSimple.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrElementSimple.cc,v 1. 5 2008/12/18 12:59:48 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrElementSimple.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 41 41 // ------------------------------------------------------------------------- 42 42 G4tgrElementSimple::G4tgrElementSimple() 43 : theZ(0.), theA(0.) 43 44 { 44 45 } -
trunk/source/persistency/ascii/src/G4tgrEvaluator.cc
r1337 r1347 26 26 // 27 27 // $Id: G4tgrEvaluator.cc,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrFileIn.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrFileIn.cc,v 1. 9 2008/12/18 12:59:50 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrFileIn.cc,v 1.13 2010/12/15 11:29:54 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 39 39 #include <iostream> 40 40 #include <fstream> 41 #include <sstream> 41 42 42 43 #include "G4tgrFileIn.hh" … … 50 51 //----------------------------------------------------------------------- 51 52 G4tgrFileIn::G4tgrFileIn() 53 : theCurrentFile(-1), theName("") 52 54 { 53 55 } … … 57 59 G4tgrFileIn::~G4tgrFileIn() 58 60 { 59 return; 61 /* 60 62 std::vector<G4tgrFileIn*>::const_iterator vfcite; 61 63 for( vfcite = theInstances.begin(); vfcite != theInstances.end(); vfcite++) … … 63 65 delete *vfcite; 64 66 } 67 */ 65 68 } 66 69 -
trunk/source/persistency/ascii/src/G4tgrFileReader.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrFileReader.cc,v 1. 4 2008/11/12 08:44:07 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrFileReader.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 65 65 G4tgrFileReader::~G4tgrFileReader() 66 66 { 67 delete theLineProcessor; 67 68 delete theInstance; 68 69 } -
trunk/source/persistency/ascii/src/G4tgrIsotope.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrIsotope.cc,v 1. 5 2008/12/18 12:59:52 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrIsotope.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 42 42 //------------------------------------------------------------- 43 43 G4tgrIsotope::G4tgrIsotope() 44 : theName(""), theZ(0), theN(0), theA(0.) 44 45 { 45 46 } -
trunk/source/persistency/ascii/src/G4tgrLineProcessor.cc
r1035 r1347 158 158 G4Exception("G4tgrLineProcessor::ProcessLine()", "Material not found", 159 159 FatalException, G4tgrUtils::GetString( wl[1] ) ); 160 return false; 160 161 } 161 162 mate->SetIonisationMeanExcitationEnergy( G4tgrUtils::GetDouble( wl[2] ) ); -
trunk/source/persistency/ascii/src/G4tgrMaterial.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterial.cc,v 1. 3 2008/11/21 15:37:18gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterial.cc,v 1.5 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 40 40 // ------------------------------------------------------------------------- 41 41 G4tgrMaterial::G4tgrMaterial() 42 : theName("Material"), theDensity(0.), theNoComponents(0), 43 theMateType("Material"), theIonisationMeanExcitationEnergy(-1.) 42 44 { 43 theIonisationMeanExcitationEnergy = -1.;44 45 } 45 46 -
trunk/source/persistency/ascii/src/G4tgrMaterialFactory.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialFactory.cc,v 1. 4 2008/12/18 12:59:54 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialFactory.cc,v 1.5 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrMaterialMixture.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialMixture.cc,v 1. 7 2008/12/18 12:59:56 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialMixture.cc,v 1.8 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrMaterialSimple.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrMaterialSimple.cc,v 1. 7 2008/12/18 12:59:58 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrMaterialSimple.cc,v 1.9 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 42 42 //------------------------------------------------------------- 43 43 G4tgrMaterialSimple::G4tgrMaterialSimple() 44 : name("MaterialSimple") 44 : name("MaterialSimple"), theA(0.), theZ(0.) 45 45 { 46 46 } -
trunk/source/persistency/ascii/src/G4tgrMessenger.cc
r1337 r1347 26 26 // 27 27 // $Id: G4tgrMessenger.cc,v 1.1 2008/10/23 14:43:43 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04- beta-01$28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrParameterMgr.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrParameterMgr.cc,v 1. 6 2008/12/18 13:00:00 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrParameterMgr.cc,v 1.7 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrPlace.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlace.cc,v 1. 3 2008/11/03 17:04:41 arceExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlace.cc,v 1.6 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 39 39 // ------------------------------------------------------------------------- 40 40 G4tgrPlace::G4tgrPlace() 41 : theVolume(0), theParentName(""), theCopyNo(0), theType("") 41 42 { 42 43 } -
trunk/source/persistency/ascii/src/G4tgrPlaceDivRep.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceDivRep.cc,v 1. 4 2008/11/21 15:37:18gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceDivRep.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 42 42 //------------------------------------------------------------- 43 43 G4tgrPlaceDivRep::G4tgrPlaceDivRep() 44 : theNDiv(0), theWidth(0.), theAxis(kUndefined), 45 theOffset(0.), theDivType(DivByNdivAndWidth) 44 46 { 45 theOffset = 0.;46 47 } 47 48 -
trunk/source/persistency/ascii/src/G4tgrPlaceParameterisation.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceParameterisation.cc,v 1. 6 2008/12/18 13:00:02 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceParameterisation.cc,v 1.8 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrPlaceSimple.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrPlaceSimple.cc,v 1. 5 2008/12/18 13:00:04 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrPlaceSimple.cc,v 1.7 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrRotationMatrix.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrRotationMatrix.cc,v 1. 5 2008/12/18 13:00:06 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrRotationMatrix.cc,v 1.7 2010/10/13 15:20:01 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 42 42 // ------------------------------------------------------------------------- 43 43 G4tgrRotationMatrix::G4tgrRotationMatrix() 44 : theName("Rotation-Matrix"), theInputType(rm9) 44 45 { 45 46 } … … 53 54 54 55 // ------------------------------------------------------------------------- 55 G4tgrRotationMatrix::G4tgrRotationMatrix( const std::vector<G4String>& wl ) 56 G4tgrRotationMatrix::G4tgrRotationMatrix( const std::vector<G4String>& wl ) 57 : theInputType(rm9) 56 58 { 57 59 theName = G4tgrUtils::GetString( wl[1] ); -
trunk/source/persistency/ascii/src/G4tgrRotationMatrixFactory.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrRotationMatrixFactory.cc,v 1. 2 2008/12/18 13:00:08 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrRotationMatrixFactory.cc,v 1.3 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrSolid.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrSolid.cc,v 1. 6 2008/12/18 13:00:10 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrSolid.cc,v 1.7 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrSolidBoolean.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrSolidBoolean.cc,v 1. 4 2008/12/18 13:00:12 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrSolidBoolean.cc,v 1.5 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrUtils.cc
r1035 r1347 78 78 G4bool G4tgrUtils::IsNumber( const G4String& str) 79 79 { 80 G4int isnum = 1;80 G4int isnum = true; 81 81 G4int numE = 0; 82 82 for(size_t ii=0; ii<str.length(); ii++) … … 90 90 if(numE != 0 || ii == str.length()-1) 91 91 { 92 isnum = 0;92 isnum = false; 93 93 break; 94 94 } … … 97 97 else 98 98 { 99 isnum = 0;99 isnum = false; 100 100 break; 101 101 } … … 123 123 void G4tgrUtils::Dump3v( const G4ThreeVector& vec, const char* msg) 124 124 { 125 G4cout << msg << std::setprecision(8) << vec << G4endl; 125 G4cout << msg << std::setprecision(8) 126 << vec << std::setprecision(6) << G4endl; 126 127 } 127 128 … … 346 347 //----- Check if it is a function 347 348 G4bool bWordOK = false; 348 if( G4tgrUtils:: WordIsFunction( word ) )349 if( G4tgrUtils::IsFunction( word ) ) 349 350 { 350 351 //--- It must be followed by '(' … … 360 361 //----- Check if it is a unit 361 362 } 362 else if( G4tgrUtils::WordIsUnit( word ) )363 else if( !G4tgrUtils::IsNumber( word ) ) 363 364 { 364 365 //--- It must be preceded by a * … … 550 551 551 552 //------------------------------------------------------------- 552 G4bool G4tgrUtils::WordIsUnit( const G4String& word ) 553 { 554 return !IsNumber(word); 555 if( word == "mm" 556 || word == "cm" 557 || word == "m" 558 || word == "km" 559 || word == "millimeter" 560 || word == "centimeter" 561 || word == "meter" 562 || word == "kilometer" 563 || word == "parsec" 564 || word == "micrometer" 565 || word == "nanometer" 566 || word == "angstrom" 567 || word == "fermi" 568 || word == "nm" 569 || word == "um" 570 || word == "pc" 571 || word == "radian" 572 || word == "milliradian" 573 || word == "degree" 574 || word == "rad" 575 || word == "mrad" 576 || word == "deg" 577 || word == "ns" 578 || word == "curie" 579 || word == "curie" ) 580 { 581 return true; 582 } 583 else 584 { 585 return false; 586 } 587 } 588 589 590 //------------------------------------------------------------- 591 G4bool G4tgrUtils::WordIsFunction( const G4String& word ) 553 G4bool G4tgrUtils::IsFunction( const G4String& word ) 592 554 { 593 555 if( word == "sin" -
trunk/source/persistency/ascii/src/G4tgrVolume.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolume.cc,v 1.1 0 2009/11/23 11:36:29arce Exp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolume.cc,v 1.13 2010/12/15 11:29:54 arce Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 49 49 //------------------------------------------------------------- 50 50 G4tgrVolume::G4tgrVolume() 51 : theName(""), theType(""), 52 theMaterialName(""), theSolid(0), theVisibility(false), 53 theRGBColour(0), theCheckOverlaps(false) 51 54 { 52 55 } … … 56 59 G4tgrVolume::~G4tgrVolume() 57 60 { 61 delete [] theRGBColour; 58 62 } 59 63 … … 104 108 #endif 105 109 } 106 107 110 } 108 111 -
trunk/source/persistency/ascii/src/G4tgrVolumeAssembly.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeAssembly.cc,v 1. 6 2008/12/18 13:00:18 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeAssembly.cc,v 1.7 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrVolumeDivision.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeDivision.cc,v 1. 6 2008/12/18 13:00:20 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeDivision.cc,v 1.7 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // -
trunk/source/persistency/ascii/src/G4tgrVolumeMgr.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4tgrVolumeMgr.cc,v 1. 7 2008/12/18 13:00:22 gunterExp $28 // GEANT4 tag $Name: geant4-09-04- beta-01$27 // $Id: G4tgrVolumeMgr.cc,v 1.10 2010/10/13 07:56:56 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 29 29 // 30 30 // … … 373 373 374 374 //---------- construct the children of this VOL 375 std::pair<G4mmapspl:: const_iterator, G4mmapspl::const_iterator> children375 std::pair<G4mmapspl::iterator, G4mmapspl::iterator> children 376 376 = GetChildren( vol->GetName() ); 377 377 G4mmapspl::const_iterator cite; -
trunk/source/persistency/gdml/GNUmakefile
r850 r1347 1 # $Id: GNUmakefile,v 1.1 0 2008/07/02 14:15:16gcosmo Exp $1 # $Id: GNUmakefile,v 1.12 2010/11/02 10:40:24 gcosmo Exp $ 2 2 # ----------------------------------------------------------------------- 3 3 # GNUmakefile for persistency library. Gabriele Cosmo, 16/11/96. … … 12 12 include $(G4INSTALL)/config/architecture.gmk 13 13 14 CPPFLAGS += -I$(G4INSTALL)/source/global/management/include \ 15 -I$(G4INSTALL)/source/global/HEPGeometry/include \ 16 -I$(G4INSTALL)/source/global/HEPNumerics/include \ 17 -I$(G4INSTALL)/source/digits_hits/hits/include \ 18 -I$(G4INSTALL)/source/digits_hits/digits/include \ 19 -I$(G4INSTALL)/source/particles/management/include \ 20 -I$(G4INSTALL)/source/run/include \ 21 -I$(G4INSTALL)/source/event/include \ 22 -I$(G4INSTALL)/source/track/include \ 23 -I$(G4INSTALL)/source/tracking/include \ 24 -I$(G4INSTALL)/source/intercoms/include \ 25 -I$(G4INSTALL)/source/geometry/management/include \ 26 -I$(G4INSTALL)/source/geometry/volumes/include \ 27 -I$(G4INSTALL)/source/geometry/navigation/include \ 28 -I$(G4INSTALL)/source/geometry/solids/CSG/include \ 29 -I$(G4INSTALL)/source/geometry/solids/Boolean/include \ 30 -I$(G4INSTALL)/source/geometry/solids/specific/include \ 31 -I$(G4INSTALL)/source/geometry/divisions/include \ 32 -I$(G4INSTALL)/source/materials/include \ 33 -I$(G4INSTALL)/source/graphics_reps/include 14 CPPFLAGS += \ 15 -I$(G4BASE)/global/management/include \ 16 -I$(G4BASE)/global/HEPGeometry/include \ 17 -I$(G4BASE)/global/HEPNumerics/include \ 18 -I$(G4BASE)/global/HEPRandom/include \ 19 -I$(G4BASE)/digits_hits/hits/include \ 20 -I$(G4BASE)/digits_hits/digits/include \ 21 -I$(G4BASE)/particles/management/include \ 22 -I$(G4BASE)/run/include \ 23 -I$(G4BASE)/event/include \ 24 -I$(G4BASE)/track/include \ 25 -I$(G4BASE)/tracking/include \ 26 -I$(G4BASE)/intercoms/include \ 27 -I$(G4BASE)/processes/management/include \ 28 -I$(G4BASE)/geometry/management/include \ 29 -I$(G4BASE)/geometry/volumes/include \ 30 -I$(G4BASE)/geometry/navigation/include \ 31 -I$(G4BASE)/geometry/solids/CSG/include \ 32 -I$(G4BASE)/geometry/solids/Boolean/include \ 33 -I$(G4BASE)/geometry/solids/specific/include \ 34 -I$(G4BASE)/geometry/divisions/include \ 35 -I$(G4BASE)/materials/include \ 36 -I$(G4BASE)/graphics_reps/include 34 37 35 38 ifdef G4LIB_USE_GDML -
trunk/source/persistency/gdml/History
r1315 r1347 1 $Id: History,v 1.12 0 2010/06/02 13:55:02gcosmo Exp $1 $Id: History,v 1.128 2010/11/30 08:56:16 gcosmo Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 30 Nov 2010 Gabriele Cosmo (gdml-V09-03-10) 21 - Fixed ambiguity in signature of Write() method in G4GDMLParser. 22 23 17 Nov 2010 Gabriele Cosmo (gdml-V09-03-09) 24 - Added possibility to de-activate/activate names stripping when reading files, 25 by invoking a new method G4GDMLParser::SetStripFlag(bool) before importing 26 the GDML file. Stripping is activated by default. 27 - Corrected initialization of messenger for all constructors of G4GDMLParser. 28 29 04 Nov 2010 Gabriele Cosmo (gdml-V09-03-08) 30 - Fixed compilation warning on G4GDMLEvaluator. 31 32 02 Nov 2010 Gabriele Cosmo (gdml-V09-03-07) 33 - Fixed minor left Coverity reports. 34 - Some code cleanup and updated CMake scripts. 35 36 25 Oct 2010 Witold Pokorski 37 - New class G4GDMLMessenger instantiated with G4GDMLParser and defining 38 UI commands for importing and exporting GDML files, through the various 39 options the parser provides. 40 - Corrected GetWorldVolume() in G4GDMLReadStructure, to make use of structure 41 stored in memory in case geometry is already imported. 42 43 14 Oct 2010 Gabriele Cosmo (gdml-V09-03-06) 44 - Fixed dummy initialisation of members in constructors in classes 45 G4GDMLParameterisation, G4GDMLReadParamvol, G4GDMLReadStructure, 46 G4GDMLWrite, G4GDMLWriteDefine, G4GDMLWriteMaterials, G4GDMLWriteSolids. 47 - Added exceptions asserting validity of dynamic casted pointers. 48 49 11 Oct 2010 Witold Pokorski (gdml-V09-03-05) 50 - Added GetAuxMap() method to G4GDMLParser and removed 'const' qualifier to 51 types in internal map of logical-volumes. Changed value type to 'string' in 52 G4GDMLAuxPairType to avoid extra type evaluation while parsing. 53 54 19 Aug 2010 Gabriele Cosmo (gdml-V09-03-04) 55 - Fixed printout of unit in G4GDMLWriteStructure for replicas and divisions, 56 in the case of angles. 19 57 20 58 02 Jun 2010 Gabriele Cosmo (gdml-V09-03-03) -
trunk/source/persistency/gdml/include/G4GDMLEvaluator.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLEvaluator.hh,v 1.1 7 2009/04/24 15:34:20 gcosmoExp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLEvaluator.hh,v 1.18 2010/10/25 10:15:41 witoldp Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 54 54 G4GDMLEvaluator(); 55 55 56 void Clear(); 56 57 void DefineConstant(const G4String&, G4double); 57 58 void DefineVariable(const G4String&, G4double); -
trunk/source/persistency/gdml/include/G4GDMLParameterisation.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLParameterisation.hh,v 1.1 0 2008/07/16 15:46:33gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLParameterisation.hh,v 1.11 2010/10/14 16:19:40 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 73 73 G4double dimension[16]; 74 74 75 PARAMETER() { memset(dimension,0,sizeof(dimension)); }75 PARAMETER() : pRot(0) { memset(dimension,0,sizeof(dimension)); } 76 76 }; 77 77 -
trunk/source/persistency/gdml/include/G4GDMLParser.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLParser.hh,v 1. 59 2010/02/17 18:06:25gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLParser.hh,v 1.65 2010/11/17 10:47:02 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 45 45 #include "G4GDMLWriteStructure.hh" 46 46 #include "G4STRead.hh" 47 #include "G4GDMLMessenger.hh" 48 49 #include "G4TransportationManager.hh" 50 #include "G4Navigator.hh" 51 47 52 48 53 #define G4GDML_DEFAULT_SCHEMALOCATION G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd") … … 70 75 71 76 inline void Write(const G4String& filename, 72 const G4VPhysicalVolume* constpvol = 0,77 const G4VPhysicalVolume* pvol = 0, 73 78 G4bool storeReferences = true, 74 79 const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION); … … 79 84 // Alternative path for the schema location can be specified; by default 80 85 // the URL to the GDML web site is used. 86 87 inline void Write(const G4String& filename, 88 const G4LogicalVolume* lvol = 0, 89 G4bool storeReferences = true, 90 const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION); 91 // 92 // Exports on a GDML file, specified by 'filename' a geometry tree 93 // starting from 'pvol' as top volume. Uniqueness of stored entities 94 // is guaranteed by storing pointer-references by default. 95 // Alternative path for the schema location can be specified; by default 96 // the URL to the GDML web site is used. Same as method above except 97 // that the logical volume is provided here. 81 98 82 99 inline G4LogicalVolume* ParseST(const G4String& name, … … 101 118 inline G4LogicalVolume* GetVolume(const G4String& name) const; 102 119 inline G4VPhysicalVolume* GetWorldVolume(const G4String& setupName="Default") const; 103 inline G4GDMLAuxListType GetVolumeAuxiliaryInformation(const G4LogicalVolume* const logvol); 120 inline G4GDMLAuxListType GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const; 121 inline const G4GDMLAuxMapType* GetAuxMap() const; 104 122 inline void StripNamePointers() const; 123 inline void SetStripFlag(G4bool); 105 124 inline void SetOverlapCheck(G4bool); 125 inline void Clear(); // Clears the evaluator 106 126 107 127 // Methods for Writer … … 115 135 G4GDMLReadStructure* reader; 116 136 G4GDMLWriteStructure* writer; 117 G4bool urcode, uwcode; 137 G4GDMLMessenger* messenger; 138 G4bool urcode, uwcode, strip; 118 139 119 140 }; -
trunk/source/persistency/gdml/include/G4GDMLParser.icc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLParser.icc,v 1. 9 2010/02/17 18:06:25gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLParser.icc,v 1.15 2010/11/17 10:47:02 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 36 36 void G4GDMLParser::Read(const G4String& filename, G4bool validate) 37 37 { 38 reader->Read(filename,validate,false );38 reader->Read(filename,validate,false,strip); 39 39 } 40 40 … … 47 47 inline 48 48 void G4GDMLParser::Write(const G4String& filename, 49 const G4VPhysicalVolume* constpvol,49 const G4VPhysicalVolume* pvol, 50 50 G4bool refs, 51 51 const G4String& schemaLocation) … … 56 56 if (!pvol) 57 57 { 58 G4VPhysicalVolume* worldPV = GetWorldVolume(); 59 if (!worldPV) 60 { 61 G4Exception("G4DMLParser::Write()", "InvalidSetup", FatalException, 62 "Detector-Construction needs to be registered first!"); 63 } 64 lvol = worldPV->GetLogicalVolume(); 58 lvol = G4TransportationManager::GetTransportationManager()-> 59 GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume(); 65 60 } 66 61 else 67 62 { 68 63 lvol = pvol->GetLogicalVolume(); 64 } 65 66 writer->Write(filename,lvol,schemaLocation,depth,refs); 67 } 68 69 inline 70 void G4GDMLParser::Write(const G4String& filename, 71 const G4LogicalVolume* lvol, 72 G4bool refs, 73 const G4String& schemaLocation) 74 { 75 const G4int depth = 0; 76 77 if (!lvol) 78 { 79 lvol = G4TransportationManager::GetTransportationManager()-> 80 GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume(); 69 81 } 70 82 writer->Write(filename,lvol,schemaLocation,depth,refs); … … 145 157 inline 146 158 G4GDMLAuxListType 147 G4GDMLParser::GetVolumeAuxiliaryInformation( const G4LogicalVolume* const logvol)159 G4GDMLParser::GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const 148 160 { 149 161 return reader->GetVolumeAuxiliaryInformation(logvol); … … 151 163 152 164 inline 165 const G4GDMLAuxMapType* G4GDMLParser::GetAuxMap() const 166 { 167 return reader->GetAuxMap(); 168 } 169 170 inline 153 171 void G4GDMLParser::StripNamePointers() const 154 172 { … … 156 174 } 157 175 176 inline void G4GDMLParser::SetStripFlag(G4bool flag) 177 { 178 strip = flag; 179 } 180 158 181 inline void G4GDMLParser::SetOverlapCheck(G4bool flag) 159 182 { … … 161 184 } 162 185 186 inline void G4GDMLParser::Clear() 187 { 188 reader->Clear(); 189 } 190 163 191 // 164 192 // Methods for Writer -
trunk/source/persistency/gdml/include/G4GDMLRead.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLRead.hh,v 1.3 1 2009/05/12 15:46:43gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLRead.hh,v 1.33 2010/11/17 10:47:02 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLRead … … 115 115 // More pure virtual methods implemented in the reader plugin. 116 116 117 void Read(const G4String&, G4bool validation, G4bool isModule); 117 void Read(const G4String&, G4bool validation, 118 G4bool isModule, G4bool strip=true); 118 119 // 119 120 // Main method for reading GDML files. -
trunk/source/persistency/gdml/include/G4GDMLReadStructure.hh
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLReadStructure.hh,v 1. 28 2009/09/24 15:04:34gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLReadStructure.hh,v 1.32 2010/11/02 10:39:27 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 54 54 { 55 55 G4String type; 56 G4 doublevalue;56 G4String value; 57 57 }; 58 58 59 59 typedef std::vector<G4GDMLAuxPairType> G4GDMLAuxListType; 60 typedef std::map< constG4LogicalVolume*,G4GDMLAuxListType> G4GDMLAuxMapType;60 typedef std::map<G4LogicalVolume*,G4GDMLAuxListType> G4GDMLAuxMapType; 61 61 typedef std::map<G4String, G4AssemblyVolume*> G4GDMLAssemblyMapType; 62 62 … … 72 72 G4LogicalVolume* GetVolume(const G4String&) const; 73 73 G4AssemblyVolume* GetAssembly(const G4String&) const; 74 G4GDMLAuxListType GetVolumeAuxiliaryInformation( const G4LogicalVolume* const);74 G4GDMLAuxListType GetVolumeAuxiliaryInformation(G4LogicalVolume*) const; 75 75 G4VPhysicalVolume* GetWorldVolume(const G4String&); 76 76 const G4GDMLAuxMapType* GetAuxMap() const; 77 void Clear(); // Clears internal map and evaluator 77 78 78 79 virtual void VolumeRead(const xercesc::DOMElement* const); … … 101 102 G4GDMLAssemblyMapType assemblyMap; 102 103 G4LogicalVolume *pMotherLogical; 103 104 std::map<std::string, G4VPhysicalVolume*> setuptoPV; 104 105 }; 105 106 -
trunk/source/persistency/gdml/src/G4GDMLEvaluator.cc
r1228 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLEvaluator.cc,v 1.2 3 2009/04/24 15:34:20gcosmo Exp $27 // $Id: G4GDMLEvaluator.cc,v 1.26 2010/11/04 11:33:49 gcosmo Exp $ 28 28 // GEANT4 tag $ Name:$ 29 29 // … … 45 45 eval.setStdMath(); 46 46 eval.setSystemOfUnits(meter,kilogram,second,ampere,kelvin,mole,candela); 47 } 48 49 void G4GDMLEvaluator::Clear() 50 { 51 eval.clear(); 52 eval.setStdMath(); 53 eval.setSystemOfUnits(meter,kilogram,second,ampere,kelvin,mole,candela); 54 55 variableList.clear(); 47 56 } 48 57 … … 153 162 if (open==close) { return in; } 154 163 155 if ( open>close)164 if ((open>close) || (open==std::string::npos) || (close==std::string::npos)) 156 165 { 157 166 G4String error_msg = "Bracket mismatch: " + in; 158 167 G4Exception("G4GDMLEvaluator::SolveBrackets()", "InvalidExpression", 159 168 FatalException, error_msg); 169 return in; 160 170 } 161 171 -
trunk/source/persistency/gdml/src/G4GDMLParser.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLParser.cc,v 1.1 4 2009/04/15 13:29:30gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLParser.cc,v 1.18 2010/11/17 11:36:45 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // … … 36 36 37 37 G4GDMLParser::G4GDMLParser() 38 : urcode(false), uwcode(false) 38 : urcode(false), uwcode(false), strip(true) 39 39 { 40 40 reader = new G4GDMLReadStructure; 41 41 writer = new G4GDMLWriteStructure; 42 messenger = new G4GDMLMessenger(this); 43 42 44 xercesc::XMLPlatformUtils::Initialize(); 43 45 } … … 48 50 reader = extr; 49 51 writer = new G4GDMLWriteStructure; 52 messenger = new G4GDMLMessenger(this); 53 50 54 xercesc::XMLPlatformUtils::Initialize(); 51 55 } … … 57 61 reader = extr; 58 62 writer = extw; 63 messenger = new G4GDMLMessenger(this); 64 59 65 xercesc::XMLPlatformUtils::Initialize(); 60 66 } … … 65 71 if (!urcode) { delete reader; } 66 72 if (!uwcode) { delete writer; } 73 delete messenger; 67 74 } -
trunk/source/persistency/gdml/src/G4GDMLRead.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLRead.cc,v 1. 47 2009/05/12 15:46:43gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLRead.cc,v 1.50 2010/11/17 10:47:02 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLRead Implementation … … 199 199 const xercesc::DOMAttr* const attribute 200 200 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 201 if (!attribute) 202 { 203 G4Exception("G4GDMLRead::LoopRead()", "InvalidRead", 204 FatalException, "No attribute found!"); 205 return; 206 } 201 207 const G4String attribute_name = Transcode(attribute->getName()); 202 208 const G4String attribute_value = Transcode(attribute->getValue()); … … 266 272 void G4GDMLRead::Read(const G4String& fileName, 267 273 G4bool validation, 268 G4bool isModule) 274 G4bool isModule, 275 G4bool strip) 269 276 { 270 277 if (isModule) … … 305 312 G4Exception("G4GDMLRead::Read()", "InvalidRead", 306 313 FatalException, error_msg); 314 return; 307 315 } 308 316 xercesc::DOMElement* element = doc->getDocumentElement(); … … 312 320 G4Exception("G4GDMLRead::Read()", "InvalidRead", 313 321 FatalException, "Empty document!"); 322 return; 314 323 } 315 324 … … 321 330 const xercesc::DOMElement* const child 322 331 = dynamic_cast<xercesc::DOMElement*>(iter); 332 if (!child) 333 { 334 G4Exception("G4GDMLRead::Read()", "InvalidRead", 335 FatalException, "No child found!"); 336 return; 337 } 323 338 const G4String tag = Transcode(child->getTagName()); 324 339 … … 337 352 } 338 353 339 if (parser) { delete parser; }340 if (handler) { delete handler; }354 delete parser; 355 delete handler; 341 356 342 357 if (isModule) … … 347 362 { 348 363 G4cout << "G4GDML: Reading '" << fileName << "' done!" << G4endl; 349 StripNames();350 } 351 } 364 if (strip) { StripNames(); } 365 } 366 } -
trunk/source/persistency/gdml/src/G4GDMLReadDefine.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadDefine.cc,v 1.2 5 2010/02/17 18:06:25gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadDefine.cc,v 1.26 2010/10/14 16:19:40 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadDefine Implementation … … 42 42 G4GDMLMatrix::G4GDMLMatrix(size_t rows0, size_t cols0) 43 43 { 44 if ((rows <=0) || (cols<=0))44 if ((rows0==0) || (cols0==0)) 45 45 { 46 46 G4Exception("G4GDMLMatrix::G4GDMLMatrix(r,c)", "InvalidSetup", … … 161 161 const xercesc::DOMAttr* const attribute 162 162 = dynamic_cast<xercesc::DOMAttr*>(node); 163 if (!attribute) 164 { 165 G4Exception("G4GDMLRead::ConstantRead()", "InvalidRead", 166 FatalException, "No attribute found!"); 167 return; 168 } 163 169 const G4String attName = Transcode(attribute->getName()); 164 170 const G4String attValue = Transcode(attribute->getValue()); … … 190 196 const xercesc::DOMAttr* const attribute 191 197 = dynamic_cast<xercesc::DOMAttr*>(node); 198 if (!attribute) 199 { 200 G4Exception("G4GDMLRead::ExpressionRead()", "InvalidRead", 201 FatalException, "No attribute found!"); 202 return; 203 } 192 204 const G4String attName = Transcode(attribute->getName()); 193 205 const G4String attValue = Transcode(attribute->getValue()); … … 221 233 const xercesc::DOMAttr* const attribute 222 234 = dynamic_cast<xercesc::DOMAttr*>(node); 235 if (!attribute) 236 { 237 G4Exception("G4GDMLRead::MatrixRead()", "InvalidRead", 238 FatalException, "No attribute found!"); 239 return; 240 } 223 241 const G4String attName = Transcode(attribute->getName()); 224 242 const G4String attValue = Transcode(attribute->getValue()); … … 271 289 const xercesc::DOMAttr* const attribute 272 290 = dynamic_cast<xercesc::DOMAttr*>(node); 291 if (!attribute) 292 { 293 G4Exception("G4GDMLRead::PositionRead()", "InvalidRead", 294 FatalException, "No attribute found!"); 295 return; 296 } 273 297 const G4String attName = Transcode(attribute->getName()); 274 298 const G4String attValue = Transcode(attribute->getValue()); … … 304 328 const xercesc::DOMAttr* const attribute 305 329 = dynamic_cast<xercesc::DOMAttr*>(node); 330 if (!attribute) 331 { 332 G4Exception("G4GDMLRead::RotationRead()", "InvalidRead", 333 FatalException, "No attribute found!"); 334 return; 335 } 306 336 const G4String attName = Transcode(attribute->getName()); 307 337 const G4String attValue = Transcode(attribute->getValue()); … … 335 365 const xercesc::DOMAttr* const attribute 336 366 = dynamic_cast<xercesc::DOMAttr*>(node); 367 if (!attribute) 368 { 369 G4Exception("G4GDMLRead::ScaleRead()", "InvalidRead", 370 FatalException, "No attribute found!"); 371 return; 372 } 337 373 const G4String attName = Transcode(attribute->getName()); 338 374 const G4String attValue = Transcode(attribute->getValue()); … … 366 402 const xercesc::DOMAttr* const attribute 367 403 = dynamic_cast<xercesc::DOMAttr*>(node); 404 if (!attribute) 405 { 406 G4Exception("G4GDMLRead::VariableRead()", "InvalidRead", 407 FatalException, "No attribute found!"); 408 return; 409 } 368 410 const G4String attName = Transcode(attribute->getName()); 369 411 const G4String attValue = Transcode(attribute->getValue()); … … 395 437 const xercesc::DOMAttr* const attribute 396 438 = dynamic_cast<xercesc::DOMAttr*>(node); 439 if (!attribute) 440 { 441 G4Exception("G4GDMLRead::QuantityRead()", "InvalidRead", 442 FatalException, "No attribute found!"); 443 return; 444 } 397 445 const G4String attName = Transcode(attribute->getName()); 398 446 const G4String attValue = Transcode(attribute->getValue()); … … 419 467 const xercesc::DOMElement* const child 420 468 = dynamic_cast<xercesc::DOMElement*>(iter); 469 if (!child) 470 { 471 G4Exception("G4GDMLRead::DefineRead()", "InvalidRead", 472 FatalException, "No child found!"); 473 return; 474 } 421 475 const G4String tag = Transcode(child->getTagName()); 422 476 … … 458 512 const xercesc::DOMAttr* const attribute 459 513 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 514 if (!attribute) 515 { 516 G4Exception("G4GDMLRead::VectorRead()", "InvalidRead", 517 FatalException, "No attribute found!"); 518 return; 519 } 460 520 const G4String attName = Transcode(attribute->getName()); 461 521 const G4String attValue = Transcode(attribute->getValue()); … … 487 547 const xercesc::DOMAttr* const attribute 488 548 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 549 if (!attribute) 550 { 551 G4Exception("G4GDMLRead::Read()", "InvalidRead", 552 FatalException, "No attribute found!"); 553 return ref; 554 } 489 555 const G4String attName = Transcode(attribute->getName()); 490 556 const G4String attValue = Transcode(attribute->getValue()); -
trunk/source/persistency/gdml/src/G4GDMLReadMaterials.cc
r1228 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLReadMaterials.cc,v 1.2 0 2009/04/24 15:34:20 gcosmo Exp $27 // $Id: G4GDMLReadMaterials.cc,v 1.21 2010/10/14 16:19:40 gcosmo Exp $ 28 28 // GEANT4 tag $ Name:$ 29 29 // … … 69 69 const xercesc::DOMAttr* const attribute 70 70 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 71 if (!attribute) 72 { 73 G4Exception("G4GDMLReadMaterials::AtomRead()", "InvalidRead", 74 FatalException, "No attribute found!"); 75 return value; 76 } 71 77 const G4String attName = Transcode(attribute->getName()); 72 78 const G4String attValue = Transcode(attribute->getValue()); … … 98 104 const xercesc::DOMAttr* const attribute 99 105 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 106 if (!attribute) 107 { 108 G4Exception("G4GDMLReadMaterials::CompositeRead()", "InvalidRead", 109 FatalException, "No attribute found!"); 110 return n; 111 } 100 112 const G4String attName = Transcode(attribute->getName()); 101 113 const G4String attValue = Transcode(attribute->getValue()); … … 127 139 const xercesc::DOMAttr* const attribute 128 140 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 141 if (!attribute) 142 { 143 G4Exception("G4GDMLReadMaterials::DRead()", "InvalidRead", 144 FatalException, "No attribute found!"); 145 return value; 146 } 129 147 const G4String attName = Transcode(attribute->getName()); 130 148 const G4String attValue = Transcode(attribute->getValue()); … … 155 173 const xercesc::DOMAttr* const attribute 156 174 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 175 if (!attribute) 176 { 177 G4Exception("G4GDMLReadMaterials::PRead()", "InvalidRead", 178 FatalException, "No attribute found!"); 179 return value; 180 } 157 181 const G4String attName = Transcode(attribute->getName()); 158 182 const G4String attValue = Transcode(attribute->getValue()); … … 183 207 const xercesc::DOMAttr* const attribute 184 208 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 209 if (!attribute) 210 { 211 G4Exception("G4GDMLReadMaterials::TRead()", "InvalidRead", 212 FatalException, "No attribute found!"); 213 return value; 214 } 185 215 const G4String attName = Transcode(attribute->getName()); 186 216 const G4String attValue = Transcode(attribute->getValue()); … … 215 245 const xercesc::DOMAttr* const attribute 216 246 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 247 if (!attribute) 248 { 249 G4Exception("G4GDMLReadMaterials::ElementRead()", "InvalidRead", 250 FatalException, "No attribute found!"); 251 return; 252 } 217 253 const G4String attName = Transcode(attribute->getName()); 218 254 const G4String attValue = Transcode(attribute->getValue()); … … 232 268 const xercesc::DOMElement* const child 233 269 = dynamic_cast<xercesc::DOMElement*>(iter); 270 if (!child) 271 { 272 G4Exception("G4GDMLReadMaterials::ElementRead()", "InvalidRead", 273 FatalException, "No child found!"); 274 return; 275 } 234 276 const G4String tag = Transcode(child->getTagName()); 235 277 … … 268 310 const xercesc::DOMAttr* const attribute 269 311 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 312 if (!attribute) 313 { 314 G4Exception("G4GDMLReadMaterials::FractionRead()", "InvalidRead", 315 FatalException, "No attribute found!"); 316 return n; 317 } 270 318 const G4String attName = Transcode(attribute->getName()); 271 319 const G4String attValue = Transcode(attribute->getValue()); … … 300 348 const xercesc::DOMAttr* const attribute 301 349 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 350 if (!attribute) 351 { 352 G4Exception("G4GDMLReadMaterials::IsotopeRead()", "InvalidRead", 353 FatalException, "No attribute found!"); 354 return; 355 } 302 356 const G4String attName = Transcode(attribute->getName()); 303 357 const G4String attValue = Transcode(attribute->getValue()); … … 315 369 const xercesc::DOMElement* const child 316 370 = dynamic_cast<xercesc::DOMElement*>(iter); 371 if (!child) 372 { 373 G4Exception("G4GDMLReadMaterials::IsotopeRead()", "InvalidRead", 374 FatalException, "No child found!"); 375 return; 376 } 317 377 const G4String tag = Transcode(child->getTagName()); 318 378 … … 348 408 const xercesc::DOMAttr* const attribute 349 409 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 410 if (!attribute) 411 { 412 G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead", 413 FatalException, "No attribute found!"); 414 return; 415 } 350 416 const G4String attName = Transcode(attribute->getName()); 351 417 const G4String attValue = Transcode(attribute->getValue()); … … 370 436 const xercesc::DOMElement* const child 371 437 = dynamic_cast<xercesc::DOMElement*>(iter); 438 if (!child) 439 { 440 G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead", 441 FatalException, "No child found!"); 442 return; 443 } 372 444 const G4String tag = Transcode(child->getTagName()); 373 445 … … 401 473 const xercesc::DOMElement* const child 402 474 = dynamic_cast<xercesc::DOMElement*>(iter); 475 if (!child) 476 { 477 G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead", 478 FatalException, "No child found!"); 479 return; 480 } 403 481 const G4String tag = Transcode(child->getTagName()); 404 482 … … 417 495 const xercesc::DOMElement* const child 418 496 = dynamic_cast<xercesc::DOMElement*>(iter); 497 if (!child) 498 { 499 G4Exception("G4GDMLReadMaterials::MixtureRead()", "InvalidRead", 500 FatalException, "No child found!"); 501 return; 502 } 419 503 const G4String tag = Transcode(child->getTagName()); 420 504 … … 439 523 const xercesc::DOMElement* const child 440 524 = dynamic_cast<xercesc::DOMElement*>(iter); 525 if (!child) 526 { 527 G4Exception("G4GDMLReadMaterials::MixtureRead()", "InvalidRead", 528 FatalException, "No child found!"); 529 return; 530 } 441 531 const G4String tag = Transcode(child->getTagName()); 442 532 … … 493 583 const xercesc::DOMAttr* const attribute 494 584 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 585 if (!attribute) 586 { 587 G4Exception("G4GDMLReadMaterials::PropertyRead()", "InvalidRead", 588 FatalException, "No attribute found!"); 589 return; 590 } 495 591 const G4String attName = Transcode(attribute->getName()); 496 592 const G4String attValue = Transcode(attribute->getValue()); … … 543 639 const xercesc::DOMElement* const child 544 640 = dynamic_cast<xercesc::DOMElement*>(iter); 641 if (!child) 642 { 643 G4Exception("G4GDMLReadMaterials::MaterialsRead()", "InvalidRead", 644 FatalException, "No child found!"); 645 return; 646 } 545 647 const G4String tag = Transcode(child->getTagName()); 546 648 -
trunk/source/persistency/gdml/src/G4GDMLReadParamvol.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadParamvol.cc,v 1.1 3 2009/04/24 15:34:20 gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadParamvol.cc,v 1.14 2010/10/14 16:19:40 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadParamvol Implementation … … 40 40 #include "G4VPhysicalVolume.hh" 41 41 42 G4GDMLReadParamvol::G4GDMLReadParamvol() : G4GDMLReadSetup() 42 G4GDMLReadParamvol::G4GDMLReadParamvol() 43 : G4GDMLReadSetup(), parameterisation(0) 43 44 { 44 45 } … … 67 68 const xercesc::DOMAttr* const attribute 68 69 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 70 if (!attribute) 71 { 72 G4Exception("G4GDMLReadParamvol::Box_dimensionsRead()", 73 "InvalidRead", FatalException, "No attribute found!"); 74 return; 75 } 69 76 const G4String attName = Transcode(attribute->getName()); 70 77 const G4String attValue = Transcode(attribute->getValue()); … … 100 107 const xercesc::DOMAttr* const attribute 101 108 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 109 if (!attribute) 110 { 111 G4Exception("G4GDMLReadParamvol::Trd_dimensionsRead()", 112 "InvalidRead", FatalException, "No attribute found!"); 113 return; 114 } 102 115 const G4String attName = Transcode(attribute->getName()); 103 116 const G4String attValue = Transcode(attribute->getValue()); … … 138 151 const xercesc::DOMAttr* const attribute 139 152 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 153 if (!attribute) 154 { 155 G4Exception("G4GDMLReadParamvol::Trap_dimensionsRead()", 156 "InvalidRead", FatalException, "No attribute found!"); 157 return; 158 } 140 159 const G4String attName = Transcode(attribute->getName()); 141 160 const G4String attValue = Transcode(attribute->getValue()); … … 202 221 const xercesc::DOMAttr* const attribute 203 222 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 223 if (!attribute) 224 { 225 G4Exception("G4GDMLReadParamvol::Tube_dimensionsRead()", 226 "InvalidRead", FatalException, "No attribute found!"); 227 return; 228 } 204 229 const G4String attName = Transcode(attribute->getName()); 205 230 const G4String attValue = Transcode(attribute->getValue()); … … 248 273 const xercesc::DOMAttr* const attribute 249 274 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 275 if (!attribute) 276 { 277 G4Exception("G4GDMLReadParamvol::Cone_dimensionsRead()", 278 "InvalidRead", FatalException, "No attribute found!"); 279 return; 280 } 250 281 const G4String attName = Transcode(attribute->getName()); 251 282 const G4String attValue = Transcode(attribute->getValue()); … … 300 331 const xercesc::DOMAttr* const attribute 301 332 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 333 if (!attribute) 334 { 335 G4Exception("G4GDMLReadParamvol::Sphere_dimensionsRead()", 336 "InvalidRead", FatalException, "No attribute found!"); 337 return; 338 } 302 339 const G4String attName = Transcode(attribute->getName()); 303 340 const G4String attValue = Transcode(attribute->getValue()); … … 348 385 const xercesc::DOMAttr* const attribute 349 386 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 387 if (!attribute) 388 { 389 G4Exception("G4GDMLReadParamvol::Orb_dimensionsRead()", 390 "InvalidRead", FatalException, "No attribute found!"); 391 return; 392 } 350 393 const G4String attName = Transcode(attribute->getName()); 351 394 const G4String attValue = Transcode(attribute->getValue()); … … 378 421 const xercesc::DOMAttr* const attribute 379 422 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 423 if (!attribute) 424 { 425 G4Exception("G4GDMLReadParamvol::Torus_dimensionsRead()", 426 "InvalidRead", FatalException, "No attribute found!"); 427 return; 428 } 380 429 const G4String attName = Transcode(attribute->getName()); 381 430 const G4String attValue = Transcode(attribute->getValue()); … … 424 473 const xercesc::DOMAttr* const attribute 425 474 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 475 if (!attribute) 476 { 477 G4Exception("G4GDMLReadParamvol::Para_dimensionsRead()", 478 "InvalidRead", FatalException, "No attribute found!"); 479 return; 480 } 426 481 const G4String attName = Transcode(attribute->getName()); 427 482 const G4String attValue = Transcode(attribute->getValue()); … … 473 528 const xercesc::DOMAttr* const attribute 474 529 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 530 if (!attribute) 531 { 532 G4Exception("G4GDMLReadParamvol::Hype_dimensionsRead()", 533 "InvalidRead", FatalException, "No attribute found!"); 534 return; 535 } 475 536 const G4String attName = Transcode(attribute->getName()); 476 537 const G4String attValue = Transcode(attribute->getValue()); … … 514 575 const xercesc::DOMElement* const child 515 576 = dynamic_cast<xercesc::DOMElement*>(iter); 577 if (!child) 578 { 579 G4Exception("G4GDMLReadParamvol::ParametersRead()", 580 "InvalidRead", FatalException, "No child found!"); 581 return; 582 } 516 583 const G4String tag = Transcode(child->getTagName()); 517 584 if (tag=="rotation") { VectorRead(child,rotation); } else … … 560 627 const xercesc::DOMElement* const child 561 628 = dynamic_cast<xercesc::DOMElement*>(iter); 629 if (!child) 630 { 631 G4Exception("G4GDMLReadParamvol::ParameterisedRead()", 632 "InvalidRead", FatalException, "No child found!"); 633 return; 634 } 562 635 const G4String tag = Transcode(child->getTagName()); 563 636 … … 578 651 const xercesc::DOMAttr* const attribute 579 652 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 653 if (!attribute) 654 { 655 G4Exception("G4GDMLReadParamvol::ParameterisedRead()", 656 "InvalidRead", FatalException, "No attribute found!"); 657 return; 658 } 580 659 const G4String attName = Transcode(attribute->getName()); 581 660 const G4String attValue = Transcode(attribute->getValue()); … … 602 681 const xercesc::DOMElement* const child 603 682 = dynamic_cast<xercesc::DOMElement*>(iter); 683 if (!child) 684 { 685 G4Exception("G4GDMLReadParamvol::Paramvol_contentRead()", "InvalidRead", 686 FatalException, "No child found!"); 687 return; 688 } 604 689 const G4String tag = Transcode(child->getTagName()); 605 690 if (tag=="parameterised_position_size") { ParameterisedRead(child); }else … … 622 707 const xercesc::DOMElement* const child 623 708 = dynamic_cast<xercesc::DOMElement*>(iter); 709 if (!child) 710 { 711 G4Exception("G4GDMLReadParamvol::ParamvolRead()", "InvalidRead", 712 FatalException, "No child found!"); 713 return; 714 } 624 715 const G4String tag = Transcode(child->getTagName()); 625 716 -
trunk/source/persistency/gdml/src/G4GDMLReadSetup.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadSetup.cc,v 1.1 0 2009/03/24 15:47:33gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadSetup.cc,v 1.11 2010/10/14 16:19:40 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadSetup Implementation … … 79 79 const xercesc::DOMAttr* const attribute 80 80 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 81 if (!attribute) 82 { 83 G4Exception("G4GDMLReadSetup::SetupRead()", 84 "InvalidRead", FatalException, "No attribute found!"); 85 return; 86 } 81 87 const G4String attName = Transcode(attribute->getName()); 82 88 const G4String attValue = Transcode(attribute->getValue()); … … 92 98 const xercesc::DOMElement* const child 93 99 = dynamic_cast<xercesc::DOMElement*>(iter); 100 if (!child) 101 { 102 G4Exception("G4GDMLReadSetup::SetupRead()", 103 "InvalidRead", FatalException, "No child found!"); 104 return; 105 } 94 106 const G4String tag = Transcode(child->getTagName()); 95 107 -
trunk/source/persistency/gdml/src/G4GDMLReadSolids.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadSolids.cc,v 1.3 1 2010/06/03 14:19:49gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadSolids.cc,v 1.32 2010/10/14 16:19:40 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadSolids Implementation … … 102 102 const xercesc::DOMAttr* const attribute 103 103 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 104 if (!attribute) 105 { 106 G4Exception("G4GDMLReadSolids::BooleanRead()", 107 "InvalidRead", FatalException, "No attribute found!"); 108 return; 109 } 104 110 const G4String attName = Transcode(attribute->getName()); 105 111 const G4String attValue = Transcode(attribute->getValue()); … … 115 121 const xercesc::DOMElement* const child 116 122 = dynamic_cast<xercesc::DOMElement*>(iter); 123 if (!child) 124 { 125 G4Exception("G4GDMLReadSolids::BooleanRead()", 126 "InvalidRead", FatalException, "No child found!"); 127 return; 128 } 117 129 const G4String tag = Transcode(child->getTagName()); 118 130 … … 186 198 const xercesc::DOMAttr* const attribute 187 199 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 200 if (!attribute) 201 { 202 G4Exception("G4GDMLReadSolids::BoxRead()", 203 "InvalidRead", FatalException, "No attribute found!"); 204 return; 205 } 188 206 const G4String attName = Transcode(attribute->getName()); 189 207 const G4String attValue = Transcode(attribute->getValue()); … … 231 249 const xercesc::DOMAttr* const attribute 232 250 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 251 if (!attribute) 252 { 253 G4Exception("G4GDMLReadSolids::ConeRead()", 254 "InvalidRead", FatalException, "No attribute found!"); 255 return; 256 } 233 257 const G4String attName = Transcode(attribute->getName()); 234 258 const G4String attValue = Transcode(attribute->getValue()); … … 281 305 const xercesc::DOMAttr* const attribute 282 306 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 307 if (!attribute) 308 { 309 G4Exception("G4GDMLReadSolids::ElconeRead()", 310 "InvalidRead", FatalException, "No attribute found!"); 311 return; 312 } 283 313 const G4String attName = Transcode(attribute->getName()); 284 314 const G4String attValue = Transcode(attribute->getValue()); … … 325 355 const xercesc::DOMAttr* const attribute 326 356 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 357 if (!attribute) 358 { 359 G4Exception("G4GDMLReadSolids::EllipsoidRead()", 360 "InvalidRead", FatalException, "No attribute found!"); 361 return; 362 } 327 363 const G4String attName = Transcode(attribute->getName()); 328 364 const G4String attValue = Transcode(attribute->getValue()); … … 369 405 const xercesc::DOMAttr* const attribute 370 406 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 407 if (!attribute) 408 { 409 G4Exception("G4GDMLReadSolids::EltubeRead()", 410 "InvalidRead", FatalException, "No attribute found!"); 411 return; 412 } 371 413 const G4String attName = Transcode(attribute->getName()); 372 414 const G4String attValue = Transcode(attribute->getValue()); … … 405 447 const xercesc::DOMAttr* const attribute 406 448 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 449 if (!attribute) 450 { 451 G4Exception("G4GDMLReadSolids::XtruRead()", 452 "InvalidRead", FatalException, "No attribute found!"); 453 return; 454 } 407 455 const G4String attName = Transcode(attribute->getName()); 408 456 const G4String attValue = Transcode(attribute->getValue()); … … 422 470 const xercesc::DOMElement* const child 423 471 = dynamic_cast<xercesc::DOMElement*>(iter); 472 if (!child) 473 { 474 G4Exception("G4GDMLReadSolids::XtruRead()", 475 "InvalidRead", FatalException, "No child found!"); 476 return; 477 } 424 478 const G4String tag = Transcode(child->getTagName()); 425 479 … … 458 512 const xercesc::DOMAttr* const attribute 459 513 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 514 if (!attribute) 515 { 516 G4Exception("G4GDMLReadSolids::HypeRead()", 517 "InvalidRead", FatalException, "No attribute found!"); 518 return; 519 } 460 520 const G4String attName = Transcode(attribute->getName()); 461 521 const G4String attValue = Transcode(attribute->getValue()); … … 500 560 const xercesc::DOMAttr* const attribute 501 561 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 562 if (!attribute) 563 { 564 G4Exception("G4GDMLReadSolids::OrbRead()", 565 "InvalidRead", FatalException, "No attribute found!"); 566 return; 567 } 502 568 const G4String attName = Transcode(attribute->getName()); 503 569 const G4String attValue = Transcode(attribute->getValue()); … … 539 605 const xercesc::DOMAttr* const attribute 540 606 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 607 if (!attribute) 608 { 609 G4Exception("G4GDMLReadSolids::ParaRead()", 610 "InvalidRead", FatalException, "No attribute found!"); 611 return; 612 } 541 613 const G4String attName = Transcode(attribute->getName()); 542 614 const G4String attValue = Transcode(attribute->getValue()); … … 587 659 const xercesc::DOMAttr* const attribute 588 660 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 661 if (!attribute) 662 { 663 G4Exception("G4GDMLReadSolids::ParaboloidRead()", 664 "InvalidRead", FatalException, "No attribute found!"); 665 return; 666 } 589 667 const G4String attName = Transcode(attribute->getName()); 590 668 const G4String attValue = Transcode(attribute->getValue()); … … 628 706 const xercesc::DOMAttr* const attribute 629 707 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 708 if (!attribute) 709 { 710 G4Exception("G4GDMLReadSolids::PolyconeRead()", 711 "InvalidRead", FatalException, "No attribute found!"); 712 return; 713 } 630 714 const G4String attName = Transcode(attribute->getName()); 631 715 const G4String attValue = Transcode(attribute->getValue()); … … 650 734 const xercesc::DOMElement* const child 651 735 = dynamic_cast<xercesc::DOMElement*>(iter); 736 if (!child) 737 { 738 G4Exception("G4GDMLReadSolids::PolyconeRead()", 739 "InvalidRead", FatalException, "No child found!"); 740 return; 741 } 652 742 const G4String tag = Transcode(child->getTagName()); 653 743 … … 696 786 const xercesc::DOMAttr* const attribute 697 787 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 788 if (!attribute) 789 { 790 G4Exception("G4GDMLReadSolids::PolyhedraRead()", 791 "InvalidRead", FatalException, "No attribute found!"); 792 return; 793 } 698 794 const G4String attName = Transcode(attribute->getName()); 699 795 const G4String attValue = Transcode(attribute->getValue()); … … 719 815 const xercesc::DOMElement* const child 720 816 = dynamic_cast<xercesc::DOMElement*>(iter); 817 if (!child) 818 { 819 G4Exception("G4GDMLReadSolids::PolyhedraRead()", 820 "InvalidRead", FatalException, "No child found!"); 821 return; 822 } 721 823 const G4String tag = Transcode(child->getTagName()); 722 824 … … 765 867 const xercesc::DOMAttr* const attribute 766 868 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 869 if (!attribute) 870 { 871 G4Exception("G4GDMLReadSolids::QuadrangularRead()", 872 "InvalidRead", FatalException, "No attribute found!"); 873 return 0; 874 } 767 875 const G4String attName = Transcode(attribute->getName()); 768 876 const G4String attValue = Transcode(attribute->getValue()); … … 808 916 const xercesc::DOMAttr* const attribute 809 917 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 918 if (!attribute) 919 { 920 G4Exception("G4GDMLReadSolids::ReflectedSolidRead()", 921 "InvalidRead", FatalException, "No attribute found!"); 922 return; 923 } 810 924 const G4String attName = Transcode(attribute->getName()); 811 925 const G4String attValue = Transcode(attribute->getValue()); … … 856 970 const xercesc::DOMAttr* const attribute 857 971 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 972 if (!attribute) 973 { 974 G4Exception("G4GDMLReadSolids::SectionRead()", 975 "InvalidRead", FatalException, "No attribute found!"); 976 return G4ExtrudedSolid::ZSection(zPosition,Offset,scalingFactor); 977 } 858 978 const G4String attName = Transcode(attribute->getName()); 859 979 const G4String attValue = Transcode(attribute->getValue()); … … 899 1019 const xercesc::DOMAttr* const attribute 900 1020 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1021 if (!attribute) 1022 { 1023 G4Exception("G4GDMLReadSolids::SphereRead()", 1024 "InvalidRead", FatalException, "No attribute found!"); 1025 return; 1026 } 901 1027 const G4String attName = Transcode(attribute->getName()); 902 1028 const G4String attValue = Transcode(attribute->getValue()); … … 942 1068 const xercesc::DOMAttr* const attribute 943 1069 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1070 if (!attribute) 1071 { 1072 G4Exception("G4GDMLReadSolids::TessellatedRead()", 1073 "InvalidRead", FatalException, "No attribute found!"); 1074 return; 1075 } 944 1076 const G4String attName = Transcode(attribute->getName()); 945 1077 const G4String attValue = Transcode(attribute->getValue()); … … 957 1089 const xercesc::DOMElement* const child 958 1090 = dynamic_cast<xercesc::DOMElement*>(iter); 1091 if (!child) 1092 { 1093 G4Exception("G4GDMLReadSolids::TessellatedRead()", 1094 "InvalidRead", FatalException, "No child found!"); 1095 return; 1096 } 959 1097 const G4String tag = Transcode(child->getTagName()); 960 1098 … … 990 1128 const xercesc::DOMAttr* const attribute 991 1129 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1130 if (!attribute) 1131 { 1132 G4Exception("G4GDMLReadSolids::TetRead()", 1133 "InvalidRead", FatalException, "No attribute found!"); 1134 return; 1135 } 992 1136 const G4String attName = Transcode(attribute->getName()); 993 1137 const G4String attValue = Transcode(attribute->getValue()); … … 1033 1177 const xercesc::DOMAttr* const attribute 1034 1178 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1179 if (!attribute) 1180 { 1181 G4Exception("G4GDMLReadSolids::TorusRead()", 1182 "InvalidRead", FatalException, "No attribute found!"); 1183 return; 1184 } 1035 1185 const G4String attName = Transcode(attribute->getName()); 1036 1186 const G4String attValue = Transcode(attribute->getValue()); … … 1079 1229 const xercesc::DOMAttr* const attribute 1080 1230 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1231 if (!attribute) 1232 { 1233 G4Exception("G4GDMLReadSolids::GenTrapRead()", 1234 "InvalidRead", FatalException, "No attribute found!"); 1235 return; 1236 } 1081 1237 const G4String attName = Transcode(attribute->getName()); 1082 1238 const G4String attValue = Transcode(attribute->getValue()); … … 1147 1303 const xercesc::DOMAttr* const attribute 1148 1304 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1305 if (!attribute) 1306 { 1307 G4Exception("G4GDMLReadSolids::TrapRead()", 1308 "InvalidRead", FatalException, "No attribute found!"); 1309 return; 1310 } 1149 1311 const G4String attName = Transcode(attribute->getName()); 1150 1312 const G4String attValue = Transcode(attribute->getValue()); … … 1205 1367 const xercesc::DOMAttr* const attribute 1206 1368 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1369 if (!attribute) 1370 { 1371 G4Exception("G4GDMLReadSolids::TrdRead()", 1372 "InvalidRead", FatalException, "No attribute found!"); 1373 return; 1374 } 1207 1375 const G4String attName = Transcode(attribute->getName()); 1208 1376 const G4String attValue = Transcode(attribute->getValue()); … … 1249 1417 const xercesc::DOMAttr* const attribute 1250 1418 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1419 if (!attribute) 1420 { 1421 G4Exception("G4GDMLReadSolids::TriangularRead()", 1422 "InvalidRead", FatalException, "No attribute found!"); 1423 return 0; 1424 } 1251 1425 const G4String attName = Transcode(attribute->getName()); 1252 1426 const G4String attValue = Transcode(attribute->getValue()); … … 1290 1464 const xercesc::DOMAttr* const attribute 1291 1465 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1466 if (!attribute) 1467 { 1468 G4Exception("G4GDMLReadSolids::TubeRead()", 1469 "InvalidRead", FatalException, "No attribute found!"); 1470 return; 1471 } 1292 1472 const G4String attName = Transcode(attribute->getName()); 1293 1473 const G4String attValue = Transcode(attribute->getValue()); … … 1337 1517 const xercesc::DOMAttr* const attribute 1338 1518 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1519 if (!attribute) 1520 { 1521 G4Exception("G4GDMLReadSolids::TwistedboxRead()", 1522 "InvalidRead", FatalException, "No attribute found!"); 1523 return; 1524 } 1339 1525 const G4String attName = Transcode(attribute->getName()); 1340 1526 const G4String attValue = Transcode(attribute->getValue()); … … 1389 1575 const xercesc::DOMAttr* const attribute 1390 1576 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1577 if (!attribute) 1578 { 1579 G4Exception("G4GDMLReadSolids::TwistedtrapRead()", 1580 "InvalidRead", FatalException, "No attribute found!"); 1581 return; 1582 } 1391 1583 const G4String attName = Transcode(attribute->getName()); 1392 1584 const G4String attValue = Transcode(attribute->getValue()); … … 1451 1643 const xercesc::DOMAttr* const attribute 1452 1644 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1645 if (!attribute) 1646 { 1647 G4Exception("G4GDMLReadSolids::TwistedtrdRead()", 1648 "InvalidRead", FatalException, "No attribute found!"); 1649 return; 1650 } 1453 1651 const G4String attName = Transcode(attribute->getName()); 1454 1652 const G4String attValue = Transcode(attribute->getValue()); … … 1501 1699 const xercesc::DOMAttr* const attribute 1502 1700 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1701 if (!attribute) 1702 { 1703 G4Exception("G4GDMLReadSolids::TwistedtubsRead()", 1704 "InvalidRead", FatalException, "No attribute found!"); 1705 return; 1706 } 1503 1707 const G4String attName = Transcode(attribute->getName()); 1504 1708 const G4String attValue = Transcode(attribute->getValue()); … … 1541 1745 const xercesc::DOMAttr* const attribute 1542 1746 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1747 if (!attribute) 1748 { 1749 G4Exception("G4GDMLReadSolids::TwoDimVertexRead()", 1750 "InvalidRead", FatalException, "No attribute found!"); 1751 return vec; 1752 } 1543 1753 const G4String attName = Transcode(attribute->getName()); 1544 1754 const G4String attValue = Transcode(attribute->getValue()); … … 1554 1764 ZplaneRead(const xercesc::DOMElement* const zplaneElement) 1555 1765 { 1556 zplaneType zplane ;1766 zplaneType zplane = {0.,0.,0.}; 1557 1767 1558 1768 const xercesc::DOMNamedNodeMap* const attributes … … 1569 1779 const xercesc::DOMAttr* const attribute 1570 1780 = dynamic_cast<xercesc::DOMAttr*>(node); 1781 if (!attribute) 1782 { 1783 G4Exception("G4GDMLReadSolids::ZplaneRead()", 1784 "InvalidRead", FatalException, "No attribute found!"); 1785 return zplane; 1786 } 1571 1787 const G4String attName = Transcode(attribute->getName()); 1572 1788 const G4String attValue = Transcode(attribute->getValue()); … … 1603 1819 const xercesc::DOMAttr* const attribute 1604 1820 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 1821 if (!attribute) 1822 { 1823 G4Exception("G4GDMLReadSolids::OpticalSurfaceRead()", 1824 "InvalidRead", FatalException, "No attribute found!"); 1825 return; 1826 } 1605 1827 const G4String attName = Transcode(attribute->getName()); 1606 1828 const G4String attValue = Transcode(attribute->getValue()); … … 1705 1927 const xercesc::DOMElement* const child 1706 1928 = dynamic_cast<xercesc::DOMElement*>(iter); 1929 if (!child) 1930 { 1931 G4Exception("G4GDMLReadSolids::SolidsRead()", 1932 "InvalidRead", FatalException, "No child found!"); 1933 return; 1934 } 1707 1935 const G4String tag = Transcode(child->getTagName()); 1708 1936 if (tag=="define") { DefineRead(child); } else -
trunk/source/persistency/gdml/src/G4GDMLReadStructure.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadStructure.cc,v 1.6 2 2009/09/24 15:04:34gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadStructure.cc,v 1.67 2010/11/02 10:39:27 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadStructure Implementation … … 47 47 #include "G4VisAttributes.hh" 48 48 49 G4GDMLReadStructure::G4GDMLReadStructure() : G4GDMLReadParamvol() 49 G4GDMLReadStructure::G4GDMLReadStructure() 50 : G4GDMLReadParamvol(), pMotherLogical(0) 50 51 { 51 52 } … … 58 59 AuxiliaryRead(const xercesc::DOMElement* const auxiliaryElement) 59 60 { 60 G4GDMLAuxPairType auxpair ;61 G4GDMLAuxPairType auxpair = {"",""}; 61 62 62 63 const xercesc::DOMNamedNodeMap* const attributes … … 74 75 const xercesc::DOMAttr* const attribute 75 76 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 77 if (!attribute) 78 { 79 G4Exception("G4GDMLReadStructure::AuxiliaryRead()", 80 "InvalidRead", FatalException, "No attribute found!"); 81 return auxpair; 82 } 76 83 const G4String attName = Transcode(attribute->getName()); 77 84 const G4String attValue = Transcode(attribute->getValue()); 78 85 79 86 if (attName=="auxtype") { auxpair.type = attValue; } else 80 if (attName=="auxvalue") { auxpair.value = eval.Evaluate(attValue); } 87 // if (attName=="auxvalue") { auxpair.value = eval.Evaluate(attValue); } 88 if (attName=="auxvalue") { auxpair.value = attValue; } 81 89 } 82 90 … … 107 115 const xercesc::DOMAttr* const attribute 108 116 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 117 if (!attribute) 118 { 119 G4Exception("G4GDMLReadStructure::BorderSurfaceRead()", 120 "InvalidRead", FatalException, "No attribute found!"); 121 return; 122 } 109 123 const G4String attName = Transcode(attribute->getName()); 110 124 const G4String attValue = Transcode(attribute->getValue()); … … 123 137 const xercesc::DOMElement* const child 124 138 = dynamic_cast<xercesc::DOMElement*>(iter); 139 if (!child) 140 { 141 G4Exception("G4GDMLReadStructure::BorderSurfaceRead()", 142 "InvalidRead", FatalException, "No child found!"); 143 return; 144 } 125 145 const G4String tag = Transcode(child->getTagName()); 126 146 … … 162 182 const xercesc::DOMAttr* const attribute 163 183 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 184 if (!attribute) 185 { 186 G4Exception("G4GDMLReadStructure::DivisionvolRead()", 187 "InvalidRead", FatalException, "No attribute found!"); 188 return; 189 } 164 190 const G4String attName = Transcode(attribute->getName()); 165 191 const G4String attValue = Transcode(attribute->getValue()); … … 190 216 const xercesc::DOMElement* const child 191 217 = dynamic_cast<xercesc::DOMElement*>(iter); 218 if (!child) 219 { 220 G4Exception("G4GDMLReadStructure::DivisionvolRead()", 221 "InvalidRead", FatalException, "No child found!"); 222 return; 223 } 192 224 const G4String tag = Transcode(child->getTagName()); 193 225 194 226 if (tag=="volumeref") { logvol = GetVolume(GenerateName(RefRead(child))); } 195 227 } 228 229 if (!logvol) { return; } 196 230 197 231 G4PVDivisionFactory::GetInstance(); … … 239 273 const xercesc::DOMAttr* const attribute 240 274 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 275 if (!attribute) 276 { 277 G4Exception("G4GDMLReadStructure::FileRead()", 278 "InvalidRead", FatalException, "No attribute found!"); 279 return 0; 280 } 241 281 const G4String attName = Transcode(attribute->getName()); 242 282 const G4String attValue = Transcode(attribute->getValue()); … … 299 339 const xercesc::DOMAttr* const attribute 300 340 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 341 if (!attribute) 342 { 343 G4Exception("G4GDMLReadStructure::PhysvolRead()", 344 "InvalidRead", FatalException, "No attribute found!"); 345 return; 346 } 301 347 const G4String attName = Transcode(attribute->getName()); 302 348 const G4String attValue = Transcode(attribute->getValue()); … … 312 358 const xercesc::DOMElement* const child 313 359 = dynamic_cast<xercesc::DOMElement*>(iter); 360 if (!child) 361 { 362 G4Exception("G4GDMLReadStructure::PhysvolRead()", 363 "InvalidRead", FatalException, "No child found!"); 364 return; 365 } 314 366 const G4String tag = Transcode(child->getTagName()); 315 367 … … 339 391 G4Exception("G4GDMLReadStructure::PhysvolRead()", "ReadError", 340 392 FatalException, error_msg); 393 return; 341 394 } 342 395 } … … 347 400 if (pAssembly) // Fill assembly structure 348 401 { 402 if (!logvol) { return; } 349 403 pAssembly->AddPlacedVolume(logvol, transform); 350 404 } … … 357 411 else 358 412 { 413 if (!logvol) { return; } 359 414 G4String pv_name = logvol->GetName() + "_PV"; 360 415 G4PhysicalVolumesPair pair = G4ReflectionFactory::Instance() … … 378 433 const xercesc::DOMElement* const child 379 434 = dynamic_cast<xercesc::DOMElement*>(iter); 435 if (!child) 436 { 437 G4Exception("G4GDMLReadStructure::ReplicavolRead()", 438 "InvalidRead", FatalException, "No child found!"); 439 return; 440 } 380 441 const G4String tag = Transcode(child->getTagName()); 381 442 … … 386 447 else if (tag=="replicate_along_axis") 387 448 { 388 ReplicaRead(child,logvol,number);449 if (logvol) { ReplicaRead(child,logvol,number); } 389 450 } 390 451 else … … 415 476 const xercesc::DOMElement* const child 416 477 = dynamic_cast<xercesc::DOMElement*>(iter); 478 if (!child) 479 { 480 G4Exception("G4GDMLReadStructure::ReplicaRead()", 481 "InvalidRead", FatalException, "No child found!"); 482 return; 483 } 417 484 const G4String tag = Transcode(child->getTagName()); 418 485 … … 451 518 AxisRead(const xercesc::DOMElement* const axisElement) 452 519 { 453 454 520 EAxis axis = kUndefined; 455 521 … … 468 534 const xercesc::DOMAttr* const attribute 469 535 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 536 if (!attribute) 537 { 538 G4Exception("G4GDMLReadStructure::AxisRead()", 539 "InvalidRead", FatalException, "No attribute found!"); 540 return axis; 541 } 470 542 const G4String attName = Transcode(attribute->getName()); 471 543 const G4String attValue = Transcode(attribute->getValue()); … … 503 575 const xercesc::DOMAttr* const attribute 504 576 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 577 if (!attribute) 578 { 579 G4Exception("G4GDMLReadStructure::QuantityRead()", 580 "InvalidRead", FatalException, "No attribute found!"); 581 return value; 582 } 505 583 const G4String attName = Transcode(attribute->getName()); 506 584 const G4String attValue = Transcode(attribute->getValue()); … … 531 609 const xercesc::DOMElement* const child 532 610 = dynamic_cast<xercesc::DOMElement*>(iter); 611 if (!child) 612 { 613 G4Exception("G4GDMLReadStructure::VolumeRead()", 614 "InvalidRead", FatalException, "No child found!"); 615 return; 616 } 533 617 const G4String tag = Transcode(child->getTagName()); 534 618 … … 565 649 const xercesc::DOMElement* const child 566 650 = dynamic_cast<xercesc::DOMElement*>(iter); 651 if (!child) 652 { 653 G4Exception("G4GDMLReadStructure::AssemblyRead()", 654 "InvalidRead", FatalException, "No child found!"); 655 return; 656 } 567 657 const G4String tag = Transcode(child->getTagName()); 568 658 … … 600 690 const xercesc::DOMAttr* const attribute 601 691 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 692 if (!attribute) 693 { 694 G4Exception("G4GDMLReadStructure::SkinsurfaceRead()", 695 "InvalidRead", FatalException, "No attribute found!"); 696 return; 697 } 602 698 const G4String attName = Transcode(attribute->getName()); 603 699 const G4String attValue = Transcode(attribute->getValue()); … … 616 712 const xercesc::DOMElement* const child 617 713 = dynamic_cast<xercesc::DOMElement*>(iter); 714 if (!child) 715 { 716 G4Exception("G4GDMLReadStructure::SkinsurfaceRead()", 717 "InvalidRead", FatalException, "No child found!"); 718 return; 719 } 618 720 const G4String tag = Transcode(child->getTagName()); 619 721 … … 643 745 const xercesc::DOMElement* const child 644 746 = dynamic_cast<xercesc::DOMElement*>(iter); 747 if (!child) 748 { 749 G4Exception("G4GDMLReadStructure::Volume_contentRead()", 750 "InvalidRead", FatalException, "No child found!"); 751 return; 752 } 645 753 const G4String tag = Transcode(child->getTagName()); 646 754 … … 674 782 const xercesc::DOMAttr* const attribute 675 783 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 784 if (!attribute) 785 { 786 G4Exception("G4GDMLReadStructure::Volume_contentRead()", 787 "InvalidRead", FatalException, "No attribute found!"); 788 return; 789 } 676 790 const G4String attName = Transcode(attribute->getName()); 677 791 const G4String attValue = Transcode(attribute->getValue()); … … 711 825 const xercesc::DOMElement* const child 712 826 = dynamic_cast<xercesc::DOMElement*>(iter); 827 if (!child) 828 { 829 G4Exception("G4GDMLReadStructure::StructureRead()", 830 "InvalidRead", FatalException, "No child found!"); 831 return; 832 } 713 833 const G4String tag = Transcode(child->getTagName()); 714 834 … … 768 888 769 889 G4GDMLAuxListType G4GDMLReadStructure:: 770 GetVolumeAuxiliaryInformation( const G4LogicalVolume* const logvol)890 GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const 771 891 { 772 892 G4GDMLAuxMapType::const_iterator pos = auxMap.find(logvol); … … 786 906 G4LogicalVolume* volume = GetVolume(Strip(GetSetup(setupName))); 787 907 volume->SetVisAttributes(G4VisAttributes::Invisible); 788 G4VPhysicalVolume* pvWorld = 789 new G4PVPlacement(0,G4ThreeVector(0,0,0),volume,setupName,0,0,0); 908 909 G4VPhysicalVolume* pvWorld = 0; 910 911 if(setuptoPV[setupName]) 912 { 913 pvWorld = setuptoPV[setupName]; 914 } 915 else 916 { 917 pvWorld = new G4PVPlacement(0,G4ThreeVector(0,0,0),volume, 918 volume->GetName()+"_PV",0,0,0); 919 setuptoPV[setupName] = pvWorld; 920 } 790 921 return pvWorld; 791 922 } 923 924 void G4GDMLReadStructure::Clear() 925 { 926 eval.Clear(); 927 setuptoPV.clear(); 928 } -
trunk/source/persistency/gdml/src/G4GDMLWrite.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLWrite.cc,v 1.5 5 2009/04/24 15:34:20gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLWrite.cc,v 1.58 2010/11/02 10:55:03 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLWrite Implementation … … 45 45 G4bool G4GDMLWrite::addPointerToName = true; 46 46 47 G4GDMLWrite::G4GDMLWrite() : extElement(0)47 G4GDMLWrite::G4GDMLWrite() : doc(0), extElement(0) 48 48 { 49 49 } … … 155 155 156 156 xercesc::XMLString::transcode("LS", tempStr, 99); 157 xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr); 158 xercesc::XMLString::transcode("Range", tempStr, 99); 157 159 xercesc::DOMImplementation* impl = 158 160 xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr); 159 xercesc::XMLString::transcode("Range", tempStr, 99);160 impl = xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr);161 161 xercesc::XMLString::transcode("gdml", tempStr, 99); 162 162 doc = impl->createDocument(0,tempStr,0); … … 255 255 G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException, 256 256 "Invalid NULL pointer is specified for modularization!"); 257 return; 257 258 } 258 259 if (dynamic_cast<const G4PVDivision*>(physvol)) … … 260 261 G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException, 261 262 "It is not possible to modularize by divisionvol!"); 263 return; 262 264 } 263 265 if (physvol->IsParameterised()) … … 265 267 G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException, 266 268 "It is not possible to modularize by parameterised volume!"); 269 return; 267 270 } 268 271 if (physvol->IsReplicated()) … … 270 273 G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException, 271 274 "It is not possible to modularize by replicated volume!"); 275 return; 272 276 } 273 277 -
trunk/source/persistency/gdml/src/G4GDMLWriteDefine.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLWriteDefine.cc,v 1. 19 2009/03/24 15:47:33gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLWriteDefine.cc,v 1.20 2010/10/14 16:19:40 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLWriteDefine Implementation … … 40 40 const G4double G4GDMLWriteDefine::kLinearPrecision = DBL_EPSILON; 41 41 42 G4GDMLWriteDefine::G4GDMLWriteDefine() : G4GDMLWrite() 42 G4GDMLWriteDefine::G4GDMLWriteDefine() 43 : G4GDMLWrite(), defineElement(0) 43 44 { 44 45 } -
trunk/source/persistency/gdml/src/G4GDMLWriteMaterials.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLWriteMaterials.cc,v 1.2 5 2010/02/18 17:38:24gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLWriteMaterials.cc,v 1.26 2010/10/14 16:19:40 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLWriteMaterials Implementation … … 41 41 #include "G4Material.hh" 42 42 43 G4GDMLWriteMaterials:: 44 G4GDMLWriteMaterials() : G4GDMLWriteDefine() 45 { 46 } 47 48 G4GDMLWriteMaterials:: 49 ~G4GDMLWriteMaterials() 43 G4GDMLWriteMaterials::G4GDMLWriteMaterials() 44 : G4GDMLWriteDefine(), materialsElement(0) 45 { 46 } 47 48 G4GDMLWriteMaterials::~G4GDMLWriteMaterials() 50 49 { 51 50 } -
trunk/source/persistency/gdml/src/G4GDMLWriteSolids.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLWriteSolids.cc,v 1.6 8 2010/06/03 14:19:49gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLWriteSolids.cc,v 1.69 2010/10/14 16:19:40 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLWriteSolids Implementation … … 68 68 #include "G4SurfaceProperty.hh" 69 69 70 G4GDMLWriteSolids:: 71 G4GDMLWriteSolids() : G4GDMLWriteMaterials() 72 { 73 } 74 75 G4GDMLWriteSolids:: 76 ~G4GDMLWriteSolids() 70 G4GDMLWriteSolids::G4GDMLWriteSolids() 71 : G4GDMLWriteMaterials(), solidsElement(0) 72 { 73 } 74 75 G4GDMLWriteSolids::~G4GDMLWriteSolids() 77 76 { 78 77 } -
trunk/source/persistency/gdml/src/G4GDMLWriteStructure.cc
r1337 r1347 25 25 // 26 26 // 27 // $Id: G4GDMLWriteStructure.cc,v 1.8 1 2010/05/20 12:56:57gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4GDMLWriteStructure.cc,v 1.83 2010/10/14 16:19:40 gcosmo Exp $ 28 // GEANT4 tag $Name: gdml-V09-03-09 $ 29 29 // 30 30 // class G4GDMLWriteStructure Implementation … … 75 75 else if (axis==kZAxis) { axisString = "kZAxis"; } 76 76 else if (axis==kRho) { axisString = "kRho"; } 77 else if (axis==kPhi) { axisString = "kPhi"; unitString = " degree"; }77 else if (axis==kPhi) { axisString = "kPhi"; unitString = "rad"; } 78 78 79 79 const G4String name … … 188 188 { dirElement->setAttributeNode(NewAttribute("rho","1")); } 189 189 else if(axis==kPhi) 190 { dirElement->setAttributeNode(NewAttribute("phi","1")); } 190 { dirElement->setAttributeNode(NewAttribute("phi","1")); 191 unitString="rad"; } 191 192 replicateElement->appendChild(dirElement); 192 193 … … 231 232 if (FindOpticalSurface(psurf)) 232 233 { 233 OpticalSurfaceWrite(solidsElement, 234 dynamic_cast<const G4OpticalSurface*>(psurf)); 234 const G4OpticalSurface* opsurf = 235 dynamic_cast<const G4OpticalSurface*>(psurf); 236 if (!opsurf) 237 { 238 G4Exception("G4GDMLWriteStructure::BorderSurfaceCache()", 239 "InvalidSetup", FatalException, "No optical surface found!"); 240 return; 241 } 242 OpticalSurfaceWrite(solidsElement, opsurf); 235 243 } 236 244 … … 260 268 if (FindOpticalSurface(psurf)) 261 269 { 262 OpticalSurfaceWrite(solidsElement, 263 dynamic_cast<const G4OpticalSurface*>(psurf)); 270 const G4OpticalSurface* opsurf = 271 dynamic_cast<const G4OpticalSurface*>(psurf); 272 if (!opsurf) 273 { 274 G4Exception("G4GDMLWriteStructure::SkinSurfaceCache()", 275 "InvalidSetup", FatalException, "No optical surface found!"); 276 return; 277 } 278 OpticalSurfaceWrite(solidsElement, opsurf); 264 279 } 265 280 -
trunk/source/persistency/gdml/src/G4STRead.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4STRead.cc,v 1. 4 2009/04/24 15:34:20gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4STRead.cc,v 1.6 2010/11/02 10:39:27 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4STRead Implementation … … 123 123 stream >> level >> name >> r1 >> r2 >> r3 >> n1 >> r4 >> r5 >> r6 124 124 >> n2 >> r7 >> r8 >> r9 >> n3 >> pX >> pY >> pZ >> n4 >> n5; 125 126 name.resize(name.rfind("_")); 125 std::string::size_type idx = name.rfind("_"); 126 if (idx!=std::string::npos) 127 { 128 name.resize(idx); 129 } 130 else 131 { 132 G4Exception("G4STRead::PhysvolRead()", "ReadError", 133 FatalException, "Invalid input stream!"); 134 return; 135 } 127 136 128 137 G4cout << "G4STRead: Placing tessellated solid: " << name << G4endl; -
trunk/source/persistency/mctruth/include/G4PersistencyCenter.hh
r818 r1347 37 37 #include <map> 38 38 #include "G4HCIOcatalog.hh" 39 #include "G4VHCIOentry.hh"40 39 #include "G4DCIOcatalog.hh" 41 #include "G4VDCIOentry.hh"42 40 43 41 #ifndef WIN32 -
trunk/source/persistency/mctruth/src/G4MCTSimParticle.cc
r818 r1347 43 43 ///////////////////////////////// 44 44 G4MCTSimParticle::G4MCTSimParticle() 45 : parentParticle(0), 45 : parentParticle(0), pdgID(0), 46 46 trackID(0), parentTrackID(0), 47 47 primaryFlag(false), -
trunk/source/persistency/mctruth/src/G4MCTSimVertex.cc
r818 r1347 43 43 ///////////////////////////////////// 44 44 G4MCTSimVertex::G4MCTSimVertex() 45 : inParticleTrackID(0),id(-1), 45 : inParticleTrackID(0),id(-1), time(0.), 46 46 volumeName(""), volumeNumber(-1), 47 47 creatorProcessName("none"), -
trunk/source/persistency/mctruth/src/G4PersistencyCenter.cc
r818 r1347 37 37 #include "G4UImanager.hh" 38 38 #include "G4PersistencyManager.hh" 39 #include "G4VHCIOentry.hh" 40 #include "G4VDCIOentry.hh" 39 41 40 42 G4PersistencyCenter* G4PersistencyCenter::f_thePointer=G4PersistencyCenter::GetPersistencyCenter(); … … 74 76 } 75 77 76 // Implementation of Constructor #2 77 G4PersistencyCenter::G4PersistencyCenter(const G4PersistencyCenter&) 78 {} 78 // Fake implementation of Copy Constructor 79 G4PersistencyCenter::G4PersistencyCenter(const G4PersistencyCenter& c) 80 : f_theMessenger(0), f_currentManager(0), m_verbose(0) 81 { 82 *this = c; 83 } 79 84 80 85 // Implementation of Destructor #1 … … 96 101 void G4PersistencyCenter::SelectSystem(std::string systemName) 97 102 { 98 int st = 0;103 G4int st = 0; 99 104 100 105 if (f_currentManager!=0) delete f_currentManager; … … 102 107 G4PersistencyManager* pm = 0; 103 108 104 if (systemName=="None") 105 { 106 G4cout<<" G4PersistencyCenter: Default is selected."<< G4endl; 107 pm = new G4PersistencyManager(this, "Default"); 108 } 109 else if (systemName=="ROOT") 109 if (systemName=="ROOT") 110 110 { 111 111 G4cout<<" G4PersistencyCenter: \"ROOT\" Persistency Package is selected." … … 128 128 } 129 129 } 130 else 131 { 132 G4cout<<" G4PersistencyCenter: Default is selected."<< G4endl; 133 pm = new G4PersistencyManager(this, "Default"); 134 } 135 130 136 if ( st == 0 ) { 131 137 f_currentManager = pm->Create();
Note:
See TracChangeset
for help on using the changeset viewer.
