Re: A GDML file which cannot be parsed

From: Akira OKUMURA <oxon_at_juno.phys.s.u-tokyo.ac.jp>
Date: Mon, 8 Feb 2010 17:11:53 +0900


Hello Sergey,

Thank you for you advise.

I merged the two files by hand as you suggested, but I still get some errors. I list 4 error types. Are they all an intrinsic problems in my GDML or just limitations in ROOT? Do I always have to modify GDML files by hand to workaround them?

  1. multiple comment lines are invalid e.g. <!-- comment1 --> <!-- comment2 --> causes

Error in <TXMLEngine::ParseFile>: No multiple content entries allowed, line 7

2) spaces before or after an equal sign are invalid e.g.
<atom value= "1" />
causes (note: a white spaces exist before "1")

Error in <TXMLEngine::ParseFile>: Invalid attribute value, line 9

3) capital exponent style is invalid
e.g.
<D value="1E-25" unig="g/cm3"/>
causes

Error in <TFormula::Compile>: Bad numerical expression : "1E"

this is a limitation of TFormula as it says.

4) tessellated and triangular are invalid

Error: Unsupported GDML Tag Used :tessellated. Please Check Geometry/ Schema.
Error: Unsupported GDML Tag Used :triangular. Please Check Geometry/ Schema.

Regards,

OKUMURA, Akira oxon_at_juno.phys.s.u-tokyo.ac.jp Department of Physics, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira

On 2010/02/08, at 16:31, Sergey Linev wrote:

> Dear Akira,
>
> Unfortunately, xml syntax you have does not supported by ROOT xml
> parser.
> More precisely, this one:
>
> ...
> <!DOCTYPE gdml [
> <!ENTITY materials SYSTEM "MT3_materials.xml">
> ]>
> ...
>
> and than reference like this:
>
> ...
> <!-- Materials definition CallBack -->
> &materials;
> ...
>
> You should merge these files together to be able use them in ROOT.
>
> Regards,
> Sergey Linev
>
>
> --
> Sergey Linev Mail: S.Linev_at_gsi.de
> GSI, Experiment Elektronik Phone: +49-6159-71-1338
> Planckstr. 1 FAX: +49-6159-71-2986
> D-64291 Darmstadt
>
> GSI Helmholtzzentrum für Schwerionenforschung GmbH
> Handelsregister: Amtsgericht Darmstadt, HRB 1528
> Geschäftsführer: Prof. Dr. Horst Stoecker; Christiane Neumann
> Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
>
>
>
> Akira OKUMURA wrote:
>> Hello ROOTers,
>>
>> I created a GDML file using the trial version of FASTRAD which can
>> convert CAD STEP files to GDML files.
>> http://www.fastrad.net/
>>
>> The attached files are those created by FASTRAD. But I cannot open
>> MT3.gdml from TGeoManager.
>>
>> $ root
>> root [0] TGeoManager::Import("MT3.gdml")
>> Info in <TGeoManager::Import>: Reading geometry from file: MT3.gdml
>> Error in <TXMLEngine::ParseFile>: XML syntax error at line 3
>> Error in <TGeoManager::Import>: Cannot open file
>> (class TGeoManager*)0x0
>>
>> MT3.gdml includes an external XML file, MT3_materials.xml, which is
>> also attached. I suppose this inclusion is the reason of this
>> parser error.
>>
>> Is it possible to handle this kind of files in ROOT? I can open
>> them when using Geant4.
>>
>> Regards,
>>
>> OKUMURA, Akira oxon_at_juno.phys.s.u-tokyo.ac.jp
>> Department of Physics, The University of Tokyo
>> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
>> TEL/FAX +81 3-5841-4173/4059
>> Skype : okumura.akira
>>
Received on Mon Feb 08 2010 - 09:12:00 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 08 2010 - 11:50:01 CET