]>
Commit | Line | Data |
---|---|---|
ef42d733 | 1 | /* ************************************************************************* |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
8e33b38c | 18 | Revision 1.3 2001/10/24 12:04:24 morsch |
19 | Expand divisions only on request. | |
20 | ||
e38b63f0 | 21 | Revision 1.2 2001/07/09 11:45:15 morsch |
22 | Reduced functionality: mediate between GUI and Geometry Conversion. | |
23 | ||
00fa5558 | 24 | Revision 1.1 2000/07/13 16:19:10 fca |
25 | Mainly coding conventions + some small bug fixes | |
26 | ||
ef42d733 | 27 | Revision 1.8 2000/07/12 08:56:32 fca |
28 | Coding convention correction and warning removal | |
29 | ||
30 | Revision 1.7 2000/06/28 21:27:45 morsch | |
31 | Most coding rule violations corrected. | |
32 | Still to do: Split the file (on file per class) ? Avoid the global variables. | |
33 | Copy constructors and assignment operators (dummy ?) | |
34 | ||
35 | Revision 1.6 2000/04/14 11:07:46 morsch | |
36 | Correct volume to medium assignment in case several media are asigned to the | |
37 | same material. | |
38 | ||
39 | Revision 1.5 2000/03/20 15:11:03 fca | |
40 | Mods to make the code compile on HP | |
41 | ||
42 | Revision 1.4 2000/01/18 16:12:08 morsch | |
43 | Bug in calculation of number of volume divisions and number of positionings corrected | |
44 | Browser for Material and Media properties added | |
45 | ||
46 | Revision 1.3 1999/11/14 14:31:14 fca | |
47 | Correct small error and remove compilation warnings on HP | |
48 | ||
49 | Revision 1.2 1999/11/10 16:53:35 fca | |
50 | The new geometry viewer from A.Morsch | |
51 | ||
52 | */ | |
53 | ||
54 | /* | |
55 | * Version: 0 | |
56 | * Written by Andreas Morsch | |
57 | * | |
58 | * | |
59 | * | |
60 | * For questions critics and suggestions to this part of the code | |
61 | * contact andreas.morsch@cern.ch | |
62 | * | |
63 | **************************************************************************/ | |
64 | ||
65 | ||
66 | #include "AliGeant3GeometryGUI.h" | |
00fa5558 | 67 | #include "AliG3Volume.h" |
68 | #include "AliG3Material.h" | |
69 | #include "AliG3Medium.h" | |
ef42d733 | 70 | #include "AliGuiGeomMain.h" |
00fa5558 | 71 | #include "AliG3toRoot.h" |
72 | ||
73 | #include <TArrayF.h> | |
74 | #include <TRotMatrix.h> | |
75 | #include <TGeometry.h> | |
76 | #include <TFile.h> | |
77 | #include <TFolder.h> | |
ef42d733 | 78 | |
00fa5558 | 79 | AliG3Volume *gCurrentVolume = new AliG3Volume("NULL"); |
80 | AliG3Material *gCurrentMaterial = new AliG3Material(); | |
81 | AliG3Medium *gCurrentMedium = new AliG3Medium(); | |
ef42d733 | 82 | |
83 | ClassImp(AliGeant3GeometryGUI) | |
84 | ||
e38b63f0 | 85 | AliGeant3GeometryGUI::AliGeant3GeometryGUI(const char* opt) |
ef42d733 | 86 | { |
e38b63f0 | 87 | char tmp[20]; |
88 | strcpy(tmp, opt); | |
89 | ||
ef42d733 | 90 | // Constructor |
00fa5558 | 91 | fPanel = new AliGuiGeomMain(gClient->GetRoot(), 500, 500); |
ef42d733 | 92 | // Store local copy of zebra bank entries |
00fa5558 | 93 | AliG3toRoot* geometry = new AliG3toRoot(); |
e38b63f0 | 94 | if (strcmp(tmp, "expand") == 0) geometry->SetExpandDivisions(); |
00fa5558 | 95 | geometry->G3toRoot(); |
8e33b38c | 96 | // geometry->ConvertToRootShapes(); |
ef42d733 | 97 | |
00fa5558 | 98 | AliG3Volume* top = (AliG3Volume*) |
99 | (geometry->GetTopFolder()->FindObject("ALIC")); | |
100 | gCurrentVolume = top; | |
101 | // | |
102 | // Mediate between g3 Geometry and GUI | |
103 | fPanel->SetMaterialComboEntries(geometry->GetMaterials()); | |
104 | fPanel->SetMediaComboEntries(geometry->GetMedia()); | |
105 | fPanel->AddFoldersRecursively(geometry->GetTopFolder()); | |
ef42d733 | 106 | fPanel->Update(); |
107 | } | |
108 | ||
00fa5558 | 109 | void AliGeant3GeometryGUI::Streamer(TBuffer &) |
ef42d733 | 110 | { |
00fa5558 | 111 | // Dummy Streamer |
112 | ; | |
ef42d733 | 113 | } |
114 | ||
ef42d733 | 115 | |
ef42d733 | 116 | |
ef42d733 | 117 | |
118 |