]>
Commit | Line | Data |
---|---|---|
1 | // $Id$ | |
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 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
11 | #include <TGeoManager.h> | |
12 | #include <TGeoNode.h> | |
13 | #include <TEveManager.h> | |
14 | #include <TEveGeoNode.h> | |
15 | #include <TEveElement.h> | |
16 | ||
17 | #include <AliEveEventManager.h> | |
18 | #endif | |
19 | ||
20 | void geom_fmd() | |
21 | { | |
22 | gGeoManager = AliEveEventManager::AssertGeometry(); | |
23 | ||
24 | TEveElementList* list = new TEveElementList("FMD"); | |
25 | gEve->AddGlobalElement(list); | |
26 | ||
27 | for(Int_t i=1; i<=3; ++i) | |
28 | { | |
29 | TGeoNode *node = 0; | |
30 | TEveGeoTopNode *re = 0; | |
31 | ||
32 | //PH The line below is replaced waiting for a fix in Root | |
33 | //PH which permits to use variable siza arguments in CINT | |
34 | //PH on some platforms (alphalinuxgcc, solariscc5, etc.) | |
35 | //PH node = gGeoManager->GetTopVolume()->FindNode(Form("F%dMT_%d", i, i)); | |
36 | char form[1000]; | |
37 | sprintf(form,"F%dMT_%d", i, i); | |
38 | node = gGeoManager->GetTopVolume()->FindNode(form); | |
39 | re = new TEveGeoTopNode(gGeoManager, node); | |
40 | re->UseNodeTrans(); | |
41 | gEve->AddGlobalElement(re, list); | |
42 | ||
43 | sprintf(form,"F%dMB_%d", i, i); | |
44 | node = gGeoManager->GetTopVolume()->FindNode(form); | |
45 | re = new TEveGeoTopNode(gGeoManager, node); | |
46 | re->UseNodeTrans(); | |
47 | gEve->AddGlobalElement(re, list); | |
48 | } | |
49 | ||
50 | gEve->Redraw3D(); | |
51 | } |