ROOT logo
ROOT » GEOM » GDML » TGDMLParse

class TGDMLParse: public TObject

Function Members (Methods)

public:
TGDMLParse()
TGDMLParse(const TGDMLParse&)
virtual~TGDMLParse()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TGeoVolume*GDMLReadFile(const char* filename = "test.gdml")
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
static TGeoVolume*StartGDML(const char* filename)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
XMLNodePointer_tArb8(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tAssProcess(TXMLEngine* gdml, XMLNodePointer_t node)
XMLNodePointer_tBooSolid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int num)
XMLNodePointer_tBox(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tCone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tConProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tCutTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tEleProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLNodePointer_t parentn, Bool_t hasIsotopes)
XMLNodePointer_tEllipsoid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tElTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
doubleEvaluate(const char* evalline)
const char*GetScale(const char* unit)
XMLNodePointer_tHype(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tIsoProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLNodePointer_t parentn)
XMLNodePointer_tMatProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int z)
const char*NameShort(const char* name)
XMLNodePointer_tOrb(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tPara(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tParaboloid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
const char*ParseGDML(TXMLEngine* gdml, XMLNodePointer_t node)
XMLNodePointer_tPolycone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tPolyhedra(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tPosProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tReflection(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tRotProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tSclProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
Int_tSetAxis(const char* axisString)
XMLNodePointer_tSphere(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tTopProcess(TXMLEngine* gdml, XMLNodePointer_t node)
XMLNodePointer_tTorus(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tTrap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tTrd(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tTwistTrap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
XMLNodePointer_tVolProcess(TXMLEngine* gdml, XMLNodePointer_t node)
XMLNodePointer_tXtru(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)

Data Members

public:
const char*fCurrentFilecurrent file name being parsed
intfFILENOHolds which level of file the parser is at
TXMLEngine*fFileEngine[20]array of dom object pointers
const char*fStartFilename of originating file
intfVolIDvolume ID, incremented as assigned.
TGeoVolume*fWorldtop volume of geometry
const char*fWorldNametop volume of geometry name
private:
TGDMMapHelper<TGeoElement>felemap!Map containing element names and the TGeoElement for it
TGDMMapHelper<const char>ffilemap!Map containing files parsed during entire parsing, with their world volume name
vector<TFormula*>fformvec!Vector containing constant functions for GDML constant definitions
TGDMMapHelper<TGeoIsotope>fisomap!Map containing isotope names and the TGeoIsotope for it
TGDMMapHelper<TGeoMaterial>fmatmap!Map containing material names and the TGeoMaterial for it
TGDMMapHelper<TGeoMedium>fmedmap!Map containing medium names and the TGeoMedium for it
TGDMMapHelper<TGeoMixture>fmixmap!Map containing mixture names and the TGeoMixture for it
TGDMMapHelper<TGeoTranslation>fposmap!Map containing position names and the TGeoTranslation for it
map<string,string>freflectmap!Map containing reflection names and the Solid name ir references to
TGDMMapHelper<TGDMLRefl>freflsolidmap!Map containing reflection names and the TGDMLRefl for it - containing refl matrix
map<string,string>freflvolmap!Map containing reflected volume names and the solid ref for it
TGDMMapHelper<TGeoRotation>frotmap!Map containing rotation names and the TGeoRotation for it
TGDMMapHelper<TGeoScale>fsclmap!Map containing scale names and the TGeoScale for it
TGDMMapHelper<TGeoShape>fsolmap!Map containing solid names and the TGeoShape for it
TGDMMapHelper<TGeoVolume>fvolmap!Map containing volume names and the TGeoVolume for it

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoVolume* GDMLReadFile(const char* filename = "test.gdml")
creates the new instance of the XMLEngine called 'gdml', using the filename >>
then parses the file and creates the DOM tree. Then passes the DOM to the
next function to translate it.
const char* ParseGDML(TXMLEngine* gdml, XMLNodePointer_t node)
this function recursively moves thru the DOM tree of the GDML file. It checks for
key words along the way and if a key word is found it calls the corresponding
function to interpret the node.
double Evaluate(const char* evalline)
Int_t SetAxis(const char* axisString)
When using the 'divide' process in the geometry this function
sets the variable 'axis' depending on what is specified.
const char* NameShort(const char* name)
this function looks thru a string for the chars '0x' next to
each other, when it finds this, it calls another function to strip
the hex address.   It does this recursively until the end of the
string is reached, returning a string without any hex addresses.
XMLNodePointer_t ConProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, constants can be declared.
when the constant keyword is found, this function is called, and the
name and value of the constant is stored in the "fformvec" vector as
a TFormula class, representing a constant function
const char* GetScale(const char* unit)
Throughout the GDML file, a unit can de specified.   Whether it be
angular or linear, values can be used as well as abbreviations such as
 'mm' or 'deg'. This function is passed the specified unit and if it is
found, replaces it with the appropriate value.
XMLNodePointer_t PosProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, positions can be declared.
when the position keyword is found, this function is called, and the
name and values of the position are converted into type TGeoPosition
and stored in fposmap map using the name as its key. This function
can also be called when declaring solids.
XMLNodePointer_t RotProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
when the rotation keyword is found, this function is called, and the
name and values of the rotation are converted into type TGeoRotation
and stored in frotmap map using the name as its key. This function
can also be called when declaring solids.
XMLNodePointer_t SclProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
when the scale keyword is found, this function is called, and the
name and values of the scale are converted into type TGeoScale
and stored in fsclmap map using the name as its key. This function
can also be called when declaring solids.
XMLNodePointer_t IsoProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLNodePointer_t parentn)
In the material section of the GDML file, an isotope may be declared.
when the isotope keyword is found, this function is called, and the
required parameters are taken and stored, these are then bound and
converted to type TGeoIsotope and stored in fisomap map using the name
as its key.
XMLNodePointer_t EleProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLNodePointer_t parentn, Bool_t hasIsotopes)
In the materials section of the GDML file, elements can be declared.
when the element keyword is found, this function is called, and the
name and values of the element are converted into type TGeoElement and
stored in felemap map using the name as its key.
XMLNodePointer_t MatProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int z)
In the materials section of the GDML file, materials can be declared.
when the material keyword is found, this function is called, and the
name and values of the material are converted into type TGeoMaterial
and stored in fmatmap map using the name as its key. Mixtures can also
 be declared, and they are converted to TGeoMixture and stored in
fmixmap.   These mixtures and materials are then all converted into one
common type - TGeoMedium.   The map fmedmap is then built up of all the
mixtures and materials.
XMLNodePointer_t VolProcess(TXMLEngine* gdml, XMLNodePointer_t node)
In the structure section of the GDML file, volumes can be declared.
when the volume keyword is found, this function is called, and the
name and values of the volume are converted into type TGeoVolume and
stored in fvolmap map using the name as its key. Volumes reference to
a solid declared higher up in the solids section of the GDML file.
Some volumes reference to other physical volumes to contain inside
that volume, declaring positions and rotations within that volume.
When each 'physvol' is declared, a matrix for its rotation and
translation is built and the 'physvol node' is added to the original
volume using TGeoVolume->AddNode.
volume division is also declared within the volume node, and once the
values for the division have been collected, using TGeoVolume->divide,
the division can be applied.
XMLNodePointer_t BooSolid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int num)
In the solid section of the GDML file, boolean solids can be
declared. when the subtraction, intersection or union   keyword
is found, this function is called, and the values (rotation and
translation) of the solid are converted into type TGeoCompositeShape
and stored in fsolmap map using the name as its key.

1 = SUBTRACTION
2 = INTERSECTION
3 = UNION
XMLNodePointer_t AssProcess(TXMLEngine* gdml, XMLNodePointer_t node)
In the structure section of the GDML file, assembly volumes can be
declared. when the assembly keyword is found, this function is called,
and the name is converted into type TGeoVolumeAssembly and
stored in fvolmap map using the name as its key. Some assembly volumes
reference to other physical volumes to contain inside that assembly,
declaring positions and rotations within that volume. When each 'physvol'
is declared, a matrix for its rotation and translation is built and the
'physvol node' is added to the original assembly using TGeoVolume->AddNode.
XMLNodePointer_t TopProcess(TXMLEngine* gdml, XMLNodePointer_t node)
In the setup section of the GDML file, the top volume need to be
declared. when the setup keyword is found, this function is called,
and the top volume ref is taken and 'world' is set
XMLNodePointer_t Box(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a box may be declared.
when the box keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoBBox and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Ellipsoid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an ellipsoid may be declared.
Unfortunately, the ellipsoid is not supported under ROOT so,
when the ellipsoid keyword is found, this function is called
to convert it to a simple box with similar dimensions, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoBBox and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Paraboloid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Paraboloid may be declared.
when the paraboloid keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoParaboloid and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Arb8(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Arb8 may be declared.
when the arb8 keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoArb8 and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Tube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Tube may be declared.
when the tube keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoTubeSeg and stored in fsolmap map using the name
as its key.
XMLNodePointer_t CutTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Cut Tube may be declared.
when the cutTube keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoCtub and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Cone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a cone may be declared.
when the cone keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoConSeg and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Trap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trap may be declared.
when the trap keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoTrap and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Trd(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trd may be declared.
when the trd keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoTrd2 and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Polycone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polycone may be declared.
when the polycone keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoPCon and stored in fsolmap map using the name
as its key. Polycone has Zplanes, planes along the z axis specifying
the rmin, rmax dimenstions at that point along z.
XMLNodePointer_t Polyhedra(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polyhedra may be declared.
when the polyhedra keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoPgon and stored in fsolmap map using the name
as its key. Polycone has Zplanes, planes along the z axis specifying
the rmin, rmax dimenstions at that point along z.
XMLNodePointer_t Sphere(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Sphere may be declared.
when the sphere keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoSphere and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Torus(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Torus may be declared.
when the torus keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoTorus and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Hype(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Hype may be declared.
when the hype keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoHype and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Para(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Para may be declared.
when the para keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoPara and stored in fsolmap map using the name
as its key.
XMLNodePointer_t TwistTrap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a TwistTrap may be declared.
when the twistedtrap keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoGTra and stored in fsolmap map using the name
as its key.
XMLNodePointer_t ElTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a ElTube may be declared.
when the eltube keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoEltu and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Orb(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Orb may be declared.
when the orb keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoSphere and stored in fsolmap map using the name
as its key.
XMLNodePointer_t Xtru(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Xtru may be declared.
when the xtru keyword is found, this function is called, and the
dimensions required are taken and stored, these are then bound and
converted to type TGeoXtru and stored in fsolmap map using the name
as its key. The xtru has child nodes of either 'twoDimVertex'or
'section'.   These two nodes define the real structure of the shape.
The twoDimVertex's define the x,y sizes of a vertice. The section links
the vertice to a position within the xtru.
XMLNodePointer_t Reflection(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Reflected Solid may be
declared when the ReflectedSolid keyword is found, this function
is called. The rotation, position and scale for the reflection are
applied to a matrix that is then stored in the class object
TGDMLRefl.   This is then stored in the map freflsolidmap, with
the reflection name as a reference. also the name of the solid to
be reflected is stored in a map called freflectmap with the reflection
name as a reference.
TGDMLParse()
virtual ~TGDMLParse()
TGeoVolume* StartGDML(const char* filename)