I followed the suggestions from one of the experts in the forum to develop a GUI by using REve. I’m finding it cumbersome to load a full ROOT geometry into it. When using the older TEve, I could simply do the following:
auto gEve = TEveManager::Create();
auto gGeo = gEve->GetGeometry(rootFile);
auto tn = new TEveGeoTopNode(gGeo, gGeo->GetTopNode());
tn->SetVisOption(1);
tn->SetVisLevel(5);
gEve->AddGlobalElement(tn);
However, it seems that there’s no REve version for the TEveGeoTopNode.
But with the above approach all volumes are set to origin, and I would need to perform the full geometry reconstruction that I did before when creating the geometry.
I’m sure that there’s a simple method to upload and visualize the geometry, with the hierarchical tree and others.
I see that the geom_cms.C makes usage of RGeomViewer . I’m trying to implement it, but I think my CMake cannot find that particular library. I tried adding mainly all libraries to CMake, but it still outputs errors when compiling.
I can also see that the Root7 libraries are not all shown when executing root-config --libs in the command. The output:
I’m actually trying to load my complete root geometry in REve. The last messages in this thread were due to a suggestion to check tutorials/eve7/geom_cms.C, that uses RGeomViewer only.
What I really need is to be able to upload my complete geometry from a root file in REve. I tried a similar approach as for TEve, that I had in my previous code:
auto gGeo = gEve->GetGeometry(projFile);
auto tn = new TEveGeoTopNode(gGeo, gGeo->GetTopNode());
tn->SetVisOption(1);
tn->SetVisLevel(20);
gEve->AddGlobalElement(tn);
I however cannot seem to make it work with REve. I searched for an equivalent of TEveGeoTopNode in REve, but couldn’t find it.
The only way I tried is explained in my original post. However, in that way I would need to reconstruct my geometry again.
I’m sure that there’s an easy way of doing it, but I’m stuck.
The turorials/eve7/geom_cms.C macro creates REveGeoShape objects from the TGeo geometry.
Your use case is based on REveGeoTopNode: one creates REveGeoTopNode from a TGeoNode object and sets the depth of rendering.
We (@linev, @matevz , and I) have implemented the initial version of REveGeoTopNode a year ago, but it is not in the root repository. I just started to review the code so it is ready for official root repository.
We have created a PR to move our development into main root repository:
When the PR is merged, there will be two test macros available. One is tutorials/eve7geoTopNode.C which covers the use case you have described. The second test macro is tutorials/eve7/eveGeoBrowser.C which is similar to the first one with the difference that it has Segey’s geo hierarchical browser integrated in REve.
Please follow the PR and let me know if the new functionality works for your case.