library: libGdml #include "TGDMLParse.h" |
TGDMLParse
class description - header file - source file
viewCVS header - viewCVS source
class TGDMLParse: public TObject
Function Members (Methods)
Display options:
public:
| TGDMLParse() |
| TGDMLParse(const TGDMLParse&) |
virtual | ~TGDMLParse() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "") |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual void | TObject::Dump() const |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::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_t | TObject::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_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::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 void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TObject::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "") |
static void | TObject::SetDtorOnly(void* obj) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
static TGeoVolume* | StartGDML(const char* filename) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const |
private:
XMLNodePointer_t | Arb8(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | AssProcess(TXMLEngine* gdml, XMLNodePointer_t node) |
XMLNodePointer_t | BooSolid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int num) |
XMLNodePointer_t | Box(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Cone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | ConProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | CutTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | EleProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLNodePointer_t parentn) |
XMLNodePointer_t | ElTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
double | Evaluate(const char* evalline) |
const char* | FindConst(const char* retval) |
const char* | GetScale(const char* unit) |
XMLNodePointer_t | Hype(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | MatProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int z) |
const char* | NameShort(const char* name) |
const char* | NameShortB(const char* name) |
XMLNodePointer_t | Orb(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Para(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Paraboloid(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
const char* | ParseGDML(TXMLEngine* gdml, XMLNodePointer_t node) |
XMLNodePointer_t | Polycone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Polyhedra(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | PosProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Reflection(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | RotProcess(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
Int_t | SetAxis(const char* axisString) |
XMLNodePointer_t | Sphere(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | TopProcess(TXMLEngine* gdml, XMLNodePointer_t node) |
XMLNodePointer_t | Torus(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Trap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Trd(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | Tube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | TwistTrap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
XMLNodePointer_t | VolProcess(TXMLEngine* gdml, XMLNodePointer_t node) |
XMLNodePointer_t | Xtru(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPointer_t attr) |
Data Members
public:
const char* | fWorldName | top volume of geometry name |
TGeoVolume* | fWorld | top volume of geometry |
int | fVolID | volume ID, incremented as assigned. |
int | fFILENO | Holds which level of file the parser is at |
TXMLEngine* | fFileEngine[20] | array of dom object pointers |
const char* | fStartFile | name of originating file |
const char* | fCurrentFile | current file name being parsed |
private:
TGDMMapHelper<TGeoTranslation> | fposmap | !Map containing position names and the TGeoTranslation for it |
TGDMMapHelper<TGeoRotation> | frotmap | !Map containing rotation names and the TGeoRotation for it |
TGDMMapHelper<TGeoElement> | felemap | !Map containing element names and the TGeoElement 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<const char> | fconmap | !Map containing constant names and the constant's value |
TGDMMapHelper<TGeoShape> | fsolmap | !Map containing solid names and the TGeoShape for it |
TGDMMapHelper<TGeoVolume> | fvolmap | !Map containing volume names and the TGeoVolume for it |
map<string,string,less<string>,allocator<pair<const 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,less<string>,allocator<pair<const string,string> > > | freflvolmap | !Map containing reflected volume names and the solid ref for it |
TGDMMapHelper<const char> | ffilemap | !Map containing files parsed during entire parsing, with their world volume name |
TGeoVolume* GDMLReadFile(const char* filename)
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 funtion 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)
takes in a string containing a mathematical expression and
returns the result of the expression as a double.
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.
const char* NameShortB(const char* name)
this function is passed a string, and removes the first hex address
it finds. This function is called recursively by NameShort to
fully strip a string of all hex addresses within it.
const char* FindConst(const char* retval)
If a value is given within the GDML file, this function checks
the constant map set up when all constants are declared. If a matching
constant name is found, the corresponding value is returned, if not,
the original is returned.
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 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 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 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 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 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.
Author: Ben Lloyd 09/11/06
Last update: Tue Dec 12 10:58:59 2006
Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.