Geometry extract

If I try to export the extract from the geometry, I only get the top volume exported. I would like to have the whole tree in the extract. What I am doing wrong?

void save_extract(TString file)
{
   TEveManager::Create();
   gGeoManager = gEve->GetGeometry(file);
   auto node   = gGeoManager->GetTopNode();
   if (!node) return ;
   auto evenode = new TEveGeoTopNode(gGeoManager, node);
   evenode->ExpandIntoListTrees();
   gEve->AddGlobalElement(evenode);
   gEve->Redraw3D(kTRUE);
   evenode->SaveExtract("test_extract.root", "Extract", false);
}

root ‘save_extract.C(“https://root.cern/files/alice2.root”)’
save_extract.C (442 Bytes)

Cheers, Rok


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


@agheata if you will have time can you take a look, please? Thank you in advance!

I think @matevz who is the main author of TEve can help here.

Hey Rok!

I think you need ExpandIntoListTreesRecursively() otherwise it will only load top-levels as Eve objects.
https://root.cern/doc/v612/classTEveGeoNode.html#ac3fb5e4164d598e037476d91298b71b9

You are getting me worried with the ALICE geometry there, this will probably get huge. There are ways of extracting geo shapes and matrices for specific geo paths on the fly, out of TGeo geometry – there was a post here about that here, let me dig it up (see the test2.C macro there):

Cheers,
Matevz

Hi,
Thank you for this info. It might be worth to put the example in the tutorial/examples.
I just put the Alice detector as an example. Yes, you are right, the produced files are huge.

Cheers, Rok

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.