G4GDMLParser Class Reference

#include <G4GDMLParser.hh>


Public Member Functions

 G4GDMLParser ()
 G4GDMLParser (G4GDMLReadStructure *)
 G4GDMLParser (G4GDMLReadStructure *, G4GDMLWriteStructure *)
 ~G4GDMLParser ()
void Read (const G4String &filename, G4bool Validate=true)
void ReadModule (const G4String &filename, G4bool Validate=true)
void Write (const G4String &filename, const G4VPhysicalVolume *pvol=0, G4bool storeReferences=true, const G4String &SchemaLocation=G4GDML_DEFAULT_SCHEMALOCATION)
void Write (const G4String &filename, const G4LogicalVolume *lvol, G4bool storeReferences=true, const G4String &SchemaLocation=G4GDML_DEFAULT_SCHEMALOCATION)
G4LogicalVolumeParseST (const G4String &name, G4Material *medium, G4Material *solid)
G4bool IsValid (const G4String &name) const
G4double GetConstant (const G4String &name) const
G4double GetVariable (const G4String &name) const
G4double GetQuantity (const G4String &name) const
G4ThreeVector GetPosition (const G4String &name) const
G4ThreeVector GetRotation (const G4String &name) const
G4ThreeVector GetScale (const G4String &name) const
G4GDMLMatrix GetMatrix (const G4String &name) const
G4LogicalVolumeGetVolume (const G4String &name) const
G4VPhysicalVolumeGetWorldVolume (const G4String &setupName="Default") const
G4GDMLAuxListType GetVolumeAuxiliaryInformation (G4LogicalVolume *logvol) const
const G4GDMLAuxMapTypeGetAuxMap () const
void StripNamePointers () const
void SetStripFlag (G4bool)
void SetOverlapCheck (G4bool)
void Clear ()
void AddModule (const G4VPhysicalVolume *const physvol)
void AddModule (const G4int depth)
void SetAddPointerToName (G4bool set)


Detailed Description

Definition at line 54 of file G4GDMLParser.hh.


Constructor & Destructor Documentation

G4GDMLParser::G4GDMLParser (  ) 

Definition at line 36 of file G4GDMLParser.cc.

00037   : urcode(false), uwcode(false), strip(true)
00038 {
00039   reader = new G4GDMLReadStructure;
00040   writer = new G4GDMLWriteStructure;
00041   messenger = new G4GDMLMessenger(this);
00042 
00043   xercesc::XMLPlatformUtils::Initialize();
00044 }

G4GDMLParser::G4GDMLParser ( G4GDMLReadStructure  ) 

Definition at line 46 of file G4GDMLParser.cc.

00047   : urcode(true), uwcode(false)
00048 {
00049   reader = extr;
00050   writer = new G4GDMLWriteStructure;
00051   messenger = new G4GDMLMessenger(this);
00052 
00053   xercesc::XMLPlatformUtils::Initialize();
00054 }

G4GDMLParser::G4GDMLParser ( G4GDMLReadStructure ,
G4GDMLWriteStructure  
)

Definition at line 56 of file G4GDMLParser.cc.

00058   : urcode(true), uwcode(true)
00059 {
00060   reader = extr;
00061   writer = extw;
00062   messenger = new G4GDMLMessenger(this);
00063 
00064   xercesc::XMLPlatformUtils::Initialize();
00065 }

G4GDMLParser::~G4GDMLParser (  ) 

Definition at line 67 of file G4GDMLParser.cc.

00068 {
00069   xercesc::XMLPlatformUtils::Terminate();
00070   if (!urcode) { delete reader; }
00071   if (!uwcode) { delete writer; }
00072   delete messenger;
00073 }


Member Function Documentation

void G4GDMLParser::AddModule ( const G4int  depth  )  [inline]

Definition at line 201 of file G4GDMLParser.icc.

References G4GDMLWrite::AddModule().

00202 {
00203   writer->AddModule(depth);
00204 }

void G4GDMLParser::AddModule ( const G4VPhysicalVolume *const   physvol  )  [inline]

Definition at line 195 of file G4GDMLParser.icc.

References G4GDMLWrite::AddModule().

00196 {
00197   writer->AddModule(physvol);
00198 }

void G4GDMLParser::Clear (  )  [inline]

Definition at line 185 of file G4GDMLParser.icc.

References G4GDMLReadStructure::Clear().

Referenced by G4GDMLMessenger::SetNewValue().

00186 {
00187   reader->Clear();
00188 }

const G4GDMLAuxMapType * G4GDMLParser::GetAuxMap (  )  const [inline]

Definition at line 164 of file G4GDMLParser.icc.

References G4GDMLReadStructure::GetAuxMap().

00165 {
00166   return reader->GetAuxMap();
00167 }

G4double G4GDMLParser::GetConstant ( const G4String name  )  const [inline]

Definition at line 103 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetConstant().

00104 {
00105   return reader->GetConstant(name);
00106 }

G4GDMLMatrix G4GDMLParser::GetMatrix ( const G4String name  )  const [inline]

Definition at line 139 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetMatrix().

00140 {
00141   return reader->GetMatrix(name);
00142 }

G4ThreeVector G4GDMLParser::GetPosition ( const G4String name  )  const [inline]

Definition at line 121 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetPosition().

00122 {
00123   return reader->GetPosition(name);
00124 }

G4double G4GDMLParser::GetQuantity ( const G4String name  )  const [inline]

Definition at line 115 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetQuantity().

