]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/test-macros/geom_extr_trd.C
Coverity
[u/mrichter/AliRoot.git] / EVE / test-macros / geom_extr_trd.C
1 // $Id: geom_trd_tof.C 23442 2008-01-21 16:02:24Z mtadel $
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 void geom_extr_trd()
11 {
12   // Extract reasonably top-level mother-volumes of TRD and
13   // store them as geo-shape-extract.
14
15   gGeoManager = gEve->GetGeometry("$ALICE_ROOT/EVE/alice-data/alice_fullgeo.root");
16
17   TGeoNode* tnode = gGeoManager->GetTopVolume()->FindNode("B077_1");
18
19   TEveGeoTopNode* eve_tnode = new TEveGeoTopNode(gGeoManager, tnode);
20
21
22   for (Int_t i = 0; i < 18; ++i)
23   {
24     TGeoNode    * node1 = tnode->GetVolume()->FindNode(Form("BSEGMO%d_1", i));
25     printf("%2d - node1 = %p\n", i, node1);
26     TEveGeoNode * eve_node1 = new TEveGeoNode(node1);
27     eve_tnode->AddElement(eve_node1);
28
29     TGeoNode    * node2 = node1->GetVolume()->FindNode(Form("BTRD%d_1", i));
30     printf("%2d - node2 = %p\n", i, node2);
31     TEveGeoNode * eve_node2 = new TEveGeoNode(node2);
32     eve_node1->AddElement(eve_node2);
33   }
34
35   eve_tnode->Save("gentle_geo_trd.root", "Gentle TRD");
36
37 }