]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/geom_phos.C
Modified macros to be compilable by ACLiC
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_phos.C
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 #if !defined(__CINT__) || defined(__MAKECINT__)
10 #include <TGeoManager.h>
11 #include <TEveManager.h>
12 #include <TEveGeoNode.h>
13 #endif
14
15 void geom_phos()
16 {
17   gGeoManager = gEve->GetDefaultGeometry();
18
19   TEveElementList* list = new TEveElementList("PHOS");
20   gEve->AddGlobalElement(list);
21
22   for(Int_t i=1; i<=5; ++i) {
23     //PH The line below is replaced waiting for a fix in Root
24     //PH which permits to use variable siza arguments in CINT
25     //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
26     //PH TGeoNode* node = gGeoManager->GetTopVolume()->FindNode(Form("PHOS_%d", i));
27     char form[1000];
28     sprintf(form,"PHOS_%d", i);
29     TGeoNode* node = gGeoManager->GetTopVolume()->FindNode(form);
30
31     TEveGeoTopNode* re = new TEveGeoTopNode(gGeoManager, node);
32     re->UseNodeTrans();
33     gEve->AddGlobalElement(re, list);
34   }
35
36   gEve->Redraw3D();
37 }