G4GDMLParser.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //
00030 // class G4GDMLParser inline methods
00031 //
00032 // -------------------------------------------------------------------------
00033 
00034 inline 
00035 void G4GDMLParser::Read(const G4String& filename, G4bool validate)
00036 {   
00037   reader->Read(filename,validate,false,strip);
00038 }
00039 
00040 inline 
00041 void G4GDMLParser::ReadModule(const G4String& filename, G4bool validate)
00042 {   
00043   reader->Read(filename,validate,true);
00044 }
00045 
00046 inline
00047 void G4GDMLParser::Write(const G4String& filename,
00048                          const G4VPhysicalVolume* pvol,
00049                                G4bool refs,
00050                          const G4String& schemaLocation)
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 }
00067 
00068 inline
00069 void G4GDMLParser::Write(const G4String& filename,
00070                          const G4LogicalVolume* lvol,
00071                                G4bool refs,
00072                          const G4String& schemaLocation)
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 }
00083 
00084 inline 
00085 G4LogicalVolume* G4GDMLParser::ParseST(const G4String& filename,
00086                                              G4Material* medium,
00087                                              G4Material* solid)
00088 {   
00089   G4STRead STreader;
00090   return STreader.Read(filename, medium, solid);
00091 }
00092 
00093 //
00094 // Methods for Reader
00095 //
00096 
00097 inline G4bool G4GDMLParser::IsValid(const G4String& name) const
00098 {
00099   return reader->IsValidID(name);
00100 }
00101 
00102 inline 
00103 G4double G4GDMLParser::GetConstant(const G4String& name) const
00104 {
00105   return reader->GetConstant(name);
00106 }
00107 
00108 inline 
00109 G4double G4GDMLParser::GetVariable(const G4String& name) const
00110 {
00111   return reader->GetVariable(name);
00112 }
00113 
00114 inline 
00115 G4double G4GDMLParser::GetQuantity(const G4String& name) const
00116 {
00117   return reader->GetQuantity(name);
00118 }
00119 
00120 inline 
00121 G4ThreeVector G4GDMLParser::GetPosition(const G4String& name) const
00122 {
00123   return reader->GetPosition(name);
00124 }
00125 
00126 inline 
00127 G4ThreeVector G4GDMLParser::GetRotation(const G4String& name) const
00128 {
00129   return reader->GetRotation(name);
00130 }
00131 
00132 inline 
00133 G4ThreeVector G4GDMLParser::GetScale(const G4String& name) const
00134 {
00135   return reader->GetScale(name);
00136 }
00137 
00138 inline 
00139 G4GDMLMatrix G4GDMLParser::GetMatrix(const G4String& name) const
00140 {
00141   return reader->GetMatrix(name);
00142 }
00143 
00144 inline 
00145 G4LogicalVolume* G4GDMLParser::GetVolume(const G4String& name) const
00146 {
00147   return reader->GetVolume(name);
00148 }
00149 
00150 inline G4VPhysicalVolume*
00151 G4GDMLParser::GetWorldVolume(const G4String& setupName) const
00152 {
00153   return reader->GetWorldVolume(setupName);
00154 }
00155 
00156 inline 
00157 G4GDMLAuxListType
00158 G4GDMLParser::GetVolumeAuxiliaryInformation(G4LogicalVolume* logvol) const
00159 {
00160   return reader->GetVolumeAuxiliaryInformation(logvol);
00161 }
00162 
00163 inline
00164 const G4GDMLAuxMapType* G4GDMLParser::GetAuxMap() const
00165 {
00166   return reader->GetAuxMap();
00167 }
00168 
00169 inline
00170 void G4GDMLParser::StripNamePointers() const
00171 {
00172   reader->StripNames();
00173 }
00174 
00175 inline void G4GDMLParser::SetStripFlag(G4bool flag)
00176 {
00177   strip = flag;
00178 }
00179 
00180 inline void G4GDMLParser::SetOverlapCheck(G4bool flag)
00181 {
00182   reader->OverlapCheck(flag);
00183 }
00184 
00185 inline void G4GDMLParser::Clear()
00186 {
00187   reader->Clear();
00188 }
00189 
00190 //
00191 // Methods for Writer
00192 //
00193 
00194 inline 
00195 void G4GDMLParser::AddModule(const G4VPhysicalVolume* const physvol)
00196 {
00197   writer->AddModule(physvol);
00198 }
00199 
00200 inline 
00201 void G4GDMLParser::AddModule(const G4int depth)
00202 {
00203   writer->AddModule(depth);
00204 }
00205 
00206 inline 
00207 void G4GDMLParser::SetAddPointerToName(G4bool set)
00208 {
00209   writer->SetAddPointerToName(set);
00210 }

Generated on Mon May 27 17:48:19 2013 for Geant4 by  doxygen 1.4.7