[root] / trunk / geom / gdml / inc / TGDMLParse.h Repository:
ViewVC logotype

Log of /trunk/geom/gdml/inc/TGDMLParse.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44559 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 5 09:35:46 2012 UTC (2 years, 7 months ago) by agheata
File length: 9799 byte(s)
Diff to previous 42245
Coverity fix

Revision 42245 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 25 16:01:49 2011 UTC (3 years, 1 month ago) by agheata
File length: 9661 byte(s)
Diff to previous 41588
GDML read/write fixes (A.Pytel)

Revision 41588 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 26 10:10:54 2011 UTC (3 years, 2 months ago) by agheata
File length: 9568 byte(s)
Diff to previous 41578
Layout changes (Anton Pytel)

Revision 41578 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 25 16:36:15 2011 UTC (3 years, 2 months ago) by agheata
File length: 9668 byte(s)
Diff to previous 36390
Change return type of GetScale method to TString. Change of attributes and tags according to gdml schema (e.g. twistTrap -> twistedtrap, twist->Phitwis, ...). Change order of formula and name in creating TGeoElement.

Revision 36390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 21 09:35:45 2010 UTC (4 years, 3 months ago) by agheata
File length: 9668 byte(s)
Diff to previous 35010
patch for clang (Axel)

Revision 35010 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 25 13:15:30 2010 UTC (4 years, 5 months ago) by agheata
File length: 9672 byte(s)
Diff to previous 32677
Fixed memory leaks reported by coverity.

Revision 32677 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 18 15:27:12 2010 UTC (4 years, 10 months ago) by brun
File length: 9723 byte(s)
Diff to previous 30745
From Andrei:
adds support for reading isotopes via the GDML parser.

Revision 30745 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 15 12:23:45 2009 UTC (5 years, 3 months ago) by brun
File length: 9464 byte(s)
Diff to previous 22923
From daniele.francesco.kruse@cern.ch
"Added support for the 'ellipsoid' GDML tag.
 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 corresponding dimensions."

Revision 22923 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 1 12:34:14 2008 UTC (6 years, 9 months ago) by rdm
File length: 9312 byte(s)
Diff to previous 20947
move geom, geombuilder, geompainter and gdml to geom meta directory.

Revision 20947 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 21 09:17:02 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9312 byte(s)
Diff to previous 20882
From Zoltan Torzsok:
Fix for a problem with long expressions lines.

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9059 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9059 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9109 byte(s)
Diff to previous 19562
remove :$ from tag line

Revision 19562 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 7 07:53:05 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9119 byte(s)
Diff to previous 17111
From Zoltan.Torzsok@cern.ch:
*** Using constants in GDML with ROOT ***

[ORIGINAL APPROACH]

Originally constants could not be used within mathematical expressions in ROOT.
The following example is to illustrate the problem:

<define>
	<constant name="size" value="100.0"/>
</define>

<solids>
	<box name="MyCube" x="size" y="size" z="size"/>
	<box name="MyBox" x="1.0*size" y="2.0*size" z="3.0*size"/>
</solids>

The "MyCube" solid can be parsed since it contains a constant only.
The "MyBox" solid will indicate an error message like "size" is not
recognised as an expression. This happens because in the original method
the whole expression string is searched in the constant map.
If it can be found, it is replaced with its value.
In "MyBox" the expression string for the "x" attribute is "1.0*size"
and there isnt any constant defined with the name of "1.0*size".
We can trick the parser and eliminate the mentioned error message by
adding the following constants:

<constant name="1.0*size" value="100"/>
<constant name="2.0*size" value="200"/>
<constant name="3.0*size" value="300"/>

[MY APPROACH]

I am using a find-and-replace method on the expression string.
If the name of a constant is found within the expression string,
it is replaced with the value of the constant.

This approach fails in special cases, when a constants name contains
an other constants name, like in the following:

<constant name="wi" value="100"/>
<constant name="width" value="200"/>

In this case, every occurence of "width" will look like "100dth"
so that "width" will be no longer recognised. This must be fixed.

[TEST RESULTS]

Applying my method has not got any impact on speed, even with
highly sophisticated models like "cms.gdml".


[FEATURES]

- Works with multiple constants in a single expression (tested)
- Should work with multiple *.gdml files (not tested)
- Works with constants with expressions (tested)

Example:

<constant name="size" value="100.0"/>
<constant name="width" value="2.0*size"/>
<constant name="height" value="4.0*size"/>
<constant name="depth" value="8.0*size"/>

*** Problem with rotation in boolean solids is fixed now ***

Originally, in GDML/Geant4, in a boolean composition of two solids only the second solid could be rotated.
This rotation has opposite winding compared to the rotation of the volume, so that the inverse of the rotation matrix is used.

Later the boolean solid was extended, using the "firstrotation" token, so that the first solid can be rotated too.
But in the code the matrix inversion was omitted for this rotation. By adding matrix inversion to this rotation
the problem is solved.

Revision 17111 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 8 15:57:19 2006 UTC (8 years, 1 month ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9113 byte(s)
Diff to previous 16978
From Ben Lloyd:
Added Support for the GDML 'file' tag. Allows Modular GDML files to be
imported

Revision 16978 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 29 11:38:26 2006 UTC (8 years, 1 month ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9271 byte(s)
Diff to previous 16860
Fix coding conventions by renaming the internal helper classes
BaseMapHelper ->TGDMLBaseMapHelper
AssignmentHelper ->TGDMLAssignmentHelper
MapHelper ->TGDMLMapHelper

Revision 16860 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 22 08:03:45 2006 UTC (8 years, 2 months ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 9170 byte(s)
Diff to previous 16856
From Timur:
Code optimisation that gains a factor 3 in size for the code generated using std::map

Revision 16856 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 23:34:39 2006 UTC (8 years, 2 months ago) by rdm
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 7726 byte(s)
Diff to previous 16849
fix cvs indent line.

Revision 16849 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 10:43:16 2006 UTC (8 years, 2 months ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 7726 byte(s)
Diff to previous 16808
Fix coding conventions

Revision 16808 - (view) (download) (as text) (annotate) - [select for diffs]
Added Fri Nov 17 17:40:02 2006 UTC (8 years, 2 months ago) by brun
Original Path: trunk/gdml/inc/TGDMLParse.h
File length: 7562 byte(s)
From Ben LLoyd
New version of the GDML to ROOT import.
Use new C++ class TGDMLParse instead of Python scripts

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9