00001 // @(#)root/eve:$Id: geom_alias.C 27557 2009-02-20 18:22:42Z matevz $ 00002 // Author: Matevz Tadel 00003 00004 // Demonstates usage of geometry aliases - merge ALICE ITS with ATLAS MUON. 00005 00006 void geom_alias() 00007 { 00008 TEveManager::Create(); 00009 00010 gEve->RegisterGeometryAlias("ALICE", "http://root.cern.ch/files/alice.root"); 00011 gEve->RegisterGeometryAlias("ATLAS", "http://root.cern.ch/files/atlas.root"); 00012 00013 00014 gGeoManager = gEve->GetGeometryByAlias("ALICE"); 00015 00016 TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1"); 00017 TEveGeoTopNode* its = new TEveGeoTopNode(gGeoManager, node1); 00018 gEve->AddGlobalElement(its); 00019 00020 00021 gGeoManager = gEve->GetGeometryByAlias("ATLAS"); 00022 00023 TGeoNode* node2 = gGeoManager->GetTopVolume()->FindNode("OUTE_1"); 00024 TEveGeoTopNode* atlas = new TEveGeoTopNode(gGeoManager, node2); 00025 gEve->AddGlobalElement(atlas); 00026 00027 00028 gEve->FullRedraw3D(kTRUE); 00029 00030 // EClipType not exported to CINT (see TGLUtil.h): 00031 // 0 - no clip, 1 - clip plane, 2 - clip box 00032 TGLViewer *v = gEve->GetDefaultGLViewer(); 00033 v->GetClipSet()->SetClipType(2); 00034 v->RefreshPadEditor(v); 00035 00036 v->CurrentCamera().RotateRad(-0.5, -2.4); 00037 v->DoDraw(); 00038 }