Logo ROOT  
Reference Guide
TGDMLWrite.h
Go to the documentation of this file.
1 // @(#)root/gdml:$Id$
2 // Author: Anton Pytel 15/9/2011
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGDMLWRITE
13 #define ROOT_TGDMLWRITE
14 
15 #include "TGeoMatrix.h"
16 #include "TGeoElement.h"
17 #include "TXMLEngine.h"
18 #include "TGeoVolume.h"
19 #include "TGeoParaboloid.h"
20 #include "TGeoSphere.h"
21 #include "TGeoArb8.h"
22 #include "TGeoCone.h"
23 #include "TGeoPara.h"
24 #include "TGeoTrd1.h"
25 #include "TGeoTrd2.h"
26 #include "TGeoTube.h"
27 #include "TGeoPcon.h"
28 #include "TGeoTorus.h"
29 #include "TGeoPgon.h"
30 #include "TGeoXtru.h"
31 #include "TGeoEltu.h"
32 #include "TGeoHype.h"
33 #include "TGeoBoolNode.h"
34 #include "TGeoCompositeShape.h"
35 #include "TGeoScaledShape.h"
36 #include "TGeoTessellated.h"
37 #include "TGeoManager.h"
38 #include "TGDMLMatrix.h"
39 
40 #include <map>
41 #include <set>
42 #include <iostream>
43 
44 ////////////////////////////////////////////////////////////////////////////
45 // //
46 // TGDMLWrite - Class for exporting geometries From ROOT's gGeoManager //
47 // (instance of TGeoManager class) To GDML file. More about GDML //
48 // see http://gdml.web.cern.ch. //
49 // //
50 ////////////////////////////////////////////////////////////////////////////
51 
52 class TGeoOpticalSurface;
53 class TGeoSkinSurface;
54 class TGeoBorderSurface;
55 
56 class TGDMLWrite : public TObject {
57 public:
58  TGDMLWrite();
59  virtual ~TGDMLWrite();
60 
61  static void StartGDMLWriting(TGeoManager * geomanager, const char* filename, TString option) {
62  //static function -
63  //options:
64  // g - set by default - geant4 compatibility
65  // f,n - if none of this two is set then naming convention is
66  // with incremental suffix, if "f" then suffix is pointer
67  // if "n" then there is no suffix, but uniqness of names
68  // is not secured.
70  writer->SetFltPrecision(TGeoManager::GetExportPrecision());
71  writer->WriteGDMLfile(geomanager, filename, option);
72  delete writer;
73  }
74  //wrapper of all main methods for extraction
75  void WriteGDMLfile(TGeoManager * geomanager, const char* filename = "test.gdml", TString option = "");
76  // Wrapper to only selectively write one branch of the volume hierarchy to file
77  void WriteGDMLfile(TGeoManager * geomanager, TGeoNode* top_node, const char* filename = "test.gdml", TString option = "");
78 
79  enum ENamingType {
83  };
84  void SetNamingSpeed(ENamingType naming);
85  void SetG4Compatibility(Bool_t G4Compatible) {
86  fgG4Compatibility = G4Compatible;
87  };
88 
89 private:
90  struct Xyz {
94  };
95 
96  typedef std::set<const TGeoOpticalSurface*> SurfaceList;
97  typedef std::set<const TGeoVolume*> VolList;
98  typedef std::set<const TGeoNode*> NodeList;
99  typedef std::map<TString, Bool_t> NameList;
100  typedef std::map<TString, TString> NameListS;
101  typedef std::map<TString, Int_t> NameListI;
102  typedef std::map<TString, Float_t> NameListF;
103  struct StructLst {
105  }; //to store pointers
106  struct NameLst {
107  NameListS fLst; //to map pointers with names
108  NameListI fLstIter; //to store all the iterators for repeating names
109  };
110 
111  //General lists
112  StructLst *fIsotopeList; //list of isotopes
113  StructLst *fElementList; //list of elements
114  StructLst *fAccPatt; //list of accepted patterns for division
115  StructLst *fRejShape; //list of rejected shapes
116  SurfaceList fSurfaceList; //list of optical surfaces
117  VolList fVolumeList; //list of volumes
118  NodeList fNodeList; //list of placed volumes
119 
120  NameLst *fNameList; //list of names (pointer mapped)
121 
122  //Data members
123  static TGDMLWrite *fgGDMLWrite; //pointer to gdml writer
124  Int_t fgNamingSpeed; //input option for volume and solid naming
125  Bool_t fgG4Compatibility; //input option for Geant4 compatibility
126  XMLDocPointer_t fGdmlFile; //pointer storing xml file
127  TString fTopVolumeName; //name of top volume
128  TXMLEngine *fGdmlE; //xml engine pointer
129 
130  XMLNodePointer_t fDefineNode; //main <define> node...
131  XMLNodePointer_t fMaterialsNode; //main <materials> node...
132  XMLNodePointer_t fSolidsNode; //main <solids> node...
133  XMLNodePointer_t fStructureNode; //main <structure> node...
134  Int_t fVolCnt; //count of volumes
135  Int_t fPhysVolCnt; //count of physical volumes
136  UInt_t fActNameErr; //count of name errors
137  UInt_t fSolCnt; //count of name solids
138  UInt_t fFltPrecision; //! floating point precision when writing
139 
140  static const UInt_t fgkProcBit = BIT(14); //14th bit is set when solid is processed
141  static const UInt_t fgkProcBitVol = BIT(19); //19th bit is set when volume is processed
142  static const UInt_t fgkMaxNameErr = 5; //maximum number of errors for naming
143 
144  //I. Methods processing the gGeoManager geometry object structure
145  //1. Main methods to extract everything from ROOT gGeoManager
146  XMLNodePointer_t ExtractMaterials(TList* materialsLst); //result <materials>...
147  TString ExtractSolid(TGeoShape* volShape); //adds <shape> to <solids>
148  void ExtractVolumes(TGeoNode* topNode); //result <volume> node... + corresp. shape
149  void ExtractMatrices(TObjArray *matrices); //adds <matrix> to <define>
150  void ExtractConstants(TGeoManager *geom); //adds <constant> to <define>
151  void ExtractOpticalSurfaces(TObjArray *surfaces); //adds <opticalsurface> to <solids>
152  void ExtractSkinSurfaces(TObjArray *surfaces); //adds <skinsurface> to <structure>
153  void ExtractBorderSurfaces(TObjArray *surfaces); //adds <bordersurface> to <structure>
154 
155  // Combined implementation to extract GDML information from the geometry tree
156  void WriteGDMLfile(TGeoManager * geomanager, TGeoNode* top_node, TList* materialsLst, const char* filename, TString option);
157 
158  //1.1 Materials sub methods - creating Nodes
159  XMLNodePointer_t CreateAtomN(Double_t atom, const char * unit = "g/mole");
160  XMLNodePointer_t CreateDN(Double_t density, const char * unit = "g/cm3");
161  XMLNodePointer_t CreateFractionN(Double_t percentage, const char * refName);
162  XMLNodePointer_t CreatePropertyN(TNamed const &property);
163 
164  XMLNodePointer_t CreateIsotopN(TGeoIsotope * isotope, const char * name);
165  XMLNodePointer_t CreateElementN(TGeoElement * element, XMLNodePointer_t materials, const char * name);
168 
169 
170  //1.2 Solids sub methods
173 
200 
202 
203  //1.3 Volume sub methods
204  XMLNodePointer_t CreatePhysVolN(const char * name, Int_t copyno, const char * volref, const char * posref, const char * rotref, XMLNodePointer_t scaleN);
205  XMLNodePointer_t CreateDivisionN(Double_t offset, Double_t width, Int_t number, const char * axis, const char * unit, const char * volref);
206 
207  XMLNodePointer_t CreateSetupN(const char * topVolName , const char * name = "default", const char * version = "1.0");
208  XMLNodePointer_t StartVolumeN(const char * name, const char * solid, const char * material);
209  XMLNodePointer_t StartAssemblyN(const char * name);
210 
211 
212  //II. Utility methods
213  Xyz GetXYZangles(const Double_t * rotationMatrix);
214  //nodes to create position, rotation and similar types first-position/rotation...
215  XMLNodePointer_t CreatePositionN(const char * name, Xyz position, const char * type = "position", const char * unit = "cm");
216  XMLNodePointer_t CreateRotationN(const char * name, Xyz rotation, const char * type = "rotation", const char * unit = "deg");
218  XMLNodePointer_t CreateConstantN(const char *name, Double_t value);
219  TGeoCompositeShape* CreateFakeCtub(TGeoCtub * geoShape); //create fake cut tube as intersection
220 
221  //check name (2nd parameter) whether it is in the list (1st parameter)
222  Bool_t IsInList(NameList list, TString name2check);
223  TString GenName(TString oldname);
224  TString GenName(TString oldname, TString objPointer);
225  Bool_t CanProcess(TObject *pointer);
226  TString GetPattAxis(Int_t divAxis, const char * pattName, TString& unit);
227  Bool_t IsNullParam(Double_t parValue, TString parName, TString objName);
228  void UnsetTemporaryBits(TGeoManager * geoMng);
230  void SetFltPrecision(UInt_t prec) { fFltPrecision = prec; }
231 
232  ////////////////////////////////////////////////////////////////////////////////
233  //
234  // Backwards compatibility for old DD4hep version (to be removed in the future)
235  //
236  ////////////////////////////////////////////////////////////////////////////////
237 public:
238  // Backwards compatibility (to be removed in the future): Wrapper to only selectively write one branch
239  void WriteGDMLfile(TGeoManager * geomanager, TGeoVolume* top_vol, const char* filename = "test.gdml", TString option = "");
240 private:
241  // Backwards compatibility (to be removed in the future): Combined implementation to extract GDML information from the geometry tree
242  void WriteGDMLfile(TGeoManager * geomanager, TGeoVolume* top_vol, TList* materialsLst, const char* filename, TString option);
243  void ExtractVolumes(TGeoVolume* topVolume); //result <volume> node... + corresp. shape
244 
245  ClassDef(TGDMLWrite, 0) //imports GDML using DOM and binds it to ROOT
246 };
247 
248 #endif /* ROOT_TGDMLWRITE */
TGDMLWrite::ExtractVolumes
void ExtractVolumes(TGeoNode *topNode)
Method extracting geometry structure recursively.
Definition: TGDMLWrite.cxx:548
TGDMLWrite::fgG4Compatibility
Bool_t fgG4Compatibility
Definition: TGDMLWrite.h:125
TGeoPcon.h
TGDMLWrite::fAccPatt
StructLst * fAccPatt
Definition: TGDMLWrite.h:114
TGeoTessellated
Definition: TGeoTessellated.h:105
TGeoIsotope
Definition: TGeoElement.h:108
TGeoManager::GetExportPrecision
static UInt_t GetExportPrecision()
Definition: TGeoManager.h:479
TGDMLWrite::fGdmlE
TXMLEngine * fGdmlE
Definition: TGDMLWrite.h:128
TGDMLWrite::fFltPrecision
UInt_t fFltPrecision
Definition: TGDMLWrite.h:138
TGDMLWrite::CreatePolyhedraN
XMLNodePointer_t CreatePolyhedraN(TGeoPgon *geoShape)
Creates "polyhedra" node for GDML.
Definition: TGDMLWrite.cxx:1470
TGDMLWrite::CreateMixtureN
XMLNodePointer_t CreateMixtureN(TGeoMixture *mixture, XMLNodePointer_t materials, TString mname)
Creates "material" node for GDML with references to other sub elements.
Definition: TGDMLWrite.cxx:837
TGDMLWrite::CreateFractionN
XMLNodePointer_t CreateFractionN(Double_t percentage, const char *refName)
Creates "fraction" node for GDML.
Definition: TGDMLWrite.cxx:737
TGeoPara
Definition: TGeoPara.h:17
TGDMLWrite::SetG4Compatibility
void SetG4Compatibility(Bool_t G4Compatible)
Definition: TGDMLWrite.h:85
TGDMLWrite::CreateArb8N
XMLNodePointer_t CreateArb8N(TGeoArb8 *geoShape)
Creates "arb8" node for GDML.
Definition: TGDMLWrite.cxx:1022
TGDMLWrite::CreateZplaneN
XMLNodePointer_t CreateZplaneN(Double_t z, Double_t rmin, Double_t rmax)
Creates "zplane" node for GDML.
Definition: TGDMLWrite.cxx:1377
TGDMLWrite::CreateSetupN
XMLNodePointer_t CreateSetupN(const char *topVolName, const char *name="default", const char *version="1.0")
Creates "setup" node for GDML.
Definition: TGDMLWrite.cxx:1934
TObjArray
Definition: TObjArray.h:37
TGDMLWrite::CreateParaN
XMLNodePointer_t CreateParaN(TGeoPara *geoShape)
Creates "para" node for GDML.
Definition: TGDMLWrite.cxx:1109
TGDMLWrite::CreateHypeN
XMLNodePointer_t CreateHypeN(TGeoHype *geoShape)
Creates "hype" node for GDML.
Definition: TGDMLWrite.cxx:1516
TGDMLWrite::CreateMatrixN
XMLNodePointer_t CreateMatrixN(TGDMLMatrix const *matrix)
Creates "matrix" kind of node for GDML.
Definition: TGDMLWrite.cxx:1900
TGDMLWrite::fVolumeList
VolList fVolumeList
Definition: TGDMLWrite.h:117
XMLDocPointer_t
void * XMLDocPointer_t
Definition: TXMLEngine.h:20
TGDMLWrite::fActNameErr
UInt_t fActNameErr
Definition: TGDMLWrite.h:136
TGDMLWrite::CreateDN
XMLNodePointer_t CreateDN(Double_t density, const char *unit="g/cm3")
Creates "D" density node for GDML.
Definition: TGDMLWrite.cxx:725
TGeoTorus
Definition: TGeoTorus.h:17
TGeoHype
Definition: TGeoHype.h:17
TGDMLWrite::fSolCnt
UInt_t fSolCnt
Definition: TGDMLWrite.h:137
TGeoCtub
Definition: TGeoTube.h:168
TGDMLWrite::fgGDMLWrite
static TGDMLWrite * fgGDMLWrite
Definition: TGDMLWrite.h:123
TGDMLWrite::CreateTessellatedN
XMLNodePointer_t CreateTessellatedN(TGeoTessellated *geoShape)
Creates "tessellated" (tessellated shape) node for GDML.
Definition: TGDMLWrite.cxx:1651
TGeoXtru
Definition: TGeoXtru.h:22
TGDMLWrite::CreateMaterialN
XMLNodePointer_t CreateMaterialN(TGeoMaterial *material, TString mname)
Creates "material" node for GDML.
Definition: TGDMLWrite.cxx:907
TGDMLWrite::fRejShape
StructLst * fRejShape
Definition: TGDMLWrite.h:115
TGDMLWrite::ExtractMatrices
void ExtractMatrices(TObjArray *matrices)
Method exporting GDML matrices.
Definition: TGDMLWrite.cxx:400
TGDMLWrite::fMaterialsNode
XMLNodePointer_t fMaterialsNode
Definition: TGDMLWrite.h:131
TGDMLWrite::WriteGDMLfile
void WriteGDMLfile(TGeoManager *geomanager, const char *filename="test.gdml", TString option="")
Definition: TGDMLWrite.cxx:235
TGeoScaledShape
Definition: TGeoScaledShape.h:20
TGDMLWrite::fDefineNode
XMLNodePointer_t fDefineNode
Definition: TGDMLWrite.h:130
TGDMLWrite::IsNullParam
Bool_t IsNullParam(Double_t parValue, TString parName, TString objName)
Check for null parameter to skip the NULL objects.
Definition: TGDMLWrite.cxx:2372
TGDMLWrite::GetPattAxis
TString GetPattAxis(Int_t divAxis, const char *pattName, TString &unit)
Method that retrieves axis and unit along which object is divided.
Definition: TGDMLWrite.cxx:2337
TGeoArb8
Definition: TGeoArb8.h:17
TGDMLWrite::fIsotopeList
StructLst * fIsotopeList
Definition: TGDMLWrite.h:112
TGDMLWrite::NameListS
std::map< TString, TString > NameListS
Definition: TGDMLWrite.h:100
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGDMLWrite::StartVolumeN
XMLNodePointer_t StartVolumeN(const char *name, const char *solid, const char *material)
Creates "volume" node for GDML.
Definition: TGDMLWrite.cxx:1947
TGDMLWrite::CreateBorderSurfaceN
XMLNodePointer_t CreateBorderSurfaceN(TGeoBorderSurface *geoSurf)
Creates "bordersurface" node for GDML.
Definition: TGDMLWrite.cxx:1854
TGDMLWrite::CreateEllipsoidN
XMLNodePointer_t CreateEllipsoidN(TGeoCompositeShape *geoShape, TString elName)
Creates "ellipsoid" node for GDML this is a special case, because ellipsoid is not defined in ROOT so...
Definition: TGDMLWrite.cxx:1585
TGDMLWrite::fPhysVolCnt
Int_t fPhysVolCnt
Definition: TGDMLWrite.h:135
TGeoVolume.h
TGDMLWrite
Definition: TGDMLWrite.h:56
TGDMLWrite::CreateOpticalSurfaceN
XMLNodePointer_t CreateOpticalSurfaceN(TGeoOpticalSurface *geoSurf)
Creates "opticalsurface" node for GDML.
Definition: TGDMLWrite.cxx:1815
writer
Definition: writer.py:1
TGeoEltu.h
TGeoCone
Definition: TGeoCone.h:17
TGDMLWrite::CreateElConeN
XMLNodePointer_t CreateElConeN(TGeoScaledShape *geoShape)
Creates "elcone" (elliptical cone) node for GDML this is a special case, because elliptical cone is n...
Definition: TGDMLWrite.cxx:1624
TGeoTubeSeg
Definition: TGeoTube.h:88
TGDMLWrite::NameListI
std::map< TString, Int_t > NameListI
Definition: TGDMLWrite.h:101
TGeoEltu
Definition: TGeoEltu.h:17
TGDMLWrite::NameLst::fLstIter
NameListI fLstIter
Definition: TGDMLWrite.h:108
TGDMLWrite::StartGDMLWriting
static void StartGDMLWriting(TGeoManager *geomanager, const char *filename, TString option)
Definition: TGDMLWrite.h:61
TString
Definition: TString.h:136
TGDMLWrite::CanProcess
Bool_t CanProcess(TObject *pointer)
Method which tests whether solids can be processed.
Definition: TGDMLWrite.cxx:2326
TGeoCone.h
TGeoMixture
Definition: TGeoMaterial.h:155
TGeoNode
Definition: TGeoNode.h:39
TGDMLWrite::kwithoutSufixNotUniq
@ kwithoutSufixNotUniq
Definition: TGDMLWrite.h:81
TGDMLWrite::CreatePositionN
XMLNodePointer_t CreatePositionN(const char *name, Xyz position, const char *type="position", const char *unit="cm")
Creates "position" kind of node for GDML.
Definition: TGDMLWrite.cxx:1870
TGDMLWrite::fVolCnt
Int_t fVolCnt
Definition: TGDMLWrite.h:134
TGeoMaterial
Definition: TGeoMaterial.h:34
bool
TGeoCompositeShape
Definition: TGeoCompositeShape.h:27
TGDMLWrite::fSolidsNode
XMLNodePointer_t fSolidsNode
Definition: TGDMLWrite.h:132
TGDMLWrite::TGDMLWrite
TGDMLWrite()
Default constructor.
Definition: TGDMLWrite.cxx:185
TGDMLWrite::CreateXtrusionN
XMLNodePointer_t CreateXtrusionN(TGeoXtru *geoShape)
Creates "xtru" node for GDML.
Definition: TGDMLWrite.cxx:1542
TGeoTrd2.h
TGDMLWrite::GetXYZangles
Xyz GetXYZangles(const Double_t *rotationMatrix)
Retrieves X Y Z angles from rotation matrix.
Definition: TGDMLWrite.cxx:2139
TGDMLWrite::StartAssemblyN
XMLNodePointer_t StartAssemblyN(const char *name)
Creates "assembly" node for GDML.
Definition: TGDMLWrite.cxx:1967
TGDMLWrite::ExtractConstants
void ExtractConstants(TGeoManager *geom)
Method exporting GDML matrices.
Definition: TGDMLWrite.cxx:415
TGDMLWrite::CreateTwistedTrapN
XMLNodePointer_t CreateTwistedTrapN(TGeoGtra *geoShape)
Creates "twistedtrap" node for GDML.
Definition: TGDMLWrite.cxx:1176
TGDMLWrite::Xyz::z
Double_t z
Definition: TGDMLWrite.h:93
TGeoParaboloid.h
TGDMLWrite::fNodeList
NodeList fNodeList
Definition: TGDMLWrite.h:118
TGDMLWrite::CreateTorusN
XMLNodePointer_t CreateTorusN(TGeoTorus *geoShape)
Creates "torus" node for GDML.
Definition: TGDMLWrite.cxx:1445
TGDMLWrite::kfastButUglySufix
@ kfastButUglySufix
Definition: TGDMLWrite.h:82
TGDMLWrite::CreateSphereN
XMLNodePointer_t CreateSphereN(TGeoSphere *geoShape)
Creates "sphere" node for GDML.
Definition: TGDMLWrite.cxx:997
TGDMLWrite::CreateParaboloidN
XMLNodePointer_t CreateParaboloidN(TGeoParaboloid *geoShape)
Creates "paraboloid" node for GDML.
Definition: TGDMLWrite.cxx:976
TGeoArb8.h
TGDMLWrite::StructLst
Definition: TGDMLWrite.h:103
TXMLEngine.h
TGeoShape
Definition: TGeoShape.h:25
TGDMLWrite::CreateTrapN
XMLNodePointer_t CreateTrapN(TGeoTrap *geoShape)
Creates "trap" node for GDML.
Definition: TGDMLWrite.cxx:1130
TGDMLWrite::CreateIsotopN
XMLNodePointer_t CreateIsotopN(TGeoIsotope *isotope, const char *name)
Creates "isotope" node for GDML.
Definition: TGDMLWrite.cxx:760
TGDMLWrite::Xyz::x
Double_t x
Definition: TGDMLWrite.h:91
TGDMLWrite::~TGDMLWrite
virtual ~TGDMLWrite()
Destructor.
Definition: TGDMLWrite.cxx:214
TGDMLWrite::fElementList
StructLst * fElementList
Definition: TGDMLWrite.h:113
TGeoElement
Definition: TGeoElement.h:36
TGDMLWrite::CreateConstantN
XMLNodePointer_t CreateConstantN(const char *name, Double_t value)
Creates "constant" kind of node for GDML.
Definition: TGDMLWrite.cxx:1922
TGeoTrd1.h
TGDMLWrite::fgkProcBitVol
static const UInt_t fgkProcBitVol
Definition: TGDMLWrite.h:141
TGDMLWrite::fgkMaxNameErr
static const UInt_t fgkMaxNameErr
Definition: TGDMLWrite.h:142
TGDMLWrite::CreateCommonBoolN
XMLNodePointer_t CreateCommonBoolN(TGeoCompositeShape *geoShape)
Creates common part of union intersection and subtraction nodes.
Definition: TGDMLWrite.cxx:1689
TXMLEngine
Definition: TXMLEngine.h:26
TGeoSphere
Definition: TGeoSphere.h:17
TGDMLWrite::fTopVolumeName
TString fTopVolumeName
Definition: TGDMLWrite.h:127
TGeoElement.h
surfaces
Definition: surfaces.py:1
TNamed
Definition: TNamed.h:29
TGDMLWrite::fGdmlFile
XMLDocPointer_t fGdmlFile
Definition: TGDMLWrite.h:126
TGDMLWrite::StructLst::fLst
NameList fLst
Definition: TGDMLWrite.h:104
TGeoHype.h
TGDMLWrite::NameLst
Definition: TGDMLWrite.h:106
TGDMLWrite::UnsetTemporaryBits
void UnsetTemporaryBits(TGeoManager *geoMng)
Unsetting bits that were changed in gGeoManager during export so that export can be run more times wi...
Definition: TGDMLWrite.cxx:2388
TGDMLWrite::CreateTubeN
XMLNodePointer_t CreateTubeN(TGeoTubeSeg *geoShape)
Creates "tube" node for GDML from object TGeoTubeSeg.
Definition: TGDMLWrite.cxx:1282
TGDMLWrite::NameList
std::map< TString, Bool_t > NameList
Definition: TGDMLWrite.h:99
TGDMLWrite::GetFltPrecision
UInt_t GetFltPrecision() const
Definition: TGDMLWrite.h:229
TGeoTube
Definition: TGeoTube.h:17
BIT
#define BIT(n)
Definition: Rtypes.h:85
TGeoPgon
Definition: TGeoPgon.h:20
TGeoPcon
Definition: TGeoPcon.h:17
XMLNodePointer_t
void * XMLNodePointer_t
Definition: TXMLEngine.h:17
TGeoBBox
Definition: TGeoBBox.h:17
TGeoXtru.h
TGeoCompositeShape.h
TGDMLWrite::IsInList
Bool_t IsInList(NameList list, TString name2check)
Checks whether name2check is in (NameList) list.
Definition: TGDMLWrite.cxx:2243
TGDMLWrite::ExtractMaterials
XMLNodePointer_t ExtractMaterials(TList *materialsLst)
Method exporting materials.
Definition: TGDMLWrite.cxx:498
TGDMLWrite::CreateFakeCtub
TGeoCompositeShape * CreateFakeCtub(TGeoCtub *geoShape)
Method creating cutTube as an intersection of tube and two boxes.
Definition: TGDMLWrite.cxx:2165
TGDMLWrite::CreateTrdN
XMLNodePointer_t CreateTrdN(TGeoTrd1 *geoShape)
Creates "trd" node for GDML from object TGeoTrd1.
Definition: TGDMLWrite.cxx:1236
TGDMLWrite::GenName
TString GenName(TString oldname)
NCNAME basic restrictions Replace "$" character with empty character etc.
Definition: TGDMLWrite.cxx:2253
TGDMLWrite::CreatePropertyN
XMLNodePointer_t CreatePropertyN(TNamed const &property)
Creates "property" node for GDML.
Definition: TGDMLWrite.cxx:749
unsigned int
TGeoGtra
Definition: TGeoArb8.h:145
TGeoMatrix.h
TGDMLMatrix
Definition: TGDMLMatrix.h:34
TGDMLWrite::SetFltPrecision
void SetFltPrecision(UInt_t prec)
Definition: TGDMLWrite.h:230
TGDMLWrite::CreateConeN
XMLNodePointer_t CreateConeN(TGeoConeSeg *geoShape)
Creates "cone" node for GDML from TGeoConeSeg object.
Definition: TGDMLWrite.cxx:1057
TGeoManager.h
TGDMLWrite::SurfaceList
std::set< const TGeoOpticalSurface * > SurfaceList
Definition: TGDMLWrite.h:96
TGeoScaledShape.h
TGDMLWrite::CreateEltubeN
XMLNodePointer_t CreateEltubeN(TGeoEltu *geoShape)
Creates "eltube" node for GDML.
Definition: TGDMLWrite.cxx:1492
TGeoParaboloid
Definition: TGeoParaboloid.h:17
TGDMLWrite::NameLst::fLst
NameListS fLst
Definition: TGDMLWrite.h:107
TGeoTrd1
Definition: TGeoTrd1.h:17
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoBorderSurface
Definition: TGeoOpticalSurface.h:191
TGDMLWrite::ExtractBorderSurfaces
void ExtractBorderSurfaces(TObjArray *surfaces)
Method exporting border surfaces.
Definition: TGDMLWrite.cxx:466
TGDMLWrite::CreateAtomN
XMLNodePointer_t CreateAtomN(Double_t atom, const char *unit="g/mole")
Creates "atom" node for GDML.
Definition: TGDMLWrite.cxx:713
TGDMLWrite::fStructureNode
XMLNodePointer_t fStructureNode
Definition: TGDMLWrite.h:133
TGDMLWrite::CreatePhysVolN
XMLNodePointer_t CreatePhysVolN(const char *name, Int_t copyno, const char *volref, const char *posref, const char *rotref, XMLNodePointer_t scaleN)
Creates "physvol" node for GDML.
Definition: TGDMLWrite.cxx:1978
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGDMLWrite::SetNamingSpeed
void SetNamingSpeed(ENamingType naming)
Set convention of naming solids and volumes.
Definition: TGDMLWrite.cxx:228
name
char name[80]
Definition: TGX11.cxx:110
TGDMLWrite::CreateDivisionN
XMLNodePointer_t CreateDivisionN(Double_t offset, Double_t width, Int_t number, const char *axis, const char *unit, const char *volref)
Creates "divisionvol" node for GDML.
Definition: TGDMLWrite.cxx:2010
TGDMLWrite::CreatePolyconeN
XMLNodePointer_t CreatePolyconeN(TGeoPcon *geoShape)
Creates "polycone" node for GDML.
Definition: TGDMLWrite.cxx:1392
TGDMLWrite::CreateElementN
XMLNodePointer_t CreateElementN(TGeoElement *element, XMLNodePointer_t materials, const char *name)
Creates "element" node for GDML element node and attribute.
Definition: TGDMLWrite.cxx:774
TGDMLWrite::CreateSkinSurfaceN
XMLNodePointer_t CreateSkinSurfaceN(TGeoSkinSurface *geoSurf)
Creates "skinsurface" node for GDML.
Definition: TGDMLWrite.cxx:1839
TGeoPara.h
TGeoBoolNode.h
TGeoConeSeg
Definition: TGeoCone.h:98
TGDMLWrite::ExtractOpticalSurfaces
void ExtractOpticalSurfaces(TObjArray *surfaces)
Method exporting optical surfaces.
Definition: TGDMLWrite.cxx:431
TGDMLWrite::fSurfaceList
SurfaceList fSurfaceList
Definition: TGDMLWrite.h:116
TGDMLMatrix.h
TGDMLWrite::Xyz::y
Double_t y
Definition: TGDMLWrite.h:92
TGDMLWrite::NameListF
std::map< TString, Float_t > NameListF
Definition: TGDMLWrite.h:102
type
int type
Definition: TGX11.cxx:121
TGeoTube.h
TGDMLWrite::NodeList
std::set< const TGeoNode * > NodeList
Definition: TGDMLWrite.h:98
TGDMLWrite::CreateBoxN
XMLNodePointer_t CreateBoxN(TGeoBBox *geoShape)
Creates "box" node for GDML.
Definition: TGDMLWrite.cxx:954
TGDMLWrite::ExtractSolid
TString ExtractSolid(TGeoShape *volShape)
Method creating solid to xml file and returning its name.
Definition: TGDMLWrite.cxx:530
TGDMLWrite::kelegantButSlow
@ kelegantButSlow
Definition: TGDMLWrite.h:80
TGDMLWrite::VolList
std::set< const TGeoVolume * > VolList
Definition: TGDMLWrite.h:97
TGDMLWrite::Xyz
Definition: TGDMLWrite.h:90
TGDMLWrite::ExtractSkinSurfaces
void ExtractSkinSurfaces(TObjArray *surfaces)
Method exporting skin surfaces.
Definition: TGDMLWrite.cxx:448
TGeoManager
Definition: TGeoManager.h:44
TGeoTessellated.h
TGeoOpticalSurface
Definition: TGeoOpticalSurface.h:27
TGDMLWrite::ChooseObject
XMLNodePointer_t ChooseObject(TGeoShape *geoShape)
Chooses the object and method that should be used for processing object.
Definition: TGDMLWrite.cxx:2045
TGDMLWrite::ENamingType
ENamingType
Definition: TGDMLWrite.h:79
TGDMLWrite::CreateRotationN
XMLNodePointer_t CreateRotationN(const char *name, Xyz rotation, const char *type="rotation", const char *unit="deg")
Creates "rotation" kind of node for GDML.
Definition: TGDMLWrite.cxx:1885
TGeoTrd2
Definition: TGeoTrd2.h:17
TGeoVolume
Definition: TGeoVolume.h:44
TGeoSphere.h
TGDMLWrite::fgkProcBit
static const UInt_t fgkProcBit
floating point precision when writing
Definition: TGDMLWrite.h:140
TList
Definition: TList.h:44
TGeoTrap
Definition: TGeoArb8.h:91
TGeoTorus.h
TGDMLWrite::fNameList
NameLst * fNameList
Definition: TGDMLWrite.h:120
TGDMLWrite::CreateCutTubeN
XMLNodePointer_t CreateCutTubeN(TGeoCtub *geoShape)
Creates "cutTube" node for GDML.
Definition: TGDMLWrite.cxx:1307
TGeoPgon.h
int
TGDMLWrite::fgNamingSpeed
Int_t fgNamingSpeed
Definition: TGDMLWrite.h:124
TGeoSkinSurface
Definition: TGeoOpticalSurface.h:162