00116 {
00117   return reader->GetQuantity(name);
00118 }

G4ThreeVector G4GDMLParser::GetRotation ( const G4String name  )  const [inline]

Definition at line 127 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetRotation().

00128 {
00129   return reader->GetRotation(name);
00130 }

G4ThreeVector G4GDMLParser::GetScale ( const G4String name  )  const [inline]

Definition at line 133 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetScale().

00134 {
00135   return reader->GetScale(name);
00136 }

G4double G4GDMLParser::GetVariable ( const G4String name  )  const [inline]

Definition at line 109 of file G4GDMLParser.icc.

References G4GDMLReadDefine::GetVariable().

00110 {
00111   return reader->GetVariable(name);
00112 }

G4LogicalVolume * G4GDMLParser::GetVolume ( const G4String name  )  const [inline]

Definition at line 145 of file G4GDMLParser.icc.

References G4GDMLReadStructure::GetVolume().

00146 {
00147   return reader->GetVolume(name);
00148 }

G4GDMLAuxListType G4GDMLParser::GetVolumeAuxiliaryInformation ( G4LogicalVolume logvol  )  const [inline]

Definition at line 158 of file G4GDMLParser.icc.

References G4GDMLReadStructure::GetVolumeAuxiliaryInformation().

00159 {
00160   return reader->GetVolumeAuxiliaryInformation(logvol);
00161 }

G4VPhysicalVolume * G4GDMLParser::GetWorldVolume ( const G4String setupName = "Default"  )  const [inline]

Definition at line 151 of file G4GDMLParser.icc.

References G4GDMLReadStructure::GetWorldVolume().

Referenced by G4GDMLMessenger::SetNewValue().

00152 {
00153   return reader->GetWorldVolume(setupName);
00154 }

G4bool G4GDMLParser::IsValid ( const G4String name  )  const [inline]

Definition at line 97 of file G4GDMLParser.icc.

References G4GDMLReadDefine::IsValidID().

00098 {
00099   return reader->IsValidID(name);
00100 }

G4LogicalVolume * G4GDMLParser::ParseST ( const G4String name,
G4Material medium,
G4Material solid 
) [inline]

Definition at line 85 of file G4GDMLParser.icc.

References G4STRead::Read().

00088 {   
00089   G4STRead STreader;
00090   return STreader.Read(filename, medium, solid);
00091 }

void G4GDMLParser::Read ( const G4String filename,
G4bool  Validate = true 
) [inline]

Definition at line 35 of file G4GDMLParser.icc.

References G4GDMLRead::Read().

Referenced by G4GDMLMessenger::SetNewValue().

00036 {   
00037   reader->Read(filename,validate,false,strip);
00038 }

void G4GDMLParser::ReadModule ( const G4String filename,
G4bool  Validate = true 
) [inline]

Definition at line 41 of file G4GDMLParser.icc.

References G4GDMLRead::Read().

00042 {   
00043   reader->Read(filename,validate,true);
00044 }

void G4GDMLParser::SetAddPointerToName ( G4bool  set  )  [inline]

Definition at line 207 of file G4GDMLParser.icc.

References G4GDMLWrite::SetAddPointerToName().

00208 {
00209   writer->SetAddPointerToName(set);
00210 }

void G4GDMLParser::SetOverlapCheck ( G4bool   )  [inline]

Definition at line 180 of file G4GDMLParser.icc.

References G4GDMLRead::OverlapCheck().

00181 {
00182   reader->OverlapCheck(flag);
00183 }

void G4GDMLParser::SetStripFlag ( G4bool   )  [inline]

Definition at line 175 of file G4GDMLParser.icc.

00176 {
00177   strip = flag;
00178 }

void G4GDMLParser::StripNamePointers (  )  const [inline]

Definition at line 170 of file G4GDMLParser.icc.

References G4GDMLRead::StripNames().

00171 {
00172   reader->StripNames();
00173 }

void G4GDMLParser::Write ( const G4String filename,
const G4LogicalVolume lvol,
G4bool  storeReferences = true,
const G4String SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION 
) [inline]

Definition at line 69 of file G4GDMLParser.icc.

References G4TransportationManager::GetTransportationManager(), and G4GDMLWrite::Write().

00073 { 
00074   const G4int depth = 0;
00075 
00076   if (!lvol)
00077   {
00078     lvol = G4TransportationManager::GetTransportationManager()->
00079            GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume();
00080   }
00081   writer->Write(filename,lvol,schemaLocation,depth,refs);
00082 }

void G4GDMLParser::Write ( const G4String filename,
const G4VPhysicalVolume pvol = 0,
G4bool  storeReferences = true,
const G4String SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION 
) [inline]

Definition at line 47 of file G4GDMLParser.icc.

References G4VPhysicalVolume::GetLogicalVolume(), G4TransportationManager::GetTransportationManager(), and G4GDMLWrite::Write().

Referenced by G4GDMLMessenger::SetNewValue().

00051 { 
00052   const G4int depth = 0;
00053   G4LogicalVolume* lvol = 0;
00054 
00055   if (!pvol)
00056   {
00057     lvol = G4TransportationManager::GetTransportationManager()->
00058            GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume();
00059   }
00060   else
00061   {
00062     lvol = pvol->GetLogicalVolume();
00063   }
00064 
00065   writer->Write(filename,lvol,schemaLocation,depth,refs);
00066 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:02 2013 for Geant4 by  doxygen 1.4.7