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

geant4 tag 9.4

Location:
trunk/source/persistency/gdml/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.