Message: Re: Import Logical Volume from GDML File fails for many Files Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Import Logical Volume from GDML File fails for many Files 

Forum: Geometry
Re: Question Import Logical Volume from GDML File fails for many Files (JanW)
Re: None Re: Import Logical Volume from GDML File fails for many Files (Witek Pokorski)
Re: Idea Re: Import Logical Volume from GDML File fails for many Files (JanW)
Date: 29 Aug, 2016
From: Witek Pokorski <Witek Pokorski>

Hi Jan,

I have looked into it again and I am very surprised it does not work for you. In fact, I run a test and I can properly read two files with two parsers.

I modified the example G01 (load_gdml.cc) and put there:

   G4GDMLParser parser1;
   G4GDMLParser parser2;

   parser1.Read("file1.gdml");
   parser2.Read("file2.gdml");

   std::cout << "1 " << parser1.GetWorldVolume()->GetName() << std::endl;
   std::cout << "2 " << parser2.GetWorldVolume()->GetName() << std::endl;

When I print the names of the top volumes, I correctly get the ones corresponding to the given file (they shouldn't be all called "World" of course... )

I have also looked in the code and in the method G4GDMLRead::Read you can see that you do

   xercesc::XercesDOMParser* parser = new xercesc::XercesDOMParser;

so you have a new Xercesc parser for every instance of the G4GDMLParser and therefore reading two files with two different parser should work without a problem (and does work for me).

Cheers, Witek

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Import Logical Volume from GDML File fails for many Files   (JanW - 29 Aug, 2016)
 Add Message Add Message
to: "Re: Import Logical Volume from GDML File fails for many Files"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]