Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (15 years ago)
Author:
garnier
Message:

geant4 tag 9.4

Location:
trunk/source/persistency
Files:
122 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/persistency/ascii/GNUmakefile

    r1035 r1347  
    1 # $Id: GNUmakefile,v 1.3 2008/11/21 16:27:42 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.6 2010/10/13 07:56:55 gcosmo Exp $
    22# -----------------------------------------------------------------------
    33# GNUmakefile for persistency library.  Gabriele Cosmo, 16/11/96.
  • trunk/source/persistency/ascii/History

    r1337 r1347  
    1 $Id: History,v 1.14 2010/06/14 15:09:34 gcosmo Exp $
     1$Id: History,v 1.19 2010/12/15 11:32:48 arce Exp $
    22-------------------------------------------------------------------
    33     =========================================================
     
    1616     * Reverse chronological order (last date on top), please *
    1717     ----------------------------------------------------------
     18
     1915 December, 10 P.Arce (ascii-V09-03-05)
     20- Introduced fixes for Coverity reports...
     21 
     227 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
     262 November, 10  G.Cosmo (ascii-V09-03-03)
     27- Fixed minor left Coverity reports.
     28
     2913 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
     423 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.
    1845
    194614 June, 10  G.Cosmo (ascii-V09-03-00)
  • trunk/source/persistency/ascii/include/G4tgbDetectorBuilder.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbDetectorBuilder.hh,v 1.2.6.1 2010/06/14 15:09:19 gcosmo 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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbDetectorConstruction.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbDetectorConstruction.hh,v 1.2 2008/12/18 12:58:02 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbElement.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbElement.hh,v 1.2 2008/12/18 12:58:04 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbIsotope.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbIsotope.hh,v 1.2 2008/12/18 12:58:06 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterial.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterial.hh,v 1.5 2008/12/18 12:58:08 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialMgr.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMgr.hh,v 1.4 2008/12/18 12:58:10 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialMixture.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixture.hh,v 1.2 2008/12/18 12:58:12 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByNoAtoms.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByNoAtoms.hh,v 1.3 2008/12/18 12:58:14 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByVolume.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByVolume.hh,v 1.4 2008/12/18 12:58:16 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialMixtureByWeight.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByWeight.hh,v 1.2 2008/12/18 12:58:18 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbMaterialSimple.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialSimple.hh,v 1.2 2008/12/18 12:58:20 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbPlaceParamCircle.hh

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbPlaceParamLinear.hh

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbPlaceParamSquare.hh

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbPlaceParameterisation.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbPlaceParameterisation.hh,v 1.4 2008/11/21 15:37:18 gcosmo 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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbRotationMatrix.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbRotationMatrix.hh,v 1.2 2008/12/18 12:58:22 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbRotationMatrixMgr.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbRotationMatrixMgr.hh,v 1.2 2008/12/18 12:58:24 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbVolume.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbVolume.hh,v 1.4 2008/12/18 12:58:26 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgbVolumeMgr.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbVolumeMgr.hh,v 1.3 2008/12/18 12:58:28 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrElement.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrElement.hh,v 1.2 2008/12/18 12:58:30 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrElementFromIsotopes.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrElementFromIsotopes.hh,v 1.6 2008/12/18 12:58:32 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrElementSimple.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrElementSimple.hh,v 1.6 2008/12/18 12:58:34 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrEvaluator.hh

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrFileIn.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrFileIn.hh,v 1.3 2008/12/18 12:58:36 gunter Exp $
    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 $
    2929//
    3030//
     
    7777  private:
    7878
    79     G4tgrFileIn( const G4String& name ) : theName(name) {}
     79    G4tgrFileIn( const G4String& name ) : theCurrentFile(-1), theName(name) {}
    8080
    8181  private:
  • trunk/source/persistency/ascii/include/G4tgrFileReader.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrFileReader.hh,v 1.2 2008/11/12 08:41:19 arce Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrIsotope.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrIsotope.hh,v 1.4 2008/12/18 12:58:38 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrLineProcessor.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrLineProcessor.hh,v 1.1 2008/10/23 14:43:43 gcosmo 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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrMaterial.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterial.hh,v 1.5 2008/12/18 12:58:40 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrMaterialFactory.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialFactory.hh,v 1.2 2008/12/18 12:58:42 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrMaterialMixture.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialMixture.hh,v 1.2 2008/12/18 12:58:44 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrMaterialSimple.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialSimple.hh,v 1.2 2008/12/18 12:58:46 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrMessenger.hh

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrParameterMgr.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrParameterMgr.hh,v 1.2 2008/12/18 12:58:48 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrPlace.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlace.hh,v 1.4 2008/12/18 12:58:50 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrPlaceDivRep.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceDivRep.hh,v 1.5 2008/12/18 12:58:52 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrPlaceParameterisation.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceParameterisation.hh,v 1.7 2008/12/18 12:58:54 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrPlaceSimple.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceSimple.hh,v 1.5 2008/12/18 12:58:56 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrRotationMatrix.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrRotationMatrix.hh,v 1.5 2008/12/18 12:58:58 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrRotationMatrixFactory.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrRotationMatrixFactory.hh,v 1.2 2008/12/18 12:59:00 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrSolid.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrSolid.hh,v 1.2 2008/12/18 12:59:02 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrSolidBoolean.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrSolidBoolean.hh,v 1.2 2008/12/18 12:59:04 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrUtils.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrUtils.hh,v 1.6 2008/12/18 12:59:06 gunter Exp $
    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 $
    2929//
    3030//
     
    6464    static G4bool IsInteger( const G4double val,
    6565                             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 );
    6867      // Checks that every character in a G4String is a number
    6968      // (also '.' or exponencial notation: 'E')
  • trunk/source/persistency/ascii/include/G4tgrVolume.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolume.hh,v 1.10 2009/11/23 11:38:54 arce Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrVolumeAssembly.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeAssembly.hh,v 1.5 2008/12/18 12:59:10 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrVolumeDivision.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeDivision.hh,v 1.5 2008/12/18 12:59:12 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/include/G4tgrVolumeMgr.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeMgr.hh,v 1.5 2008/12/18 12:59:14 gunter Exp $
    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 $
    2929//
    3030//
     
    5353#include <map>
    5454
    55 typedef std::map< const G4String, const G4tgrSolid* > G4mapssol;
    56 typedef std::map< const G4String, const G4tgrVolume* > G4mapsvol;
     55typedef std::map< G4String, G4tgrSolid* > G4mapssol;
     56typedef std::map< G4String, G4tgrVolume* > G4mapsvol;
    5757typedef std::multimap< const G4String, const G4tgrPlace* > G4mmapspl;
    5858
  • trunk/source/persistency/ascii/src/G4tgbDetectorBuilder.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbDetectorBuilder.cc,v 1.4 2008/12/18 12:59:16 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbDetectorConstruction.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbDetectorConstruction.cc,v 1.4 2008/12/18 12:59:18 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbElement.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbElement.cc,v 1.4 2008/12/18 12:59:20 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbGeometryDumper.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbGeometryDumper.cc,v 1.12 2009/11/19 13:29:04 arce Exp $
    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 $
    2929//
    3030//
     
    8181//------------------------------------------------------------------------
    8282G4tgbGeometryDumper::G4tgbGeometryDumper()
    83 {
    84 
    85   theRotationNumber = 0;
     83  : theFile(0), theRotationNumber(0)
     84{
    8685}
    8786
     
    649648  } else if (solidType == "REFLECTEDSOLID") {
    650649    G4ReflectedSolid* solidrefl = dynamic_cast<G4ReflectedSolid*>(solid);
     650    if (!solidrefl)
     651    {
     652      G4Exception("G4tgbGeometryDumper::DumpSolid()",
     653                  "InvalidType", FatalException, "Invalid reflected solid!");
     654      return solidName;
     655    }
    651656    G4VSolid* solidori = solidrefl->GetConstituentMovedSolid();
    652657    DumpSolid( solidori );
     
    669674{
    670675  G4BooleanSolid * bso = dynamic_cast < G4BooleanSolid * > (so);
     676  if (!bso)  { return; }
    671677  G4VSolid* solid0 = bso->GetConstituentSolid( 0 );
    672678  G4VSolid* solid1 = bso->GetConstituentSolid( 1 );
     
    676682  {
    677683    solid1Disp = dynamic_cast<G4DisplacedSolid*>(solid1);
    678     solid1 = solid1Disp->GetConstituentMovedSolid();
     684    if (solid1Disp)  { solid1 = solid1Disp->GetConstituentMovedSolid(); }
    679685  }
    680686  DumpSolid( solid0 );
     
    736742  if (solidType == "BOX")  {
    737743    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    }
    742749  } else if (solidType == "TUBS") {
    743750    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    }
    750758  } else if (solidType == "TRAP") {
    751759    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    }
    768776  } else if (solidType == "TRD") {
    769777    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    }
    776785  } else if (solidType == "PARA") {
    777786    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    }
    790798  } else if (solidType == "CONS") {
    791799    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    }
    800809  } else if (solidType == "SPHERE") {
    801810    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    }
    809819  } else if (solidType == "ORB") {
    810820    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    }
    813824  } else if (solidType == "TORUS") {
    814825    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    }
    821833  } else if (solidType == "POLYCONE") {
    822834    //--- Dump RZ corners, as original parameters will not be present
    823835    //    if it was build from RZ corners
    824836    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 );
    825844   
    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    }
    840851  } else if (solidType == "POLYHEDRA") {
    841852    //--- Dump RZ corners, as original parameters will not be present
    842853    //    if it was build from RZ corners
    843854    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();
    844860   
    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    }
    861872  } else if (solidType == "ELLIPTICALTUBE") {
    862873    const G4EllipticalTube * eltu =
    863874          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    }
    868880  } else if (solidType == "ELLIPSOID" ){
    869881    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    }
    876889  } else if (solidType == "ELLIPTICAL_CONE") {
    877890    const G4EllipticalCone * elco =
    878891          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    }
    884898  } else if (solidType == "HYPE") {
    885899    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    }
    892907//  } else if( solidType == "TET" ) {
    893908
    894909  } else if( solidType == "TWISTEDBOX" ) {
    895910    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    }
    901917  } else if( solidType == "TWISTEDTRAP" ) {
    902918    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    }
    915932  } else if( solidType == "TWISTEDTRD" ) {
    916933    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    }
    924942  } else if( solidType == "TWISTEDTUBS" ) {
    925943    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    }
    932951  }
    933952  else
     
    945964G4String G4tgbGeometryDumper::DumpRotationMatrix( G4RotationMatrix* rotm )
    946965{
     966  if (!rotm)  { rotm = new G4RotationMatrix(); }
     967
    947968  G4double de = MatDeterminant(rotm);
    948  
    949969  G4String rotName = LookForExistingRotation( rotm );
    950970  if( rotName != "" )  { return rotName; }
    951 
    952   if (!rotm)  { rotm = new G4RotationMatrix(); }
    953971
    954972  G4ThreeVector v(1.,1.,1.);
  • trunk/source/persistency/ascii/src/G4tgbIsotope.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbIsotope.cc,v 1.4 2008/12/18 12:59:24 gunter Exp $
    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 $
    2929//
    3030//
     
    4040//----------------------------------------------------------------------
    4141G4tgbIsotope::G4tgbIsotope()
     42  : theTgrIsot(0), theG4Isot(0)
    4243{
    4344}
  • trunk/source/persistency/ascii/src/G4tgbMaterial.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterial.cc,v 1.2 2008/12/18 12:59:26 gunter Exp $
    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 $
    2929//
    3030//
     
    4141// -------------------------------------------------------------------------
    4242G4tgbMaterial::G4tgbMaterial()
     43  : theTgrMate(0), theG4Mate(0)
    4344{
    4445}
     
    5152// -------------------------------------------------------------------------
    5253G4tgbMaterial::G4tgbMaterial( G4tgrMaterial* hg )
     54  : theTgrMate(hg), theG4Mate(0)
    5355{
    54   theTgrMate = hg;
    55   theG4Mate = 0;
    5656}
    5757
  • trunk/source/persistency/ascii/src/G4tgbMaterialMgr.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMgr.cc,v 1.5 2008/12/18 12:59:28 gunter Exp $
    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 $
    2929//
    3030//
     
    151151    } else if( tgr->GetType() == "MaterialMixtureByVolume" ) {
    152152      tgb = new G4tgbMaterialMixtureByVolume( tgr );
    153     }
     153    } else {
     154      return;
     155    }
    154156    theG4tgbMaterials[tgb->GetName()] = tgb;
    155157  }
  • trunk/source/persistency/ascii/src/G4tgbMaterialMixture.cc

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByNoAtoms.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByNoAtoms.cc,v 1.6 2008/12/18 12:59:30 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByVolume.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByVolume.cc,v 1.8 2008/12/18 12:59:32 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbMaterialMixtureByWeight.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialMixtureByWeight.cc,v 1.4 2008/12/18 12:59:34 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbMaterialSimple.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbMaterialSimple.cc,v 1.5 2008/12/18 12:59:36 gunter Exp $
    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 $
    2929//
    3030//
     
    4141// -------------------------------------------------------------------------
    4242G4tgbMaterialSimple::G4tgbMaterialSimple()
     43  : theZ(0.), theA(0.)
    4344{
    4445}
  • trunk/source/persistency/ascii/src/G4tgbPlaceParamCircle.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbPlaceParamCircle.cc,v 1.5 2008/12/03 16:16:01 arce Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbPlaceParamLinear.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbPlaceParamLinear.cc,v 1.5 2008/12/03 16:16:01 arce Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbPlaceParamSquare.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbPlaceParamSquare.cc,v 1.6 2008/12/03 16:16:01 arce Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbPlaceParameterisation.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbPlaceParameterisation.cc,v 1.4 2008/11/21 15:37:18 gcosmo 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 $
    2929//
    3030// class G4tgbPlaceParameterisation
     
    4545G4tgbPlaceParameterisation::
    4646G4tgbPlaceParameterisation( G4tgrPlaceParameterisation* tgrParam)
     47  : theNCopies(0), theAxis(kUndefined)
    4748{
    4849  theRotationMatrix = G4tgbRotationMatrixMgr::GetInstance()
     
    5253G4tgbPlaceParameterisation::~G4tgbPlaceParameterisation()
    5354{
     55  delete theRotationMatrix;
    5456}
    5557
  • trunk/source/persistency/ascii/src/G4tgbRotationMatrix.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbRotationMatrix.cc,v 1.8 2008/12/18 12:59:38 gunter Exp $
    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 $
    2929//
    3030//
     
    4343// -------------------------------------------------------------------------
    4444G4tgbRotationMatrix::G4tgbRotationMatrix()
     45  : theTgrRM(0), theG4RM(0)
    4546{
    4647}
     
    5556// -------------------------------------------------------------------------
    5657G4tgbRotationMatrix::G4tgbRotationMatrix( G4tgrRotationMatrix* tgr )
     58  : theTgrRM(tgr), theG4RM(0)
    5759{
    58   theTgrRM = tgr;
    5960}
    6061
  • trunk/source/persistency/ascii/src/G4tgbRotationMatrixMgr.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbRotationMatrixMgr.cc,v 1.2 2008/12/18 12:59:40 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgbVolume.cc

    r1228 r1347  
    2424// ********************************************************************
    2525//
     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 $
    2629//
    2730//
     
    110113//-------------------------------------------------------------------
    111114G4tgbVolume::G4tgbVolume()
     115  : theTgrVolume(0), theG4AssemblyVolume(0)
    112116{
    113117}
     
    155159        g4vmgr->RegisterMe( logvol );
    156160        g4vmgr->RegisterChildParentLVs( logvol, parentLV );
    157        
    158       }
    159     }
     161      }
     162      else
     163      {
     164        return;
     165      }
     166    }
     167    else
     168    {
     169      return;
     170    }
    160171  }
    161172  //--- Construct PhysVol
     
    291302      G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    292303                  "InvalidSetup", FatalException, ErrMessage);
     304      return 0;
    293305    }
    294306   
     
    367379      G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    368380                  "InvalidSetup", FatalException, ErrMessage);
     381      return 0;
    369382    }
    370383
     
    427440      G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    428441                  "InvalidSetup", FatalException, ErrMessage);
     442      return 0;
    429443    }
    430444   
     
    655669        G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    656670                    "InvalidSetup", FatalException, ErrMessage);
     671        return 0;
    657672      }
    658673     
     
    679694          G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    680695                      "InvalidSetup", FatalException, ErrMessage);
     696          return 0;
    681697        }
    682698        facet = new G4TriangularFacet( pt0, vt1, vt2, vertexType );
     
    705721          G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    706722                      "InvalidSetup", FatalException, ErrMessage);
     723          return 0;
    707724        }
    708725        facet = new G4QuadrangularFacet( pt0, vt1, vt2, vt3, vertexType );
     
    716733        G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    717734                    "InvalidSetup", FatalException, ErrMessage);
     735        return 0;
    718736      }
    719737     
     
    748766  {
    749767    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    }
    750774    G4VSolid* sol1 = FindOrConstructG4Solid( solb->GetSolid(0));
    751775    G4VSolid* sol2 = FindOrConstructG4Solid( solb->GetSolid(1));
     
    771795      G4Exception("G4tgbVolume::FindOrConstructG4Solid()",
    772796                  "InvalidSetup", FatalException, ErrMessage);
     797      return 0;
    773798    }
    774799  }
     
    779804    G4Exception("G4tgbVolume::FindOrConstructG4Solid()", "NotImplemented",
    780805                FatalException, ErrMessage);
     806    return 0;
    781807  }
    782808 
     
    10691095          G4Exception("G4tgbVolume::ConstructG4PhysVol", "WrongArgument",
    10701096                      FatalException, ErrMessage);
     1097          return 0;
    10711098        }
    10721099#ifdef G4VERBOSE
     
    12491276          }
    12501277#endif
    1251 
    12521278        }
    12531279      }
     
    13841410    G4Exception("G4tgbVolume::BuildSolidForDivision()", "NotImplemented",
    13851411                FatalException, ErrMessage);
     1412    return 0;
    13861413  }
    13871414
  • trunk/source/persistency/ascii/src/G4tgbVolumeMgr.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgbVolumeMgr.cc,v 1.5 2008/12/18 12:59:44 gunter Exp $
    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 $
    2929//
    3030//
     
    185185
    186186  G4VSolid* oldSolid = 0;
    187   G4mmssol::const_iterator mmsscite;
    188187  std::pair<G4mmssol::iterator, G4mmssol::iterator> mmssdi;
    189188  mmssdi = theSolids.equal_range( name );
    190189
    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    }
    199199#endif
    200200    /*
     
    214214    oldSolid = (*mmsscite).second;
    215215#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
    223222  }
    224223 
     
    226225  if( G4tgrMessenger::GetVerboseLevel() >= 2 )
    227226  {
    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
    232232  return oldSolid;
    233233}
  • trunk/source/persistency/ascii/src/G4tgrElement.cc

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrElementFromIsotopes.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrElementFromIsotopes.cc,v 1.5 2008/12/18 12:59:46 gunter Exp $
    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 $
    2929//
    3030//
     
    4242// -------------------------------------------------------------------------
    4343G4tgrElementFromIsotopes::G4tgrElementFromIsotopes()
     44  : theNoIsotopes(0)
    4445{
    4546}
  • trunk/source/persistency/ascii/src/G4tgrElementSimple.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrElementSimple.cc,v 1.5 2008/12/18 12:59:48 gunter Exp $
    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 $
    2929//
    3030//
     
    4141// -------------------------------------------------------------------------
    4242G4tgrElementSimple::G4tgrElementSimple()
     43  : theZ(0.), theA(0.)
    4344{
    4445}
  • trunk/source/persistency/ascii/src/G4tgrEvaluator.cc

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrFileIn.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrFileIn.cc,v 1.9 2008/12/18 12:59:50 gunter Exp $
    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 $
    2929//
    3030//
     
    3939#include <iostream>
    4040#include <fstream>
     41#include <sstream>
    4142
    4243#include "G4tgrFileIn.hh"
     
    5051//-----------------------------------------------------------------------
    5152G4tgrFileIn::G4tgrFileIn()
     53  : theCurrentFile(-1), theName("")
    5254{
    5355}
     
    5759G4tgrFileIn::~G4tgrFileIn()
    5860{
    59   return;
     61/*
    6062  std::vector<G4tgrFileIn*>::const_iterator vfcite;
    6163  for( vfcite = theInstances.begin(); vfcite != theInstances.end(); vfcite++)
     
    6365    delete *vfcite;
    6466  }
     67*/
    6568}
    6669
  • trunk/source/persistency/ascii/src/G4tgrFileReader.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrFileReader.cc,v 1.4 2008/11/12 08:44:07 arce Exp $
    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 $
    2929//
    3030//
     
    6565G4tgrFileReader::~G4tgrFileReader()
    6666{
     67  delete theLineProcessor;
    6768  delete theInstance;
    6869}
  • trunk/source/persistency/ascii/src/G4tgrIsotope.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrIsotope.cc,v 1.5 2008/12/18 12:59:52 gunter Exp $
    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 $
    2929//
    3030//
     
    4242//-------------------------------------------------------------
    4343G4tgrIsotope::G4tgrIsotope()
     44  : theName(""), theZ(0), theN(0), theA(0.)
    4445{
    4546}
  • trunk/source/persistency/ascii/src/G4tgrLineProcessor.cc

    r1035 r1347  
    158158      G4Exception("G4tgrLineProcessor::ProcessLine()", "Material not found",
    159159                  FatalException, G4tgrUtils::GetString( wl[1] ) );
     160      return false;
    160161    }
    161162    mate->SetIonisationMeanExcitationEnergy( G4tgrUtils::GetDouble( wl[2] ) );
  • trunk/source/persistency/ascii/src/G4tgrMaterial.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterial.cc,v 1.3 2008/11/21 15:37:18 gcosmo 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 $
    2929//
    3030//
     
    4040// -------------------------------------------------------------------------
    4141G4tgrMaterial::G4tgrMaterial()
     42   : theName("Material"), theDensity(0.), theNoComponents(0),
     43     theMateType("Material"), theIonisationMeanExcitationEnergy(-1.)
    4244{
    43   theIonisationMeanExcitationEnergy = -1.;
    4445}
    4546
  • trunk/source/persistency/ascii/src/G4tgrMaterialFactory.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialFactory.cc,v 1.4 2008/12/18 12:59:54 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrMaterialMixture.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialMixture.cc,v 1.7 2008/12/18 12:59:56 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrMaterialSimple.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrMaterialSimple.cc,v 1.7 2008/12/18 12:59:58 gunter Exp $
    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 $
    2929//
    3030//
     
    4242//-------------------------------------------------------------
    4343G4tgrMaterialSimple::G4tgrMaterialSimple()
    44   : name("MaterialSimple")
     44  : name("MaterialSimple"), theA(0.), theZ(0.)
    4545{
    4646}
  • trunk/source/persistency/ascii/src/G4tgrMessenger.cc

    r1337 r1347  
    2626//
    2727// $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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrParameterMgr.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrParameterMgr.cc,v 1.6 2008/12/18 13:00:00 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrPlace.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlace.cc,v 1.3 2008/11/03 17:04:41 arce Exp $
    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 $
    2929//
    3030//
     
    3939// -------------------------------------------------------------------------
    4040G4tgrPlace::G4tgrPlace()
     41   : theVolume(0), theParentName(""), theCopyNo(0), theType("")
    4142{
    4243}
  • trunk/source/persistency/ascii/src/G4tgrPlaceDivRep.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceDivRep.cc,v 1.4 2008/11/21 15:37:18 gcosmo 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 $
    2929//
    3030//
     
    4242//-------------------------------------------------------------
    4343G4tgrPlaceDivRep::G4tgrPlaceDivRep()
     44  : theNDiv(0), theWidth(0.), theAxis(kUndefined),
     45    theOffset(0.), theDivType(DivByNdivAndWidth)
    4446{
    45   theOffset = 0.;
    4647}
    4748
  • trunk/source/persistency/ascii/src/G4tgrPlaceParameterisation.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceParameterisation.cc,v 1.6 2008/12/18 13:00:02 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrPlaceSimple.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrPlaceSimple.cc,v 1.5 2008/12/18 13:00:04 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrRotationMatrix.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrRotationMatrix.cc,v 1.5 2008/12/18 13:00:06 gunter Exp $
    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 $
    2929//
    3030//
     
    4242// -------------------------------------------------------------------------
    4343G4tgrRotationMatrix::G4tgrRotationMatrix()
     44  : theName("Rotation-Matrix"), theInputType(rm9)
    4445{
    4546}
     
    5354
    5455// -------------------------------------------------------------------------
    55 G4tgrRotationMatrix::G4tgrRotationMatrix( const std::vector<G4String>& wl )
     56G4tgrRotationMatrix::G4tgrRotationMatrix( const std::vector<G4String>& wl )
     57  : theInputType(rm9)
    5658{
    5759  theName = G4tgrUtils::GetString( wl[1] );
  • trunk/source/persistency/ascii/src/G4tgrRotationMatrixFactory.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrRotationMatrixFactory.cc,v 1.2 2008/12/18 13:00:08 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrSolid.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrSolid.cc,v 1.6 2008/12/18 13:00:10 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrSolidBoolean.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrSolidBoolean.cc,v 1.4 2008/12/18 13:00:12 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrUtils.cc

    r1035 r1347  
    7878G4bool G4tgrUtils::IsNumber( const G4String& str)
    7979{
    80   G4int isnum = 1;
     80  G4int isnum = true;
    8181  G4int numE = 0;
    8282  for(size_t ii=0; ii<str.length(); ii++)
     
    9090        if(numE != 0 || ii == str.length()-1)
    9191        {
    92           isnum = 0;
     92          isnum = false;
    9393          break;
    9494        }
     
    9797      else
    9898      {
    99         isnum = 0;
     99        isnum = false;
    100100        break;
    101101      }
     
    123123void G4tgrUtils::Dump3v( const G4ThreeVector& vec, const char* msg)
    124124{
    125   G4cout << msg << std::setprecision(8) << vec << G4endl;
     125  G4cout << msg << std::setprecision(8)
     126         << vec << std::setprecision(6) << G4endl;
    126127}
    127128
     
    346347        //----- Check if it is a function
    347348        G4bool bWordOK = false;     
    348         if( G4tgrUtils::WordIsFunction( word ) )
     349        if( G4tgrUtils::IsFunction( word ) )
    349350        {
    350351          //--- It must be followed by '('
     
    360361        //----- Check if it is a unit     
    361362        }
    362         else if( G4tgrUtils::WordIsUnit( word ) )
     363        else if( !G4tgrUtils::IsNumber( word ) )
    363364        {
    364365          //--- It must be preceded by a *
     
    550551
    551552//-------------------------------------------------------------
    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 )
     553G4bool G4tgrUtils::IsFunction( const G4String& word )
    592554{
    593555  if(    word == "sin"
  • trunk/source/persistency/ascii/src/G4tgrVolume.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolume.cc,v 1.10 2009/11/23 11:36:29 arce 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 $
    2929//
    3030//
     
    4949//-------------------------------------------------------------
    5050G4tgrVolume::G4tgrVolume()
     51  : theName(""), theType(""),
     52    theMaterialName(""), theSolid(0), theVisibility(false),
     53    theRGBColour(0), theCheckOverlaps(false)
    5154{
    5255}
     
    5659G4tgrVolume::~G4tgrVolume()
    5760{
     61  delete [] theRGBColour;
    5862}
    5963
     
    104108#endif
    105109    }
    106 
    107110}
    108111
  • trunk/source/persistency/ascii/src/G4tgrVolumeAssembly.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeAssembly.cc,v 1.6 2008/12/18 13:00:18 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrVolumeDivision.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeDivision.cc,v 1.6 2008/12/18 13:00:20 gunter Exp $
    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 $
    2929//
    3030//
  • trunk/source/persistency/ascii/src/G4tgrVolumeMgr.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4tgrVolumeMgr.cc,v 1.7 2008/12/18 13:00:22 gunter Exp $
    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 $
    2929//
    3030//
     
    373373
    374374  //---------- construct the children of this VOL
    375   std::pair<G4mmapspl::const_iterator, G4mmapspl::const_iterator> children
     375  std::pair<G4mmapspl::iterator, G4mmapspl::iterator> children
    376376    = GetChildren( vol->GetName() );
    377377  G4mmapspl::const_iterator cite;
  • trunk/source/persistency/gdml/GNUmakefile

    r850 r1347  
    1 # $Id: GNUmakefile,v 1.10 2008/07/02 14:15:16 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.12 2010/11/02 10:40:24 gcosmo Exp $
    22# -----------------------------------------------------------------------
    33# GNUmakefile for persistency library.  Gabriele Cosmo, 16/11/96.
     
    1212include $(G4INSTALL)/config/architecture.gmk
    1313
    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
     14CPPFLAGS += \
     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
    3437 
    3538ifdef G4LIB_USE_GDML
  • trunk/source/persistency/gdml/History

    r1315 r1347  
    1 $Id: History,v 1.120 2010/06/02 13:55:02 gcosmo Exp $
     1$Id: History,v 1.128 2010/11/30 08:56:16 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     2030 Nov 2010 Gabriele Cosmo (gdml-V09-03-10)
     21- Fixed ambiguity in signature of Write() method in G4GDMLParser.
     22
     2317 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
     2904 Nov 2010 Gabriele Cosmo (gdml-V09-03-08)
     30- Fixed compilation warning on G4GDMLEvaluator.
     31
     3202 Nov 2010 Gabriele Cosmo (gdml-V09-03-07)
     33- Fixed minor left Coverity reports.
     34- Some code cleanup and updated CMake scripts.
     35
     3625 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
     4314 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
     4911 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
     5419 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.
    1957
    205802 Jun 2010 Gabriele Cosmo (gdml-V09-03-03)
  • trunk/source/persistency/gdml/include/G4GDMLEvaluator.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLEvaluator.hh,v 1.17 2009/04/24 15:34:20 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    5454   G4GDMLEvaluator();
    5555
     56   void Clear();
    5657   void DefineConstant(const G4String&, G4double);
    5758   void DefineVariable(const G4String&, G4double);
  • trunk/source/persistency/gdml/include/G4GDMLParameterisation.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLParameterisation.hh,v 1.10 2008/07/16 15:46:33 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    7373      G4double dimension[16];
    7474
    75       PARAMETER() { memset(dimension,0,sizeof(dimension)); }
     75      PARAMETER() : pRot(0) { memset(dimension,0,sizeof(dimension)); }
    7676   };
    7777
  • trunk/source/persistency/gdml/include/G4GDMLParser.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLParser.hh,v 1.59 2010/02/17 18:06:25 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    4545#include "G4GDMLWriteStructure.hh"
    4646#include "G4STRead.hh"
     47#include "G4GDMLMessenger.hh"
     48
     49#include "G4TransportationManager.hh"
     50#include "G4Navigator.hh"
     51
    4752
    4853#define G4GDML_DEFAULT_SCHEMALOCATION G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd")
     
    7075
    7176   inline void Write(const G4String& filename,
    72                      const G4VPhysicalVolume* const pvol = 0,
     77                     const G4VPhysicalVolume* pvol = 0,
    7378                           G4bool storeReferences = true,
    7479                     const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION);
     
    7984     // Alternative path for the schema location can be specified; by default
    8085     // 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.
    8198
    8299   inline G4LogicalVolume* ParseST(const G4String& name,
     
    101118   inline G4LogicalVolume* GetVolume(const G4String& name) const;
    102119   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;
    104122   inline void StripNamePointers() const;
     123   inline void SetStripFlag(G4bool);
    105124   inline void SetOverlapCheck(G4bool);
     125   inline void Clear();                  // Clears the evaluator
    106126
    107127   // Methods for Writer
     
    115135   G4GDMLReadStructure* reader;
    116136   G4GDMLWriteStructure* writer;
    117    G4bool urcode, uwcode;
     137   G4GDMLMessenger* messenger;
     138   G4bool urcode, uwcode, strip;
    118139
    119140};
  • trunk/source/persistency/gdml/include/G4GDMLParser.icc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLParser.icc,v 1.9 2010/02/17 18:06:25 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    3636void G4GDMLParser::Read(const G4String& filename, G4bool validate)
    3737{   
    38   reader->Read(filename,validate,false);
     38  reader->Read(filename,validate,false,strip);
    3939}
    4040
     
    4747inline
    4848void G4GDMLParser::Write(const G4String& filename,
    49                          const G4VPhysicalVolume* const pvol,
     49                         const G4VPhysicalVolume* pvol,
    5050                               G4bool refs,
    5151                         const G4String& schemaLocation)
     
    5656  if (!pvol)
    5757  {
    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();
    6560  }
    6661  else
    6762  {
    6863    lvol = pvol->GetLogicalVolume();
     64  }
     65
     66  writer->Write(filename,lvol,schemaLocation,depth,refs);
     67}
     68
     69inline
     70void 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();
    6981  }
    7082  writer->Write(filename,lvol,schemaLocation,depth,refs);
     
    145157inline
    146158G4GDMLAuxListType
    147 G4GDMLParser::GetVolumeAuxiliaryInformation(const G4LogicalVolume* const logvol)
     159G4GDMLParser::GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const
    148160{
    149161  return reader->GetVolumeAuxiliaryInformation(logvol);
     
    151163
    152164inline
     165const G4GDMLAuxMapType* G4GDMLParser::GetAuxMap() const
     166{
     167  return reader->GetAuxMap();
     168}
     169
     170inline
    153171void G4GDMLParser::StripNamePointers() const
    154172{
     
    156174}
    157175
     176inline void G4GDMLParser::SetStripFlag(G4bool flag)
     177{
     178  strip = flag;
     179}
     180
    158181inline void G4GDMLParser::SetOverlapCheck(G4bool flag)
    159182{
     
    161184}
    162185
     186inline void G4GDMLParser::Clear()
     187{
     188  reader->Clear();
     189}
     190
    163191//
    164192// Methods for Writer
  • trunk/source/persistency/gdml/include/G4GDMLRead.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLRead.hh,v 1.31 2009/05/12 15:46:43 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLRead
     
    115115     // More pure virtual methods implemented in the reader plugin.
    116116
    117    void Read(const G4String&, G4bool validation, G4bool isModule);
     117   void Read(const G4String&, G4bool validation,
     118             G4bool isModule, G4bool strip=true);
    118119     //
    119120     // Main method for reading GDML files.
  • trunk/source/persistency/gdml/include/G4GDMLReadStructure.hh

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLReadStructure.hh,v 1.28 2009/09/24 15:04:34 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    5454{
    5555   G4String type;
    56    G4double value;
     56   G4String value;
    5757};
    5858
    5959typedef std::vector<G4GDMLAuxPairType> G4GDMLAuxListType;
    60 typedef std::map<const G4LogicalVolume*,G4GDMLAuxListType> G4GDMLAuxMapType;
     60typedef std::map<G4LogicalVolume*,G4GDMLAuxListType> G4GDMLAuxMapType;
    6161typedef std::map<G4String, G4AssemblyVolume*> G4GDMLAssemblyMapType;
    6262
     
    7272   G4LogicalVolume* GetVolume(const G4String&) const;
    7373   G4AssemblyVolume* GetAssembly(const G4String&) const;
    74    G4GDMLAuxListType GetVolumeAuxiliaryInformation(const G4LogicalVolume* const);
     74   G4GDMLAuxListType GetVolumeAuxiliaryInformation(G4LogicalVolume*) const;
    7575   G4VPhysicalVolume* GetWorldVolume(const G4String&);
    7676   const G4GDMLAuxMapType* GetAuxMap() const;
     77   void Clear();   // Clears internal map and evaluator
    7778
    7879   virtual void VolumeRead(const xercesc::DOMElement* const);
     
    101102   G4GDMLAssemblyMapType assemblyMap;
    102103   G4LogicalVolume *pMotherLogical;
    103 
     104   std::map<std::string, G4VPhysicalVolume*> setuptoPV;
    104105};
    105106
  • trunk/source/persistency/gdml/src/G4GDMLEvaluator.cc

    r1228 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLEvaluator.cc,v 1.23 2009/04/24 15:34:20 gcosmo Exp $
     27// $Id: G4GDMLEvaluator.cc,v 1.26 2010/11/04 11:33:49 gcosmo Exp $
    2828// GEANT4 tag $ Name:$
    2929//
     
    4545   eval.setStdMath();
    4646   eval.setSystemOfUnits(meter,kilogram,second,ampere,kelvin,mole,candela);
     47}
     48
     49void G4GDMLEvaluator::Clear()
     50{
     51  eval.clear();
     52  eval.setStdMath();
     53  eval.setSystemOfUnits(meter,kilogram,second,ampere,kelvin,mole,candela);
     54
     55  variableList.clear();
    4756}
    4857
     
    153162   if (open==close) { return in; }
    154163
    155    if (open>close)
     164   if ((open>close) || (open==std::string::npos) || (close==std::string::npos))
    156165   {
    157166     G4String error_msg = "Bracket mismatch: " + in;
    158167     G4Exception("G4GDMLEvaluator::SolveBrackets()", "InvalidExpression",
    159168                 FatalException, error_msg);
     169     return in;
    160170   }
    161171
  • trunk/source/persistency/gdml/src/G4GDMLParser.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLParser.cc,v 1.14 2009/04/15 13:29:30 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    3636
    3737G4GDMLParser::G4GDMLParser()
    38   : urcode(false), uwcode(false)
     38  : urcode(false), uwcode(false), strip(true)
    3939{
    4040  reader = new G4GDMLReadStructure;
    4141  writer = new G4GDMLWriteStructure;
     42  messenger = new G4GDMLMessenger(this);
     43
    4244  xercesc::XMLPlatformUtils::Initialize();
    4345}
     
    4850  reader = extr;
    4951  writer = new G4GDMLWriteStructure;
     52  messenger = new G4GDMLMessenger(this);
     53
    5054  xercesc::XMLPlatformUtils::Initialize();
    5155}
     
    5761  reader = extr;
    5862  writer = extw;
     63  messenger = new G4GDMLMessenger(this);
     64
    5965  xercesc::XMLPlatformUtils::Initialize();
    6066}
     
    6571  if (!urcode) { delete reader; }
    6672  if (!uwcode) { delete writer; }
     73  delete messenger;
    6774}
  • trunk/source/persistency/gdml/src/G4GDMLRead.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLRead.cc,v 1.47 2009/05/12 15:46:43 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLRead Implementation
     
    199199      const xercesc::DOMAttr* const attribute
    200200            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     201      if (!attribute)
     202      {
     203        G4Exception("G4GDMLRead::LoopRead()", "InvalidRead",
     204                    FatalException, "No attribute found!");
     205        return;
     206      }
    201207      const G4String attribute_name = Transcode(attribute->getName());
    202208      const G4String attribute_value = Transcode(attribute->getValue());
     
    266272void G4GDMLRead::Read(const G4String& fileName,
    267273                            G4bool validation,
    268                             G4bool isModule)
     274                            G4bool isModule,
     275                            G4bool strip)
    269276{
    270277   if (isModule)
     
    305312     G4Exception("G4GDMLRead::Read()", "InvalidRead",
    306313                 FatalException, error_msg);
     314     return;
    307315   }
    308316   xercesc::DOMElement* element = doc->getDocumentElement();
     
    312320     G4Exception("G4GDMLRead::Read()", "InvalidRead",
    313321                 FatalException, "Empty document!");
     322     return;
    314323   }
    315324
     
    321330      const xercesc::DOMElement* const child
    322331            = dynamic_cast<xercesc::DOMElement*>(iter);
     332      if (!child)
     333      {
     334        G4Exception("G4GDMLRead::Read()", "InvalidRead",
     335                    FatalException, "No child found!");
     336        return;
     337      }
    323338      const G4String tag = Transcode(child->getTagName());
    324339
     
    337352   }
    338353
    339    if (parser)  { delete parser;  }
    340    if (handler) { delete handler; }
     354   delete parser;
     355   delete handler;
    341356
    342357   if (isModule)
     
    347362   {
    348363      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  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadDefine.cc,v 1.25 2010/02/17 18:06:25 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadDefine Implementation
     
    4242G4GDMLMatrix::G4GDMLMatrix(size_t rows0, size_t cols0)
    4343{   
    44    if ((rows<=0) || (cols<=0))
     44   if ((rows0==0) || (cols0==0))
    4545   {
    4646     G4Exception("G4GDMLMatrix::G4GDMLMatrix(r,c)", "InvalidSetup",
     
    161161      const xercesc::DOMAttr* const attribute
    162162            = dynamic_cast<xercesc::DOMAttr*>(node);   
     163      if (!attribute)
     164      {
     165        G4Exception("G4GDMLRead::ConstantRead()", "InvalidRead",
     166                    FatalException, "No attribute found!");
     167        return;
     168      }
    163169      const G4String attName = Transcode(attribute->getName());
    164170      const G4String attValue = Transcode(attribute->getValue());
     
    190196      const xercesc::DOMAttr* const attribute
    191197            = dynamic_cast<xercesc::DOMAttr*>(node);   
     198      if (!attribute)
     199      {
     200        G4Exception("G4GDMLRead::ExpressionRead()", "InvalidRead",
     201                    FatalException, "No attribute found!");
     202        return;
     203      }
    192204      const G4String attName = Transcode(attribute->getName());
    193205      const G4String attValue = Transcode(attribute->getValue());
     
    221233      const xercesc::DOMAttr* const attribute
    222234            = dynamic_cast<xercesc::DOMAttr*>(node);   
     235      if (!attribute)
     236      {
     237        G4Exception("G4GDMLRead::MatrixRead()", "InvalidRead",
     238                    FatalException, "No attribute found!");
     239        return;
     240      }
    223241      const G4String attName = Transcode(attribute->getName());
    224242      const G4String attValue = Transcode(attribute->getValue());
     
    271289      const xercesc::DOMAttr* const attribute
    272290            = dynamic_cast<xercesc::DOMAttr*>(node);   
     291      if (!attribute)
     292      {
     293        G4Exception("G4GDMLRead::PositionRead()", "InvalidRead",
     294                    FatalException, "No attribute found!");
     295        return;
     296      }
    273297      const G4String attName = Transcode(attribute->getName());
    274298      const G4String attValue = Transcode(attribute->getValue());
     
    304328      const xercesc::DOMAttr* const attribute
    305329            = dynamic_cast<xercesc::DOMAttr*>(node);   
     330      if (!attribute)
     331      {
     332        G4Exception("G4GDMLRead::RotationRead()", "InvalidRead",
     333                    FatalException, "No attribute found!");
     334        return;
     335      }
    306336      const G4String attName = Transcode(attribute->getName());
    307337      const G4String attValue = Transcode(attribute->getValue());
     
    335365      const xercesc::DOMAttr* const attribute
    336366            = dynamic_cast<xercesc::DOMAttr*>(node);   
     367      if (!attribute)
     368      {
     369        G4Exception("G4GDMLRead::ScaleRead()", "InvalidRead",
     370                    FatalException, "No attribute found!");
     371        return;
     372      }
    337373      const G4String attName = Transcode(attribute->getName());
    338374      const G4String attValue = Transcode(attribute->getValue());
     
    366402      const xercesc::DOMAttr* const attribute
    367403            = dynamic_cast<xercesc::DOMAttr*>(node);   
     404      if (!attribute)
     405      {
     406        G4Exception("G4GDMLRead::VariableRead()", "InvalidRead",
     407                    FatalException, "No attribute found!");
     408        return;
     409      }
    368410      const G4String attName = Transcode(attribute->getName());
    369411      const G4String attValue = Transcode(attribute->getValue());
     
    395437      const xercesc::DOMAttr* const attribute
    396438            = dynamic_cast<xercesc::DOMAttr*>(node);   
     439      if (!attribute)
     440      {
     441        G4Exception("G4GDMLRead::QuantityRead()", "InvalidRead",
     442                    FatalException, "No attribute found!");
     443        return;
     444      }
    397445      const G4String attName = Transcode(attribute->getName());
    398446      const G4String attValue = Transcode(attribute->getValue());
     
    419467      const xercesc::DOMElement* const child
    420468            = dynamic_cast<xercesc::DOMElement*>(iter);
     469      if (!child)
     470      {
     471        G4Exception("G4GDMLRead::DefineRead()", "InvalidRead",
     472                    FatalException, "No child found!");
     473        return;
     474      }
    421475      const G4String tag = Transcode(child->getTagName());
    422476
     
    458512      const xercesc::DOMAttr* const attribute
    459513            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     514      if (!attribute)
     515      {
     516        G4Exception("G4GDMLRead::VectorRead()", "InvalidRead",
     517                    FatalException, "No attribute found!");
     518        return;
     519      }
    460520      const G4String attName = Transcode(attribute->getName());
    461521      const G4String attValue = Transcode(attribute->getValue());
     
    487547      const xercesc::DOMAttr* const attribute
    488548            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     549      if (!attribute)
     550      {
     551        G4Exception("G4GDMLRead::Read()", "InvalidRead",
     552                    FatalException, "No attribute found!");
     553        return ref;
     554      }
    489555      const G4String attName = Transcode(attribute->getName());
    490556      const G4String attValue = Transcode(attribute->getValue());
  • trunk/source/persistency/gdml/src/G4GDMLReadMaterials.cc

    r1228 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLReadMaterials.cc,v 1.20 2009/04/24 15:34:20 gcosmo Exp $
     27// $Id: G4GDMLReadMaterials.cc,v 1.21 2010/10/14 16:19:40 gcosmo Exp $
    2828// GEANT4 tag $ Name:$
    2929//
     
    6969      const xercesc::DOMAttr* const attribute
    7070            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     71      if (!attribute)
     72      {
     73        G4Exception("G4GDMLReadMaterials::AtomRead()", "InvalidRead",
     74                    FatalException, "No attribute found!");
     75        return value;
     76      }
    7177      const G4String attName = Transcode(attribute->getName());
    7278      const G4String attValue = Transcode(attribute->getValue());
     
    98104      const xercesc::DOMAttr* const attribute
    99105            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     106      if (!attribute)
     107      {
     108        G4Exception("G4GDMLReadMaterials::CompositeRead()", "InvalidRead",
     109                    FatalException, "No attribute found!");
     110        return n;
     111      }
    100112      const G4String attName = Transcode(attribute->getName());
    101113      const G4String attValue = Transcode(attribute->getValue());
     
    127139      const xercesc::DOMAttr* const attribute
    128140            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     141      if (!attribute)
     142      {
     143        G4Exception("G4GDMLReadMaterials::DRead()", "InvalidRead",
     144                    FatalException, "No attribute found!");
     145        return value;
     146      }
    129147      const G4String attName = Transcode(attribute->getName());
    130148      const G4String attValue = Transcode(attribute->getValue());
     
    155173      const xercesc::DOMAttr* const attribute
    156174            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     175      if (!attribute)
     176      {
     177        G4Exception("G4GDMLReadMaterials::PRead()", "InvalidRead",
     178                    FatalException, "No attribute found!");
     179        return value;
     180      }
    157181      const G4String attName = Transcode(attribute->getName());
    158182      const G4String attValue = Transcode(attribute->getValue());
     
    183207      const xercesc::DOMAttr* const attribute
    184208            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     209      if (!attribute)
     210      {
     211        G4Exception("G4GDMLReadMaterials::TRead()", "InvalidRead",
     212                    FatalException, "No attribute found!");
     213        return value;
     214      }
    185215      const G4String attName = Transcode(attribute->getName());
    186216      const G4String attValue = Transcode(attribute->getValue());
     
    215245      const xercesc::DOMAttr* const attribute
    216246            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     247      if (!attribute)
     248      {
     249        G4Exception("G4GDMLReadMaterials::ElementRead()", "InvalidRead",
     250                    FatalException, "No attribute found!");
     251        return;
     252      }
    217253      const G4String attName = Transcode(attribute->getName());
    218254      const G4String attValue = Transcode(attribute->getValue());
     
    232268      const xercesc::DOMElement* const child
    233269            = dynamic_cast<xercesc::DOMElement*>(iter);
     270      if (!child)
     271      {
     272        G4Exception("G4GDMLReadMaterials::ElementRead()", "InvalidRead",
     273                    FatalException, "No child found!");
     274        return;
     275      }
    234276      const G4String tag = Transcode(child->getTagName());
    235277
     
    268310      const xercesc::DOMAttr* const attribute
    269311            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     312      if (!attribute)
     313      {
     314        G4Exception("G4GDMLReadMaterials::FractionRead()", "InvalidRead",
     315                    FatalException, "No attribute found!");
     316        return n;
     317      }
    270318      const G4String attName = Transcode(attribute->getName());
    271319      const G4String attValue = Transcode(attribute->getValue());
     
    300348      const xercesc::DOMAttr* const attribute
    301349            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     350      if (!attribute)
     351      {
     352        G4Exception("G4GDMLReadMaterials::IsotopeRead()", "InvalidRead",
     353                    FatalException, "No attribute found!");
     354        return;
     355      }
    302356      const G4String attName = Transcode(attribute->getName());
    303357      const G4String attValue = Transcode(attribute->getValue());
     
    315369      const xercesc::DOMElement* const child
    316370            = dynamic_cast<xercesc::DOMElement*>(iter);
     371      if (!child)
     372      {
     373        G4Exception("G4GDMLReadMaterials::IsotopeRead()", "InvalidRead",
     374                    FatalException, "No child found!");
     375        return;
     376      }
    317377      const G4String tag = Transcode(child->getTagName());
    318378
     
    348408      const xercesc::DOMAttr* const attribute
    349409            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     410      if (!attribute)
     411      {
     412        G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead",
     413                    FatalException, "No attribute found!");
     414        return;
     415      }
    350416      const G4String attName = Transcode(attribute->getName());
    351417      const G4String attValue = Transcode(attribute->getValue());
     
    370436      const xercesc::DOMElement* const child
    371437            = dynamic_cast<xercesc::DOMElement*>(iter);
     438      if (!child)
     439      {
     440        G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead",
     441                    FatalException, "No child found!");
     442        return;
     443      }
    372444      const G4String tag = Transcode(child->getTagName());
    373445
     
    401473      const xercesc::DOMElement* const child
    402474            = dynamic_cast<xercesc::DOMElement*>(iter);
     475      if (!child)
     476      {
     477        G4Exception("G4GDMLReadMaterials::MaterialRead()", "InvalidRead",
     478                    FatalException, "No child found!");
     479        return;
     480      }
    403481      const G4String tag = Transcode(child->getTagName());
    404482
     
    417495      const xercesc::DOMElement* const child
    418496            = dynamic_cast<xercesc::DOMElement*>(iter);
     497      if (!child)
     498      {
     499        G4Exception("G4GDMLReadMaterials::MixtureRead()", "InvalidRead",
     500                    FatalException, "No child found!");
     501        return;
     502      }
    419503      const G4String tag = Transcode(child->getTagName());
    420504
     
    439523      const xercesc::DOMElement* const child
    440524            = dynamic_cast<xercesc::DOMElement*>(iter);
     525      if (!child)
     526      {
     527        G4Exception("G4GDMLReadMaterials::MixtureRead()", "InvalidRead",
     528                    FatalException, "No child found!");
     529        return;
     530      }
    441531      const G4String tag = Transcode(child->getTagName());
    442532
     
    493583      const xercesc::DOMAttr* const attribute
    494584            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     585      if (!attribute)
     586      {
     587        G4Exception("G4GDMLReadMaterials::PropertyRead()", "InvalidRead",
     588                    FatalException, "No attribute found!");
     589        return;
     590      }
    495591      const G4String attName = Transcode(attribute->getName());
    496592      const G4String attValue = Transcode(attribute->getValue());
     
    543639      const xercesc::DOMElement* const child
    544640            = dynamic_cast<xercesc::DOMElement*>(iter);
     641      if (!child)
     642      {
     643        G4Exception("G4GDMLReadMaterials::MaterialsRead()", "InvalidRead",
     644                    FatalException, "No child found!");
     645        return;
     646      }
    545647      const G4String tag = Transcode(child->getTagName());
    546648     
  • trunk/source/persistency/gdml/src/G4GDMLReadParamvol.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadParamvol.cc,v 1.13 2009/04/24 15:34:20 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadParamvol Implementation
     
    4040#include "G4VPhysicalVolume.hh"
    4141
    42 G4GDMLReadParamvol::G4GDMLReadParamvol() : G4GDMLReadSetup()
     42G4GDMLReadParamvol::G4GDMLReadParamvol()
     43  : G4GDMLReadSetup(), parameterisation(0)
    4344{
    4445}
     
    6768      const xercesc::DOMAttr* const attribute
    6869            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     70      if (!attribute)
     71      {
     72        G4Exception("G4GDMLReadParamvol::Box_dimensionsRead()",
     73                    "InvalidRead", FatalException, "No attribute found!");
     74        return;
     75      }
    6976      const G4String attName = Transcode(attribute->getName());
    7077      const G4String attValue = Transcode(attribute->getValue());
     
    100107      const xercesc::DOMAttr* const attribute
    101108            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     109      if (!attribute)
     110      {
     111        G4Exception("G4GDMLReadParamvol::Trd_dimensionsRead()",
     112                    "InvalidRead", FatalException, "No attribute found!");
     113        return;
     114      }
    102115      const G4String attName = Transcode(attribute->getName());
    103116      const G4String attValue = Transcode(attribute->getValue());
     
    138151      const xercesc::DOMAttr* const attribute
    139152            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     153      if (!attribute)
     154      {
     155        G4Exception("G4GDMLReadParamvol::Trap_dimensionsRead()",
     156                    "InvalidRead", FatalException, "No attribute found!");
     157        return;
     158      }
    140159      const G4String attName = Transcode(attribute->getName());
    141160      const G4String attValue = Transcode(attribute->getValue());
     
    202221      const xercesc::DOMAttr* const attribute
    203222            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     223      if (!attribute)
     224      {
     225        G4Exception("G4GDMLReadParamvol::Tube_dimensionsRead()",
     226                    "InvalidRead", FatalException, "No attribute found!");
     227        return;
     228      }
    204229      const G4String attName = Transcode(attribute->getName());
    205230      const G4String attValue = Transcode(attribute->getValue());
     
    248273      const xercesc::DOMAttr* const attribute
    249274            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     275      if (!attribute)
     276      {
     277        G4Exception("G4GDMLReadParamvol::Cone_dimensionsRead()",
     278                    "InvalidRead", FatalException, "No attribute found!");
     279        return;
     280      }
    250281      const G4String attName = Transcode(attribute->getName());
    251282      const G4String attValue = Transcode(attribute->getValue());
     
    300331      const xercesc::DOMAttr* const attribute
    301332            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     333      if (!attribute)
     334      {
     335        G4Exception("G4GDMLReadParamvol::Sphere_dimensionsRead()",
     336                    "InvalidRead", FatalException, "No attribute found!");
     337        return;
     338      }
    302339      const G4String attName = Transcode(attribute->getName());
    303340      const G4String attValue = Transcode(attribute->getValue());
     
    348385      const xercesc::DOMAttr* const attribute
    349386            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     387      if (!attribute)
     388      {
     389        G4Exception("G4GDMLReadParamvol::Orb_dimensionsRead()",
     390                    "InvalidRead", FatalException, "No attribute found!");
     391        return;
     392      }
    350393      const G4String attName = Transcode(attribute->getName());
    351394      const G4String attValue = Transcode(attribute->getValue());
     
    378421      const xercesc::DOMAttr* const attribute
    379422            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     423      if (!attribute)
     424      {
     425        G4Exception("G4GDMLReadParamvol::Torus_dimensionsRead()",
     426                    "InvalidRead", FatalException, "No attribute found!");
     427        return;
     428      }
    380429      const G4String attName = Transcode(attribute->getName());
    381430      const G4String attValue = Transcode(attribute->getValue());
     
    424473      const xercesc::DOMAttr* const attribute
    425474            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     475      if (!attribute)
     476      {
     477        G4Exception("G4GDMLReadParamvol::Para_dimensionsRead()",
     478                    "InvalidRead", FatalException, "No attribute found!");
     479        return;
     480      }
    426481      const G4String attName = Transcode(attribute->getName());
    427482      const G4String attValue = Transcode(attribute->getValue());
     
    473528      const xercesc::DOMAttr* const attribute
    474529            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     530      if (!attribute)
     531      {
     532        G4Exception("G4GDMLReadParamvol::Hype_dimensionsRead()",
     533                    "InvalidRead", FatalException, "No attribute found!");
     534        return;
     535      }
    475536      const G4String attName = Transcode(attribute->getName());
    476537      const G4String attValue = Transcode(attribute->getValue());
     
    514575      const xercesc::DOMElement* const child
    515576            = dynamic_cast<xercesc::DOMElement*>(iter);
     577      if (!child)
     578      {
     579        G4Exception("G4GDMLReadParamvol::ParametersRead()",
     580                    "InvalidRead", FatalException, "No child found!");
     581        return;
     582      }
    516583      const G4String tag = Transcode(child->getTagName());
    517584      if (tag=="rotation") { VectorRead(child,rotation); } else
     
    560627     const xercesc::DOMElement* const child
    561628           = dynamic_cast<xercesc::DOMElement*>(iter);
     629     if (!child)
     630     {
     631       G4Exception("G4GDMLReadParamvol::ParameterisedRead()",
     632                   "InvalidRead", FatalException, "No child found!");
     633       return;
     634     }
    562635     const G4String tag = Transcode(child->getTagName());
    563636 
     
    578651          const xercesc::DOMAttr* const attribute
    579652                = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     653          if (!attribute)
     654          {
     655            G4Exception("G4GDMLReadParamvol::ParameterisedRead()",
     656                        "InvalidRead", FatalException, "No attribute found!");
     657            return;
     658          }
    580659          const G4String attName = Transcode(attribute->getName());
    581660          const G4String attValue = Transcode(attribute->getValue());
     
    602681      const xercesc::DOMElement* const child
    603682            = dynamic_cast<xercesc::DOMElement*>(iter);
     683      if (!child)
     684      {
     685        G4Exception("G4GDMLReadParamvol::Paramvol_contentRead()", "InvalidRead",
     686                    FatalException, "No child found!");
     687        return;
     688      }
    604689      const G4String tag = Transcode(child->getTagName());
    605690      if (tag=="parameterised_position_size") { ParameterisedRead(child); }else
     
    622707      const xercesc::DOMElement* const child
    623708            = dynamic_cast<xercesc::DOMElement*>(iter);
     709      if (!child)
     710      {
     711        G4Exception("G4GDMLReadParamvol::ParamvolRead()", "InvalidRead",
     712                    FatalException, "No child found!");
     713        return;
     714      }
    624715      const G4String tag = Transcode(child->getTagName());
    625716
  • trunk/source/persistency/gdml/src/G4GDMLReadSetup.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadSetup.cc,v 1.10 2009/03/24 15:47:33 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadSetup Implementation
     
    7979      const xercesc::DOMAttr* const attribute
    8080            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     81      if (!attribute)
     82      {
     83        G4Exception("G4GDMLReadSetup::SetupRead()",
     84                    "InvalidRead", FatalException, "No attribute found!");
     85        return;
     86      }
    8187      const G4String attName  = Transcode(attribute->getName());
    8288      const G4String attValue = Transcode(attribute->getValue());
     
    9298      const xercesc::DOMElement* const child
    9399            = dynamic_cast<xercesc::DOMElement*>(iter);
     100      if (!child)
     101      {
     102        G4Exception("G4GDMLReadSetup::SetupRead()",
     103                    "InvalidRead", FatalException, "No child found!");
     104        return;
     105      }
    94106      const G4String tag = Transcode(child->getTagName());
    95107
  • trunk/source/persistency/gdml/src/G4GDMLReadSolids.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadSolids.cc,v 1.31 2010/06/03 14:19:49 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadSolids Implementation
     
    102102      const xercesc::DOMAttr* const attribute
    103103            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     104      if (!attribute)
     105      {
     106        G4Exception("G4GDMLReadSolids::BooleanRead()",
     107                    "InvalidRead", FatalException, "No attribute found!");
     108        return;
     109      }
    104110      const G4String attName = Transcode(attribute->getName());
    105111      const G4String attValue = Transcode(attribute->getValue());
     
    115121      const xercesc::DOMElement* const child
    116122            = dynamic_cast<xercesc::DOMElement*>(iter);
     123      if (!child)
     124      {
     125        G4Exception("G4GDMLReadSolids::BooleanRead()",
     126                    "InvalidRead", FatalException, "No child found!");
     127        return;
     128      }
    117129      const G4String tag = Transcode(child->getTagName());
    118130
     
    186198      const xercesc::DOMAttr* const attribute
    187199            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     200      if (!attribute)
     201      {
     202        G4Exception("G4GDMLReadSolids::BoxRead()",
     203                    "InvalidRead", FatalException, "No attribute found!");
     204        return;
     205      }
    188206      const G4String attName = Transcode(attribute->getName());
    189207      const G4String attValue = Transcode(attribute->getValue());
     
    231249      const xercesc::DOMAttr* const attribute
    232250            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     251      if (!attribute)
     252      {
     253        G4Exception("G4GDMLReadSolids::ConeRead()",
     254                    "InvalidRead", FatalException, "No attribute found!");
     255        return;
     256      }
    233257      const G4String attName = Transcode(attribute->getName());
    234258      const G4String attValue = Transcode(attribute->getValue());
     
    281305      const xercesc::DOMAttr* const attribute
    282306            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     307      if (!attribute)
     308      {
     309        G4Exception("G4GDMLReadSolids::ElconeRead()",
     310                    "InvalidRead", FatalException, "No attribute found!");
     311        return;
     312      }
    283313      const G4String attName = Transcode(attribute->getName());
    284314      const G4String attValue = Transcode(attribute->getValue());
     
    325355      const xercesc::DOMAttr* const attribute
    326356            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     357      if (!attribute)
     358      {
     359        G4Exception("G4GDMLReadSolids::EllipsoidRead()",
     360                    "InvalidRead", FatalException, "No attribute found!");
     361        return;
     362      }
    327363      const G4String attName = Transcode(attribute->getName());
    328364      const G4String attValue = Transcode(attribute->getValue());
     
    369405      const xercesc::DOMAttr* const attribute
    370406            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     407      if (!attribute)
     408      {
     409        G4Exception("G4GDMLReadSolids::EltubeRead()",
     410                    "InvalidRead", FatalException, "No attribute found!");
     411        return;
     412      }
    371413      const G4String attName = Transcode(attribute->getName());
    372414      const G4String attValue = Transcode(attribute->getValue());
     
    405447      const xercesc::DOMAttr* const attribute
    406448            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     449      if (!attribute)
     450      {
     451        G4Exception("G4GDMLReadSolids::XtruRead()",
     452                    "InvalidRead", FatalException, "No attribute found!");
     453        return;
     454      }
    407455      const G4String attName = Transcode(attribute->getName());
    408456      const G4String attValue = Transcode(attribute->getValue());
     
    422470      const xercesc::DOMElement* const child
    423471            = dynamic_cast<xercesc::DOMElement*>(iter);
     472      if (!child)
     473      {
     474        G4Exception("G4GDMLReadSolids::XtruRead()",
     475                    "InvalidRead", FatalException, "No child found!");
     476        return;
     477      }
    424478      const G4String tag = Transcode(child->getTagName());
    425479
     
    458512      const xercesc::DOMAttr* const attribute
    459513            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     514      if (!attribute)
     515      {
     516        G4Exception("G4GDMLReadSolids::HypeRead()",
     517                    "InvalidRead", FatalException, "No attribute found!");
     518        return;
     519      }
    460520      const G4String attName = Transcode(attribute->getName());
    461521      const G4String attValue = Transcode(attribute->getValue());
     
    500560      const xercesc::DOMAttr* const attribute
    501561            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     562      if (!attribute)
     563      {
     564        G4Exception("G4GDMLReadSolids::OrbRead()",
     565                    "InvalidRead", FatalException, "No attribute found!");
     566        return;
     567      }
    502568      const G4String attName = Transcode(attribute->getName());
    503569      const G4String attValue = Transcode(attribute->getValue());
     
    539605      const xercesc::DOMAttr* const attribute
    540606            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     607      if (!attribute)
     608      {
     609        G4Exception("G4GDMLReadSolids::ParaRead()",
     610                    "InvalidRead", FatalException, "No attribute found!");
     611        return;
     612      }
    541613      const G4String attName = Transcode(attribute->getName());
    542614      const G4String attValue = Transcode(attribute->getValue());
     
    587659      const xercesc::DOMAttr* const attribute
    588660            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     661      if (!attribute)
     662      {
     663        G4Exception("G4GDMLReadSolids::ParaboloidRead()",
     664                    "InvalidRead", FatalException, "No attribute found!");
     665        return;
     666      }
    589667      const G4String attName = Transcode(attribute->getName());
    590668      const G4String attValue = Transcode(attribute->getValue());
     
    628706      const xercesc::DOMAttr* const attribute
    629707            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     708      if (!attribute)
     709      {
     710        G4Exception("G4GDMLReadSolids::PolyconeRead()",
     711                    "InvalidRead", FatalException, "No attribute found!");
     712        return;
     713      }
    630714      const G4String attName = Transcode(attribute->getName());
    631715      const G4String attValue = Transcode(attribute->getValue());
     
    650734      const xercesc::DOMElement* const child
    651735            = dynamic_cast<xercesc::DOMElement*>(iter);
     736      if (!child)
     737      {
     738        G4Exception("G4GDMLReadSolids::PolyconeRead()",
     739                    "InvalidRead", FatalException, "No child found!");
     740        return;
     741      }
    652742      const G4String tag = Transcode(child->getTagName());
    653743
     
    696786      const xercesc::DOMAttr* const attribute
    697787            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     788      if (!attribute)
     789      {
     790        G4Exception("G4GDMLReadSolids::PolyhedraRead()",
     791                    "InvalidRead", FatalException, "No attribute found!");
     792        return;
     793      }
    698794      const G4String attName = Transcode(attribute->getName());
    699795      const G4String attValue = Transcode(attribute->getValue());
     
    719815      const xercesc::DOMElement* const child
    720816            = dynamic_cast<xercesc::DOMElement*>(iter);
     817      if (!child)
     818      {
     819        G4Exception("G4GDMLReadSolids::PolyhedraRead()",
     820                    "InvalidRead", FatalException, "No child found!");
     821        return;
     822      }
    721823      const G4String tag = Transcode(child->getTagName());
    722824
     
    765867      const xercesc::DOMAttr* const attribute
    766868            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     869      if (!attribute)
     870      {
     871        G4Exception("G4GDMLReadSolids::QuadrangularRead()",
     872                    "InvalidRead", FatalException, "No attribute found!");
     873        return 0;
     874      }
    767875      const G4String attName = Transcode(attribute->getName());
    768876      const G4String attValue = Transcode(attribute->getValue());
     
    808916      const xercesc::DOMAttr* const attribute
    809917            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     918      if (!attribute)
     919      {
     920        G4Exception("G4GDMLReadSolids::ReflectedSolidRead()",
     921                    "InvalidRead", FatalException, "No attribute found!");
     922        return;
     923      }
    810924      const G4String attName = Transcode(attribute->getName());
    811925      const G4String attValue = Transcode(attribute->getValue());
     
    856970      const xercesc::DOMAttr* const attribute
    857971            = 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      }
    858978      const G4String attName = Transcode(attribute->getName());
    859979      const G4String attValue = Transcode(attribute->getValue());
     
    8991019      const xercesc::DOMAttr* const attribute
    9001020            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1021      if (!attribute)
     1022      {
     1023        G4Exception("G4GDMLReadSolids::SphereRead()",
     1024                    "InvalidRead", FatalException, "No attribute found!");
     1025        return;
     1026      }
    9011027      const G4String attName = Transcode(attribute->getName());
    9021028      const G4String attValue = Transcode(attribute->getValue());
     
    9421068      const xercesc::DOMAttr* const attribute
    9431069            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1070      if (!attribute)
     1071      {
     1072        G4Exception("G4GDMLReadSolids::TessellatedRead()",
     1073                    "InvalidRead", FatalException, "No attribute found!");
     1074        return;
     1075      }
    9441076      const G4String attName = Transcode(attribute->getName());
    9451077      const G4String attValue = Transcode(attribute->getValue());
     
    9571089      const xercesc::DOMElement* const child
    9581090            = dynamic_cast<xercesc::DOMElement*>(iter);
     1091      if (!child)
     1092      {
     1093        G4Exception("G4GDMLReadSolids::TessellatedRead()",
     1094                    "InvalidRead", FatalException, "No child found!");
     1095        return;
     1096      }
    9591097      const G4String tag = Transcode(child->getTagName());
    9601098
     
    9901128      const xercesc::DOMAttr* const attribute
    9911129            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1130      if (!attribute)
     1131      {
     1132        G4Exception("G4GDMLReadSolids::TetRead()",
     1133                    "InvalidRead", FatalException, "No attribute found!");
     1134        return;
     1135      }
    9921136      const G4String attName = Transcode(attribute->getName());
    9931137      const G4String attValue = Transcode(attribute->getValue());
     
    10331177      const xercesc::DOMAttr* const attribute
    10341178            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1179      if (!attribute)
     1180      {
     1181        G4Exception("G4GDMLReadSolids::TorusRead()",
     1182                    "InvalidRead", FatalException, "No attribute found!");
     1183        return;
     1184      }
    10351185      const G4String attName = Transcode(attribute->getName());
    10361186      const G4String attValue = Transcode(attribute->getValue());
     
    10791229      const xercesc::DOMAttr* const attribute
    10801230            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1231      if (!attribute)
     1232      {
     1233        G4Exception("G4GDMLReadSolids::GenTrapRead()",
     1234                    "InvalidRead", FatalException, "No attribute found!");
     1235        return;
     1236      }
    10811237      const G4String attName = Transcode(attribute->getName());
    10821238      const G4String attValue = Transcode(attribute->getValue());
     
    11471303      const xercesc::DOMAttr* const attribute
    11481304            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1305      if (!attribute)
     1306      {
     1307        G4Exception("G4GDMLReadSolids::TrapRead()",
     1308                    "InvalidRead", FatalException, "No attribute found!");
     1309        return;
     1310      }
    11491311      const G4String attName = Transcode(attribute->getName());
    11501312      const G4String attValue = Transcode(attribute->getValue());
     
    12051367      const xercesc::DOMAttr* const attribute
    12061368            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1369      if (!attribute)
     1370      {
     1371        G4Exception("G4GDMLReadSolids::TrdRead()",
     1372                    "InvalidRead", FatalException, "No attribute found!");
     1373        return;
     1374      }
    12071375      const G4String attName = Transcode(attribute->getName());
    12081376      const G4String attValue = Transcode(attribute->getValue());
     
    12491417      const xercesc::DOMAttr* const attribute
    12501418            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1419      if (!attribute)
     1420      {
     1421        G4Exception("G4GDMLReadSolids::TriangularRead()",
     1422                    "InvalidRead", FatalException, "No attribute found!");
     1423        return 0;
     1424      }
    12511425      const G4String attName = Transcode(attribute->getName());
    12521426      const G4String attValue = Transcode(attribute->getValue());
     
    12901464      const xercesc::DOMAttr* const attribute
    12911465            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1466      if (!attribute)
     1467      {
     1468        G4Exception("G4GDMLReadSolids::TubeRead()",
     1469                    "InvalidRead", FatalException, "No attribute found!");
     1470        return;
     1471      }
    12921472      const G4String attName = Transcode(attribute->getName());
    12931473      const G4String attValue = Transcode(attribute->getValue());
     
    13371517      const xercesc::DOMAttr* const attribute
    13381518            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1519      if (!attribute)
     1520      {
     1521        G4Exception("G4GDMLReadSolids::TwistedboxRead()",
     1522                    "InvalidRead", FatalException, "No attribute found!");
     1523        return;
     1524      }
    13391525      const G4String attName = Transcode(attribute->getName());
    13401526      const G4String attValue = Transcode(attribute->getValue());
     
    13891575      const xercesc::DOMAttr* const attribute
    13901576            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1577      if (!attribute)
     1578      {
     1579        G4Exception("G4GDMLReadSolids::TwistedtrapRead()",
     1580                    "InvalidRead", FatalException, "No attribute found!");
     1581        return;
     1582      }
    13911583      const G4String attName = Transcode(attribute->getName());
    13921584      const G4String attValue = Transcode(attribute->getValue());
     
    14511643      const xercesc::DOMAttr* const attribute
    14521644            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1645      if (!attribute)
     1646      {
     1647        G4Exception("G4GDMLReadSolids::TwistedtrdRead()",
     1648                    "InvalidRead", FatalException, "No attribute found!");
     1649        return;
     1650      }
    14531651      const G4String attName = Transcode(attribute->getName());
    14541652      const G4String attValue = Transcode(attribute->getValue());
     
    15011699      const xercesc::DOMAttr* const attribute
    15021700            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1701      if (!attribute)
     1702      {
     1703        G4Exception("G4GDMLReadSolids::TwistedtubsRead()",
     1704                    "InvalidRead", FatalException, "No attribute found!");
     1705        return;
     1706      }
    15031707      const G4String attName = Transcode(attribute->getName());
    15041708      const G4String attValue = Transcode(attribute->getValue());
     
    15411745      const xercesc::DOMAttr* const attribute
    15421746            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1747      if (!attribute)
     1748      {
     1749        G4Exception("G4GDMLReadSolids::TwoDimVertexRead()",
     1750                    "InvalidRead", FatalException, "No attribute found!");
     1751        return vec;
     1752      }
    15431753      const G4String attName = Transcode(attribute->getName());
    15441754      const G4String attValue = Transcode(attribute->getValue());
     
    15541764ZplaneRead(const xercesc::DOMElement* const zplaneElement)
    15551765{
    1556    zplaneType zplane;
     1766   zplaneType zplane = {0.,0.,0.};
    15571767
    15581768   const xercesc::DOMNamedNodeMap* const attributes
     
    15691779      const xercesc::DOMAttr* const attribute
    15701780            = dynamic_cast<xercesc::DOMAttr*>(node);   
     1781      if (!attribute)
     1782      {
     1783        G4Exception("G4GDMLReadSolids::ZplaneRead()",
     1784                    "InvalidRead", FatalException, "No attribute found!");
     1785        return zplane;
     1786      }
    15711787      const G4String attName = Transcode(attribute->getName());
    15721788      const G4String attValue = Transcode(attribute->getValue());
     
    16031819      const xercesc::DOMAttr* const attribute
    16041820            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     1821      if (!attribute)
     1822      {
     1823        G4Exception("G4GDMLReadSolids::OpticalSurfaceRead()",
     1824                    "InvalidRead", FatalException, "No attribute found!");
     1825        return;
     1826      }
    16051827      const G4String attName = Transcode(attribute->getName());
    16061828      const G4String attValue = Transcode(attribute->getValue());
     
    17051927      const xercesc::DOMElement* const child
    17061928            = dynamic_cast<xercesc::DOMElement*>(iter);
     1929      if (!child)
     1930      {
     1931        G4Exception("G4GDMLReadSolids::SolidsRead()",
     1932                    "InvalidRead", FatalException, "No child found!");
     1933        return;
     1934      }
    17071935      const G4String tag = Transcode(child->getTagName());
    17081936      if (tag=="define") { DefineRead(child);  }  else
  • trunk/source/persistency/gdml/src/G4GDMLReadStructure.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadStructure.cc,v 1.62 2009/09/24 15:04:34 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadStructure Implementation
     
    4747#include "G4VisAttributes.hh"
    4848
    49 G4GDMLReadStructure::G4GDMLReadStructure() : G4GDMLReadParamvol()
     49G4GDMLReadStructure::G4GDMLReadStructure()
     50  : G4GDMLReadParamvol(), pMotherLogical(0)
    5051{
    5152}
     
    5859AuxiliaryRead(const xercesc::DOMElement* const auxiliaryElement)
    5960{
    60    G4GDMLAuxPairType auxpair;
     61   G4GDMLAuxPairType auxpair = {"",""};
    6162
    6263   const xercesc::DOMNamedNodeMap* const attributes
     
    7475      const xercesc::DOMAttr* const attribute
    7576            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     77      if (!attribute)
     78      {
     79        G4Exception("G4GDMLReadStructure::AuxiliaryRead()",
     80                    "InvalidRead", FatalException, "No attribute found!");
     81        return auxpair;
     82      }
    7683      const G4String attName = Transcode(attribute->getName());
    7784      const G4String attValue = Transcode(attribute->getValue());
    7885
    7986      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; }
    8189   }
    8290
     
    107115      const xercesc::DOMAttr* const attribute
    108116            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     117      if (!attribute)
     118      {
     119        G4Exception("G4GDMLReadStructure::BorderSurfaceRead()",
     120                    "InvalidRead", FatalException, "No attribute found!");
     121        return;
     122      }
    109123      const G4String attName = Transcode(attribute->getName());
    110124      const G4String attValue = Transcode(attribute->getValue());
     
    123137      const xercesc::DOMElement* const child
    124138            = dynamic_cast<xercesc::DOMElement*>(iter);
     139      if (!child)
     140      {
     141        G4Exception("G4GDMLReadStructure::BorderSurfaceRead()",
     142                    "InvalidRead", FatalException, "No child found!");
     143        return;
     144      }
    125145      const G4String tag = Transcode(child->getTagName());
    126146
     
    162182      const xercesc::DOMAttr* const attribute
    163183            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     184      if (!attribute)
     185      {
     186        G4Exception("G4GDMLReadStructure::DivisionvolRead()",
     187                    "InvalidRead", FatalException, "No attribute found!");
     188        return;
     189      }
    164190      const G4String attName = Transcode(attribute->getName());
    165191      const G4String attValue = Transcode(attribute->getValue());
     
    190216      const xercesc::DOMElement* const child
    191217            = dynamic_cast<xercesc::DOMElement*>(iter);
     218      if (!child)
     219      {
     220        G4Exception("G4GDMLReadStructure::DivisionvolRead()",
     221                    "InvalidRead", FatalException, "No child found!");
     222        return;
     223      }
    192224      const G4String tag = Transcode(child->getTagName());
    193225
    194226      if (tag=="volumeref") { logvol = GetVolume(GenerateName(RefRead(child))); }
    195227   }
     228
     229   if (!logvol)  { return; }
    196230
    197231   G4PVDivisionFactory::GetInstance();
     
    239273      const xercesc::DOMAttr* const attribute
    240274            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     275      if (!attribute)
     276      {
     277        G4Exception("G4GDMLReadStructure::FileRead()",
     278                    "InvalidRead", FatalException, "No attribute found!");
     279        return 0;
     280      }
    241281      const G4String attName = Transcode(attribute->getName());
    242282      const G4String attValue = Transcode(attribute->getValue());
     
    299339     const xercesc::DOMAttr* const attribute
    300340           = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     341     if (!attribute)
     342     {
     343       G4Exception("G4GDMLReadStructure::PhysvolRead()",
     344                   "InvalidRead", FatalException, "No attribute found!");
     345       return;
     346     }
    301347     const G4String attName = Transcode(attribute->getName());
    302348     const G4String attValue = Transcode(attribute->getValue());
     
    312358     const xercesc::DOMElement* const child
    313359           = dynamic_cast<xercesc::DOMElement*>(iter);
     360     if (!child)
     361     {
     362       G4Exception("G4GDMLReadStructure::PhysvolRead()",
     363                   "InvalidRead", FatalException, "No child found!");
     364       return;
     365     }
    314366     const G4String tag = Transcode(child->getTagName());
    315367
     
    339391          G4Exception("G4GDMLReadStructure::PhysvolRead()", "ReadError",
    340392                      FatalException, error_msg);
     393          return;
    341394        }
    342395   }
     
    347400   if (pAssembly)   // Fill assembly structure
    348401   {
     402     if (!logvol) { return; }
    349403     pAssembly->AddPlacedVolume(logvol, transform);
    350404   }
     
    357411     else
    358412     {
     413       if (!logvol) { return; }
    359414       G4String pv_name = logvol->GetName() + "_PV";
    360415       G4PhysicalVolumesPair pair = G4ReflectionFactory::Instance()
     
    378433    const xercesc::DOMElement* const child
    379434          = dynamic_cast<xercesc::DOMElement*>(iter);
     435    if (!child)
     436    {
     437      G4Exception("G4GDMLReadStructure::ReplicavolRead()",
     438                  "InvalidRead", FatalException, "No child found!");
     439      return;
     440    }
    380441    const G4String tag = Transcode(child->getTagName());
    381442
     
    386447    else if (tag=="replicate_along_axis")
    387448    {
    388       ReplicaRead(child,logvol,number);
     449      if (logvol)  { ReplicaRead(child,logvol,number); }
    389450    }
    390451    else
     
    415476      const xercesc::DOMElement* const child
    416477            = dynamic_cast<xercesc::DOMElement*>(iter);
     478      if (!child)
     479      {
     480        G4Exception("G4GDMLReadStructure::ReplicaRead()",
     481                    "InvalidRead", FatalException, "No child found!");
     482        return;
     483      }
    417484      const G4String tag = Transcode(child->getTagName());
    418485
     
    451518AxisRead(const xercesc::DOMElement* const axisElement)
    452519{
    453    
    454520   EAxis axis = kUndefined;
    455521
     
    468534      const xercesc::DOMAttr* const attribute
    469535            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     536      if (!attribute)
     537      {
     538        G4Exception("G4GDMLReadStructure::AxisRead()",
     539                    "InvalidRead", FatalException, "No attribute found!");
     540        return axis;
     541      }
    470542      const G4String attName = Transcode(attribute->getName());
    471543      const G4String attValue = Transcode(attribute->getValue());
     
    503575      const xercesc::DOMAttr* const attribute
    504576            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     577      if (!attribute)
     578      {
     579        G4Exception("G4GDMLReadStructure::QuantityRead()",
     580                    "InvalidRead", FatalException, "No attribute found!");
     581        return value;
     582      }
    505583      const G4String attName = Transcode(attribute->getName());
    506584      const G4String attValue = Transcode(attribute->getValue());
     
    531609      const xercesc::DOMElement* const child
    532610            = dynamic_cast<xercesc::DOMElement*>(iter);
     611      if (!child)
     612      {
     613        G4Exception("G4GDMLReadStructure::VolumeRead()",
     614                    "InvalidRead", FatalException, "No child found!");
     615        return;
     616      }
    533617      const G4String tag = Transcode(child->getTagName());
    534618
     
    565649      const xercesc::DOMElement* const child
    566650            = dynamic_cast<xercesc::DOMElement*>(iter);
     651      if (!child)
     652      {
     653        G4Exception("G4GDMLReadStructure::AssemblyRead()",
     654                    "InvalidRead", FatalException, "No child found!");
     655        return;
     656      }
    567657      const G4String tag = Transcode(child->getTagName());
    568658
     
    600690      const xercesc::DOMAttr* const attribute
    601691            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     692      if (!attribute)
     693      {
     694        G4Exception("G4GDMLReadStructure::SkinsurfaceRead()",
     695                    "InvalidRead", FatalException, "No attribute found!");
     696        return;
     697      }
    602698      const G4String attName = Transcode(attribute->getName());
    603699      const G4String attValue = Transcode(attribute->getValue());
     
    616712      const xercesc::DOMElement* const child
    617713            = dynamic_cast<xercesc::DOMElement*>(iter);
     714      if (!child)
     715      {
     716        G4Exception("G4GDMLReadStructure::SkinsurfaceRead()",
     717                    "InvalidRead", FatalException, "No child found!");
     718        return;
     719      }
    618720      const G4String tag = Transcode(child->getTagName());
    619721
     
    643745      const xercesc::DOMElement* const child
    644746            = dynamic_cast<xercesc::DOMElement*>(iter);
     747      if (!child)
     748      {
     749        G4Exception("G4GDMLReadStructure::Volume_contentRead()",
     750                    "InvalidRead", FatalException, "No child found!");
     751        return;
     752      }
    645753      const G4String tag = Transcode(child->getTagName());
    646754
     
    674782          const xercesc::DOMAttr* const attribute
    675783                = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     784          if (!attribute)
     785          {
     786            G4Exception("G4GDMLReadStructure::Volume_contentRead()",
     787                        "InvalidRead", FatalException, "No attribute found!");
     788            return;
     789          }
    676790          const G4String attName = Transcode(attribute->getName());
    677791          const G4String attValue = Transcode(attribute->getValue());
     
    711825      const xercesc::DOMElement* const child
    712826            = dynamic_cast<xercesc::DOMElement*>(iter);
     827      if (!child)
     828      {
     829        G4Exception("G4GDMLReadStructure::StructureRead()",
     830                    "InvalidRead", FatalException, "No child found!");
     831        return;
     832      }
    713833      const G4String tag = Transcode(child->getTagName());
    714834
     
    768888
    769889G4GDMLAuxListType G4GDMLReadStructure::
    770 GetVolumeAuxiliaryInformation(const G4LogicalVolume* const logvol)
     890GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const
    771891{
    772892   G4GDMLAuxMapType::const_iterator pos = auxMap.find(logvol);
     
    786906   G4LogicalVolume* volume = GetVolume(Strip(GetSetup(setupName)));
    787907   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   }
    790921   return pvWorld;
    791922}
     923
     924void G4GDMLReadStructure::Clear()
     925{
     926  eval.Clear();
     927  setuptoPV.clear();
     928}
  • trunk/source/persistency/gdml/src/G4GDMLWrite.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLWrite.cc,v 1.55 2009/04/24 15:34:20 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLWrite Implementation
     
    4545G4bool G4GDMLWrite::addPointerToName = true;
    4646
    47 G4GDMLWrite::G4GDMLWrite() : extElement(0)
     47G4GDMLWrite::G4GDMLWrite() : doc(0), extElement(0)
    4848{
    4949}
     
    155155
    156156   xercesc::XMLString::transcode("LS", tempStr, 99);
     157     xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr);
     158   xercesc::XMLString::transcode("Range", tempStr, 99);
    157159   xercesc::DOMImplementation* impl =
    158160     xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr);
    159    xercesc::XMLString::transcode("Range", tempStr, 99);
    160    impl = xercesc::DOMImplementationRegistry::getDOMImplementation(tempStr);
    161161   xercesc::XMLString::transcode("gdml", tempStr, 99);
    162162   doc = impl->createDocument(0,tempStr,0);
     
    255255     G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException,
    256256                 "Invalid NULL pointer is specified for modularization!");
     257     return;
    257258   }
    258259   if (dynamic_cast<const G4PVDivision*>(physvol))
     
    260261     G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException,
    261262                 "It is not possible to modularize by divisionvol!");
     263     return;
    262264   }
    263265   if (physvol->IsParameterised())
     
    265267     G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException,
    266268                 "It is not possible to modularize by parameterised volume!");
     269     return;
    267270   }
    268271   if (physvol->IsReplicated())
     
    270273     G4Exception("G4GDMLWrite::AddModule()", "InvalidSetup", FatalException,
    271274                 "It is not possible to modularize by replicated volume!");
     275     return;
    272276   }
    273277
  • trunk/source/persistency/gdml/src/G4GDMLWriteDefine.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLWriteDefine.cc,v 1.19 2009/03/24 15:47:33 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLWriteDefine Implementation
     
    4040const G4double G4GDMLWriteDefine::kLinearPrecision = DBL_EPSILON;
    4141
    42 G4GDMLWriteDefine::G4GDMLWriteDefine() : G4GDMLWrite()
     42G4GDMLWriteDefine::G4GDMLWriteDefine()
     43  : G4GDMLWrite(), defineElement(0)
    4344{
    4445}
  • trunk/source/persistency/gdml/src/G4GDMLWriteMaterials.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLWriteMaterials.cc,v 1.25 2010/02/18 17:38:24 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLWriteMaterials Implementation
     
    4141#include "G4Material.hh"
    4242
    43 G4GDMLWriteMaterials::
    44 G4GDMLWriteMaterials() : G4GDMLWriteDefine()
    45 {
    46 }
    47 
    48 G4GDMLWriteMaterials::
    49 ~G4GDMLWriteMaterials()
     43G4GDMLWriteMaterials::G4GDMLWriteMaterials()
     44  : G4GDMLWriteDefine(), materialsElement(0)
     45{
     46}
     47
     48G4GDMLWriteMaterials::~G4GDMLWriteMaterials()
    5049{
    5150}
  • trunk/source/persistency/gdml/src/G4GDMLWriteSolids.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLWriteSolids.cc,v 1.68 2010/06/03 14:19:49 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLWriteSolids Implementation
     
    6868#include "G4SurfaceProperty.hh"
    6969
    70 G4GDMLWriteSolids::
    71 G4GDMLWriteSolids() : G4GDMLWriteMaterials()
    72 {
    73 }
    74 
    75 G4GDMLWriteSolids::
    76 ~G4GDMLWriteSolids()
     70G4GDMLWriteSolids::G4GDMLWriteSolids()
     71  : G4GDMLWriteMaterials(), solidsElement(0)
     72{
     73}
     74
     75G4GDMLWriteSolids::~G4GDMLWriteSolids()
    7776{
    7877}
  • trunk/source/persistency/gdml/src/G4GDMLWriteStructure.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4GDMLWriteStructure.cc,v 1.81 2010/05/20 12:56:57 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030// class G4GDMLWriteStructure Implementation
     
    7575   else if (axis==kZAxis) { axisString = "kZAxis"; }
    7676   else if (axis==kRho)   { axisString = "kRho";     }
    77    else if (axis==kPhi)   { axisString = "kPhi"; unitString = "degree"; }
     77   else if (axis==kPhi)   { axisString = "kPhi"; unitString = "rad"; }
    7878
    7979   const G4String name
     
    188188     { dirElement->setAttributeNode(NewAttribute("rho","1")); }
    189189   else if(axis==kPhi)
    190      { dirElement->setAttributeNode(NewAttribute("phi","1")); }
     190     { dirElement->setAttributeNode(NewAttribute("phi","1"));
     191       unitString="rad"; }
    191192   replicateElement->appendChild(dirElement);
    192193
     
    231232   if (FindOpticalSurface(psurf))
    232233   {
    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);
    235243   }
    236244
     
    260268   if (FindOpticalSurface(psurf))
    261269   {
    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);
    264279   }
    265280
  • trunk/source/persistency/gdml/src/G4STRead.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4STRead.cc,v 1.4 2009/04/24 15:34:20 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4STRead Implementation
     
    123123   stream >> level >> name >> r1 >> r2 >> r3 >> n1 >> r4 >> r5 >> r6
    124124          >> 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   }
    127136
    128137   G4cout << "G4STRead: Placing tessellated solid: " << name << G4endl;
  • trunk/source/persistency/mctruth/include/G4PersistencyCenter.hh

    r818 r1347  
    3737#include <map>
    3838#include "G4HCIOcatalog.hh"
    39 #include "G4VHCIOentry.hh"
    4039#include "G4DCIOcatalog.hh"
    41 #include "G4VDCIOentry.hh"
    4240
    4341#ifndef WIN32
  • trunk/source/persistency/mctruth/src/G4MCTSimParticle.cc

    r818 r1347  
    4343/////////////////////////////////
    4444G4MCTSimParticle::G4MCTSimParticle()
    45   : parentParticle(0),
     45  : parentParticle(0), pdgID(0),
    4646    trackID(0), parentTrackID(0),
    4747    primaryFlag(false),
  • trunk/source/persistency/mctruth/src/G4MCTSimVertex.cc

    r818 r1347  
    4343/////////////////////////////////////
    4444G4MCTSimVertex::G4MCTSimVertex() 
    45   : inParticleTrackID(0),id(-1),
     45  : inParticleTrackID(0),id(-1), time(0.),
    4646    volumeName(""), volumeNumber(-1),
    4747    creatorProcessName("none"),
  • trunk/source/persistency/mctruth/src/G4PersistencyCenter.cc

    r818 r1347  
    3737#include "G4UImanager.hh"
    3838#include "G4PersistencyManager.hh"
     39#include "G4VHCIOentry.hh"
     40#include "G4VDCIOentry.hh"
    3941
    4042G4PersistencyCenter* G4PersistencyCenter::f_thePointer=G4PersistencyCenter::GetPersistencyCenter();
     
    7476}
    7577
    76 // Implementation of Constructor #2
    77 G4PersistencyCenter::G4PersistencyCenter(const G4PersistencyCenter&)
    78 {}
     78// Fake implementation of Copy Constructor
     79G4PersistencyCenter::G4PersistencyCenter(const G4PersistencyCenter& c)
     80  : f_theMessenger(0), f_currentManager(0), m_verbose(0)
     81{
     82  *this = c;
     83}
    7984
    8085// Implementation of Destructor #1
     
    96101void G4PersistencyCenter::SelectSystem(std::string systemName)
    97102{
    98   int st = 0;
     103  G4int st = 0;
    99104
    100105  if (f_currentManager!=0) delete f_currentManager;
     
    102107  G4PersistencyManager* pm = 0;
    103108
    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")
    110110  {
    111111    G4cout<<" G4PersistencyCenter: \"ROOT\" Persistency Package is selected."
     
    128128    }
    129129  }
     130  else
     131  {
     132    G4cout<<" G4PersistencyCenter: Default is selected."<< G4endl;
     133    pm = new G4PersistencyManager(this, "Default");
     134  }
     135
    130136  if ( st == 0 ) {
    131137    f_currentManager = pm->Create();
Note: See TracChangeset for help on using the changeset viewer.