I can run tutorials/eve/assembly.C and select a single plate, say, “PLATE_1” through Scenes -> Geometry scene -> TCP_1 -> Row_6 -> CELL_6 -> TOOTPLATE_1 -> PLATE_1, and then I can change the color of “PLATE_1” in the bottom-left panel.
Is it possible to write a line of codes in CINT to do the samething?
You have to get a pointer to the TEveElement (or whatever class) into cint.
One option is to right-click on an object, select “Export to CINT” from menu and then type variable name, say “xx”. Then you can do:
xx->SetMainColor(kBlue)
Another way is to follow the hierarchy of elements:
TEveElement* xx = gEve->GetGlobalScene()->FindChild(“TCP_1”)->FindChild(“Row_6”) …
I could in principle add a function FindChildByPath() where one could write:
gEve->GetGlobalScene()->FindChildByPath(“TCP_1/Row_6/…”)
I’m trying to do something similar in an Eve application I’m making in compiled code. I’d like to descend through my geometry tree, which I create using TGeoManager, then import into Eve using:
TEveGeoTopNode *enode = new TEveGeoTopNode(gGeoManager,gGeoManager->GetTopNode());
gEve->AddGlobalElement(enode)
Great, my geometry is now in Eve’s list tree and drawn in its GLviewer. I can browse through my node hierarchy in the list tree. The top node happens to be named TOP_1. I can do: