GDML to ROOT conversion

Hi All

I have a GDML file (let’s call it test.gdml) which I want to convert to ROOT i.e. test.root.
I use

TFile* f = new TFile("test.root","recreate");




This gives me test.root which looked OK when viewed with gGeoManager->GetTopVolume()->Draw("ogl");

But the size of test.root is 419 bytes compared to 25 MB of test.gdml.

So, I wonder if the conversion, here, was only limited to visualisation or a full conversion. I need to generate events in the test.root geometry (which needs .root file and not .gdml), so will the test.root created this way work?

Thank You


After this operation you can do gGeoManager->Export("test.root");. You do not need to create TFile instance for that.


Oh ok. I tried and it worked I think. I see different directories in the test.root file now which contains Materials and other details of the geometry. Thank You very much.