Logo ROOT  
Reference Guide
TGeoVolumeEditor.cxx
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TGeoVolumeEditor
13\ingroup Geometry_builder
14
15Editor for geometry volumes and assemblies of volumes. Besides the volume
16name and line attributes, a TGeoVolume has the following editable categories
17split vertically by a shutter:
18
19 - Properties: one can edit the shape and medium components from here. It is
20 also possible to change the existing ones.
21 - Daughters: the main category allowing defining, editing, removing or
22 positioning daughter volumes inside the current edited volume. To add a
23 daughter, one needs to select first a volume and a matrix. Currently no check
24 is performed if the daughter volume creates an extrusion (illegal for tracking).
25 To remove or change the position of an existing daughter, one should simply
26 select the desired daughter from the combo box with the existing ones, then
27 simply click the appropriate button.
28 - Visualization: One can set the visibility of the volume and of its daughters,
29 set the visibility depth and the view type. Selecting "All" will draw the
30 volume and all visible daughters down to the selected level starting from the
31 edited volume. Selecting "Leaves" will draw just the deepest daughters within
32 the selected visibility level, without displaying the containers, while "Only"
33 will just draw the edited volume.
34 - Division: The category becomes active only if there are no daughters of the
35 edited volume added by normal positioning (e.g. from <Daughters> category). The
36 minimum allowed starting value for the selected division axis is automatically
37 selected, while the slicing step is set to 0 - meaning that only the number
38 of slices matter.
39*/
40
41#include "TGeoVolumeEditor.h"
42#include "TGeoVolume.h"
43#include "TGeoPatternFinder.h"
44#include "TGeoManager.h"
45#include "TGeoMatrix.h"
46#include "TVirtualPad.h"
47#include "TGTab.h"
48#include "TGComboBox.h"
49#include "TGButton.h"
50#include "TGButtonGroup.h"
51#include "TGTextEntry.h"
52#include "TGNumberEntry.h"
53#include "TGLabel.h"
54#include "TGShutter.h"
55#include "TG3DLine.h"
56#include "TGeoTabManager.h"
57#include "TGedEditor.h"
58
60
67};
68
69////////////////////////////////////////////////////////////////////////////////
70/// Constructor for volume editor.
71
73 Int_t height, UInt_t options, Pixel_t back)
74 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
75{
76 fGeometry = 0;
77 fVolume = 0;
78
82
83 // TGShutter for categories
85 TGCompositeFrame *container, *f1;
86 Pixel_t color;
87 TGLabel *label;
88
89 // General settings
91 container = (TGCompositeFrame*)si->GetContainer();
94
95 // TextEntry for volume name
96 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
97 f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
98 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
99 gClient->GetColorByName("#ff0000", color);
100 label->SetTextColor(color);
101 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
102 fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
104 fVolumeName->SetToolTipText("Enter the volume name");
105 container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
106
107 // Current shape
108 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
109 f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
110 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
111 gClient->GetColorByName("#ff0000", color);
112 label->SetTextColor(color);
113 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
114 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
115 fSelectedShape = 0;
116 fLSelShape = new TGLabel(f1, "Select shape");
117 gClient->GetColorByName("#0000ff", color);
118 fLSelShape->SetTextColor(color);
120 f1->AddFrame(fLSelShape, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
122 fBSelShape->SetToolTipText("Replace with one of the existing shapes");
123 fBSelShape->Associate(this);
124 f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
125 fEditShape = new TGTextButton(f1, "Edit");
126 f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
127 fEditShape->SetToolTipText("Edit selected shape");
128 fEditShape->Associate(this);
129 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
130
131 // Current medium
132 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
133 fSelectedMedium = 0;
134 fLSelMedium = new TGLabel(f1, "Select medium");
135 gClient->GetColorByName("#0000ff", color);
138 f1->AddFrame(fLSelMedium, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
140 fBSelMedium->SetToolTipText("Replace with one of the existing media");
141 fBSelMedium->Associate(this);
142 f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
143 fEditMedium = new TGTextButton(f1, "Edit");
144 f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
145 fEditMedium->SetToolTipText("Edit selected medium");
146 fEditMedium->Associate(this);
147 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
148
149 // List of daughters
150 si = new TGShutterItem(fCategories, new TGHotString("Daughters"),kCAT_DAUGHTERS);
151 container = (TGCompositeFrame*)si->GetContainer();
153 fCategories->AddItem(si);
154
155 // Existing daughters
156 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
157 f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
158 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
159 gClient->GetColorByName("#ff0000", color);
160 label->SetTextColor(color);
161 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
162
163 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
166 fNodeList->Associate(this);
167 f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
168 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
169 // Buttons for editing matrix and removing node
170 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
171 fEditMatrix = new TGTextButton(f1, "Position");
172 f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
173 fEditMatrix->SetToolTipText("Edit the position of selected node");
174 fEditMatrix->Associate(this);
175 fRemoveNode = new TGTextButton(f1, "Remove");
176 f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
177 fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
178 fRemoveNode->Associate(this);
179 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
180
181 // Adding daughters
182 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
183 f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
184 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
185 gClient->GetColorByName("#ff0000", color);
186 label->SetTextColor(color);
187 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
188
189 // Select from existing volumes
190 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
191 fSelectedVolume = 0;
192 fLSelVolume = new TGLabel(f1, "Select volume");
193 gClient->GetColorByName("#0000ff", color);
196 f1->AddFrame(fLSelVolume, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
198 fBSelVolume->SetToolTipText("Select one of the existing volumes");
199 fBSelVolume->Associate(this);
200 f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
201 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
202
203 // Matrix selection for nodes
204 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
205 fSelectedMatrix = 0;
206 fLSelMatrix = new TGLabel(f1, "Select matrix");
207 gClient->GetColorByName("#0000ff", color);
210 f1->AddFrame(fLSelMatrix, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
212 fBSelMatrix->SetToolTipText("Select one of the existing matrices");
213 fBSelMatrix->Associate(this);
214 f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
215 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
216
217 // Copy number
218 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
219 f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
225 nef->SetToolTipText("Enter node copy number");
226 fCopyNumber->Associate(this);
227 f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
228 fAddNode = new TGTextButton(f1, "Add");
229 f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
230 fAddNode->Associate(this);
231 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
232
233 // Visualization
234 si = new TGShutterItem(fCategories, new TGHotString("Visualization"),kCAT_VIS);
235 container = (TGCompositeFrame*)si->GetContainer();
237 fCategories->AddItem(si);
238
239 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
240 f1->AddFrame(label = new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
241 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
242// gClient->GetColorByName("#ff0000", color);
243// label->SetTextColor(color);
244 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
245
247 fBVis[0] = new TGCheckButton(f1, "Volume");
248 fBVis[1] = new TGCheckButton(f1, "Nodes");
249 f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
250 f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
251 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
252
253 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
254 f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
255// gClient->GetColorByName("#0000ff", color);
256// label->SetTextColor(color);
262 nef->SetToolTipText("Set visibility level here");
264 fEVisLevel->Associate(this);
265 f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
266 fBAuto = new TGCheckButton(f1,"Auto");
267 f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
268 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
269
270 TString stitle = "View";
271 TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
272 fBView[0] = new TGRadioButton(bg, "All");
273 fBView[1] = new TGRadioButton(bg, "Leaves");
274 fBView[2] = new TGRadioButton(bg, "Only");
276 bg->Show();
277 container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
278
280 fBRaytrace = new TGCheckButton(f1,"Raytrace");
281 f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
282 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
283
284 // Division
285 si = new TGShutterItem(fCategories, new TGHotString("Division"),kCAT_DIVISION);
286 container = (TGCompositeFrame*)si->GetContainer();
288 fCategories->AddItem(si);
289 // TextEntry for division name
290 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
291 f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
292 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
293 gClient->GetColorByName("#ff0000", color);
294 label->SetTextColor(color);
295 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
296 fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
298 fDivName->SetToolTipText("Enter the volume name");
299 container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
300 // Axis selection
301 stitle = "Axis";
302 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
303 bg = new TGVButtonGroup(f1, stitle);
304 fBDiv[0] = new TGRadioButton(bg, "Axis 1");
305 fBDiv[1] = new TGRadioButton(bg, "Axis 2");
306 fBDiv[2] = new TGRadioButton(bg, "Axis 3");
307 bg->Insert(fBDiv[0]);
308 bg->Insert(fBDiv[1]);
309 bg->Insert(fBDiv[2]);
311 f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
312 fApplyDiv = new TGTextButton(f1, "Apply");
313 fApplyDiv->SetToolTipText("Apply new division settings");
314 f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
315 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
316 // Division range
317 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
318 f1->AddFrame(label = new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
319 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
320// gClient->GetColorByName("#ff0000", color);
321// label->SetTextColor(color);
322 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
323 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
324 f1->AddFrame(label = new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
325// gClient->GetColorByName("#0000ff", color);
326// label->SetTextColor(color);
328// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
329// fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
332 nef->SetToolTipText("Set start value");
333 fEDivFrom->Associate(this);
334 f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
335 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
336
337 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
338 f1->AddFrame(label = new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
339// gClient->GetColorByName("#0000ff", color);
340// label->SetTextColor(color);
342// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
346 nef->SetToolTipText("Set division step");
347 fEDivStep->Associate(this);
348 f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
349 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
350
351 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame |kFixedWidth);
352 f1->AddFrame(label = new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
353// gClient->GetColorByName("#0000ff", color);
354// label->SetTextColor(color);
355 fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
360 nef->SetToolTipText("Set number of slices");
361 fEDivN->Associate(this);
362 f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
363 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
364
365
366 fCategories->Resize(163,340);
368
371}
372
373////////////////////////////////////////////////////////////////////////////////
374/// Destructor
375
377{
378 TGCompositeFrame *cont;
379 cont = (TGCompositeFrame*)fCategories->GetItem("Properties")->GetContainer();
381 fCategories->GetItem("Properties")->SetCleanup(0);
382 cont = (TGCompositeFrame*)fCategories->GetItem("Daughters")->GetContainer();
384 fCategories->GetItem("Daughters")->SetCleanup(0);
385 cont = (TGCompositeFrame*)fCategories->GetItem("Visualization")->GetContainer();
387 fCategories->GetItem("Visualization")->SetCleanup(0);
388 cont = (TGCompositeFrame*)fCategories->GetItem("Division")->GetContainer();
390 fCategories->GetItem("Division")->SetCleanup(0);
391
392 delete fBView[0]; delete fBView[1]; delete fBView[2];
393 delete fBDiv [0]; delete fBDiv [1]; delete fBDiv [2];
394 Cleanup();
395}
396
397////////////////////////////////////////////////////////////////////////////////
398/// Connect signals to slots.
399
401{
402 fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
403 fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
404 fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
405 fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
406 fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
407 fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
408 fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
409 fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
410 fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
411 fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
412 fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
413 fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
414 fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
415 fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
416 fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
417 fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
418 fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
419 fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
420 fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
421 fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
422 fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
423 fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
424 fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
425 fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
426 fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
427 fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
428}
429
430////////////////////////////////////////////////////////////////////////////////
431/// Connect to the picked volume.
432
434{
435 if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
437 return;
438 }
439 fVolume = (TGeoVolume*)obj;
441 const char *vname = fVolume->GetName();
442 fVolumeName->SetText(vname);
447
449 TIter next2(fVolume->GetNodes());
450 TGeoNode *node;
451 Int_t icrt = 0;
452 while ((node=(TGeoNode*)next2()))
453 fNodeList->AddEntry(node->GetName(), icrt++);
454 fNodeList->Select(0);
456 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
459 } else {
462 }
464 if (fVolume->IsAssembly()) {
467 }
479 } else {
480 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
481 Double_t start=0., step=0., end = 0.;
482 Int_t ndiv = 2, iaxis = 1;
483 TString axis_name;
484 for (Int_t i=0; i<3; i++) {
485 axis_name = fVolume->GetShape()->GetAxisName(i+1);
486 fBDiv[i]->SetText(axis_name);
487 }
488
489 if (fVolume->GetFinder()) {
491 iaxis = fVolume->GetFinder()->GetDivAxis();
492 start = fVolume->GetFinder()->GetStart();
493 step = fVolume->GetFinder()->GetStep();
494 ndiv = fVolume->GetFinder()->GetNdiv();
495 } else {
496 fDivName->SetText("Enter name");
497 fSelectedShape->GetAxisRange(iaxis,start,end);
498 step = 0;
499 }
500 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
501 fEDivFrom->SetNumber(start);
502 fEDivStep->SetNumber(step);
503 fEDivN->SetNumber(ndiv);
504 }
505
507 SetActive();
509}
510
511////////////////////////////////////////////////////////////////////////////////
512/// Add editors to fGedFrame and exclude TLineEditor.
513
515{
518}
519
520////////////////////////////////////////////////////////////////////////////////
521/// Modify volume name.
522
524{
526}
527
528////////////////////////////////////////////////////////////////////////////////
529/// Select a new shape.
530
532{
533 TGeoShape *shape = fSelectedShape;
534 new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
537 else fSelectedShape = shape;
538}
539
540////////////////////////////////////////////////////////////////////////////////
541/// Select a new medium.
542
544{
546 new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
549 else fSelectedMedium = med;
550}
551
552////////////////////////////////////////////////////////////////////////////////
553/// Select a matrix for positioning.
554
556{
557 TGeoMatrix *matrix = fSelectedMatrix;
558 new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
561 else fSelectedMatrix = matrix;
562}
563
564////////////////////////////////////////////////////////////////////////////////
565/// Select a daughter volume.
566
568{
570 new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
573 else fSelectedVolume = vol;
574 if (fSelectedVolume)
576}
577
578
579////////////////////////////////////////////////////////////////////////////////
580/// Edit the shape of the volume.
581
583{
585}
586
587////////////////////////////////////////////////////////////////////////////////
588/// Edit the medium of the volume.
589
591{
593}
594
595////////////////////////////////////////////////////////////////////////////////
596/// Edit the position of the selected node.
597
599{
600 if (!fVolume->GetNdaughters()) return;
602 if (i<0) return;
604}
605
606////////////////////////////////////////////////////////////////////////////////
607/// Add a daughter.
608
610{
611 if (!fSelectedVolume || fVolume->GetFinder()) return;
612 Int_t icopy = fCopyNumber->GetIntNumber();
615 fNodeList->AddEntry(fVolume->GetNode(nd-1)->GetName(), nd-1);
616 fNodeList->Select(nd-1);
617 fCopyNumber->SetNumber(nd+1);
623 Update();
624}
625
626////////////////////////////////////////////////////////////////////////////////
627/// Remove a daughter.
628
630{
631 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
634 return;
635 }
637 if (i<0) return;
640 TIter next(fVolume->GetNodes());
641 TGeoNode *node;
642 i = 0;
643 while ((node=(TGeoNode*)next()))
644 fNodeList->AddEntry(node->GetName(), i++);
645 fNodeList->Select(0);
647 if (!fVolume->GetNdaughters()) {
650 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
651 Double_t start=0., step=0., end=0.;
652 Int_t ndiv = 2, iaxis = 1;
653 fSelectedShape->GetAxisRange(iaxis,start,end);
654 step = end-start;
655 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
656 fEDivFrom->SetNumber(start);
657 fEDivStep->SetNumber(step);
658 fEDivN->SetNumber(ndiv);
659 }
660 Update();
661}
662
663////////////////////////////////////////////////////////////////////////////////
664/// Slot for setting volume visible/invisible.
665
667{
669 if (fVolume->IsVisible() == on) return;
671 Update();
672}
673
674////////////////////////////////////////////////////////////////////////////////
675/// Slot for setting daughters visible/invisible.
676
678{
680 if (fVolume->IsVisibleDaughters() == on) return;
682 Update();
683}
684
685////////////////////////////////////////////////////////////////////////////////
686/// Slot for setting visibility depth auto.
687
689{
691 if ((fGeometry->GetVisLevel()==0) == on) return;
692 if (on) fGeometry->SetVisLevel(0);
694 Update();
695}
696
697////////////////////////////////////////////////////////////////////////////////
698/// Slot for visibility level.
699
701{
704 Update();
705}
706
707////////////////////////////////////////////////////////////////////////////////
708/// Slot for viewing volume and containers.
709
711{
713 if (!on) return;
714 if (fVolume->IsVisContainers() == on) return;
715 if (fVolume->IsRaytracing()) {
718 }
720 Update();
721}
722
723////////////////////////////////////////////////////////////////////////////////
724/// Slot for viewing last leaves only.
725
727{
729 if (!on) return;
730 if (fVolume->IsVisLeaves() == on) return;
731 if (fVolume->IsRaytracing()) {
734 }
736 Update();
737}
738
739////////////////////////////////////////////////////////////////////////////////
740/// Slot for viewing volume only.
741
743{
745 if (!on) return;
746 if (fVolume->IsVisOnly() == on) return;
747 if (fVolume->IsRaytracing()) {
750 }
751 fVolume->SetVisOnly(on);
752 Update();
753}
754
755////////////////////////////////////////////////////////////////////////////////
756/// Slot for raytracing.
757
759{
761 if (fVolume->IsRaytracing() == on) return;
762 fVolume->Raytrace(on);
763 Update();
764}
765
766////////////////////////////////////////////////////////////////////////////////
767/// Modify division name.
768
770{
772}
773
774////////////////////////////////////////////////////////////////////////////////
775/// Change division axis and preserve number of slices.
776
778{
779 Int_t iaxis = 1;
780 for (Int_t i=0; i<3; i++) {
781 if (fBDiv[i]->GetState()!=kButtonDown) continue;
782 iaxis = i+1;
783 break;
784 }
785 TGeoShape *shape = fVolume->GetShape();
786 if (!shape) {
788 return;
789 }
790 Double_t xlo, xhi;
791 shape->GetAxisRange(iaxis, xlo, xhi);
792 if (xhi <= xlo) {
794 return;
795 }
796 fEDivFrom->SetNumber(xlo);
799}
800
801////////////////////////////////////////////////////////////////////////////////
802/// Handle division range modification.
803
805{
806 Double_t min, max, xlo, xhi, step;
807 Int_t iaxis = 1;
808 Int_t ndiv;
809 for (Int_t i=0; i<3; i++) {
810 if (fBDiv[i]->GetState()!=kButtonDown) continue;
811 iaxis = i+1;
812 break;
813 }
814 TGeoShape *shape = fVolume->GetShape();
815 if (!shape) {
817 return;
818 }
819 shape->GetAxisRange(iaxis, xlo, xhi);
820 if (xhi-xlo <= 0) {
822 return;
823 }
824 min = fEDivFrom->GetNumber();
825 step = fEDivStep->GetNumber();
826 ndiv = fEDivN->GetIntNumber();
827 if (min<xlo) {
828 min = xlo;
829 fEDivFrom->SetNumber(xlo);
830 }
831 max = min + ndiv*step;
832 if (max>xhi) {
833 max = xhi;
834 step = (max-min)/ndiv;
835 fEDivStep->SetNumber(step);
836 }
837 if (min>=max) {
839 return;
840 }
842}
843
844////////////////////////////////////////////////////////////////////////////////
845/// Handle division step modification.
846
848{
849 Double_t min, max, xlo, xhi;
850 Int_t iaxis = 1;
851 for (Int_t i=0; i<3; i++) {
852 if (fBDiv[i]->GetState()!=kButtonDown) continue;
853 iaxis = i+1;
854 break;
855 }
856 TGeoShape *shape = fVolume->GetShape();
857 if (!shape) {
859 return;
860 }
861 shape->GetAxisRange(iaxis, xlo, xhi);
862 if (xhi-xlo <= 0) {
864 return;
865 }
866 min = fEDivFrom->GetNumber();
867 Double_t step = fEDivStep->GetNumber();
868 Int_t ndiv = fEDivN->GetIntNumber();
869 max = min + ndiv*step;
870
871 // Check if ndiv*step < max-min
872 if (max <= xhi) {
874 return;
875 }
876 // Step too big - set value to fit range
877 max = xhi;
878 step = (max-min)/ndiv;
879 fEDivStep->SetNumber(step);
880 if (step < 0) {
882 return;
883 }
885}
886
887////////////////////////////////////////////////////////////////////////////////
888/// Handle division N modification.
889
891{
892 Double_t min, max, xlo, xhi;
893 Int_t iaxis = 1;
894 for (Int_t i=0; i<3; i++) {
895 if (fBDiv[i]->GetState()!=kButtonDown) continue;
896 iaxis = i+1;
897 break;
898 }
899 TGeoShape *shape = fVolume->GetShape();
900 if (!shape) {
902 return;
903 }
904 shape->GetAxisRange(iaxis, xlo, xhi);
905 if (xhi-xlo <= 0) {
907 return;
908 }
909 Double_t step = fEDivStep->GetNumber();
910 // If step=0 it is discounted
911 if (step==0) {
913 return;
914 }
915 Int_t ndiv = fEDivN->GetIntNumber();
916 min = fEDivFrom->GetNumber();
917 max = min + ndiv*step;
918 // Check if ndiv*step < max-min
919 if (max <= xhi) {
921 return;
922 }
923 max = xhi;
924 ndiv = (Int_t)((max-min)/step);
925 fEDivN->SetNumber(ndiv);
927}
928
929////////////////////////////////////////////////////////////////////////////////
930/// Apply current division settings
931
933{
934 Double_t xlo, xhi, step;
935 Int_t iaxis = 1;
936 Int_t ndiv;
937 for (Int_t i=0; i<3; i++) {
938 if (fBDiv[i]->GetState()!=kButtonDown) continue;
939 iaxis = i+1;
940 break;
941 }
942 TGeoShape *shape = fVolume->GetShape();
943 if (!shape) {
945 return;
946 }
947 shape->GetAxisRange(iaxis, xlo, xhi);
948 if (xhi-xlo <= 0) {
950 return;
951 }
952 xlo = fEDivFrom->GetNumber();
953 step = fEDivStep->GetNumber();
954 ndiv = fEDivN->GetIntNumber();
956 if (finder) {
957 // we have to remove first the existing division
958 TObjArray *nodes = fVolume->GetNodes();
959 nodes->Delete();
960 nodes->Clear();
961 delete finder;
962 fVolume->SetFinder(0);
963 }
964 fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
967 Update();
968// fVolume->Draw();
969}
void Class()
Definition: Class.C:29
ULong_t Pixel_t
Definition: GuiTypes.h:39
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:365
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kButtonDown
Definition: TGButton.h:54
@ kButtonUp
Definition: TGButton.h:53
#define gClient
Definition: TGClient.h:166
@ kRaisedFrame
Definition: TGFrame.h:62
@ kSunkenFrame
Definition: TGFrame.h:61
@ kVerticalFrame
Definition: TGFrame.h:59
@ kDoubleBorder
Definition: TGFrame.h:63
@ kFixedWidth
Definition: TGFrame.h:65
@ kHorizontalFrame
Definition: TGFrame.h:60
@ kLHintsRight
Definition: TGLayout.h:33
@ kLHintsExpandY
Definition: TGLayout.h:38
@ kLHintsLeft
Definition: TGLayout.h:31
@ kLHintsTop
Definition: TGLayout.h:34
@ kLHintsExpandX
Definition: TGLayout.h:37
ETGeoVolumeWid
@ kVOL_NODEID
@ kVOL_DIVSTEP
@ kCAT_VIS
@ kVOL_DIVEND
@ kVOL_EDIT_SHAPE
@ kVOL_EDIT_MEDIUM
@ kVOL_MATRIX_SELECT
@ kVOL_NAME
@ kVOL_NODE_SELECT
@ kVOL_UNDO
@ kVOL_SHAPE_SELECT
@ kVOL_VISLEVEL
@ kCAT_DIVISION
@ kVOL_APPLY
@ kVOL_DIVSTART
@ kVOL_MEDIA_SELECT
@ kCAT_GENERAL
@ kVOL_CANCEL
@ kCAT_DAUGHTERS
@ kDIV_NAME
@ kVOL_DIVN
@ kVOL_VOL_SELECT
@ kVOL_TITLE
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
virtual void SetRadioButtonExclusive(Bool_t flag=kTRUE)
If enable is kTRUE, this button group will treat radio buttons as mutually exclusive,...
virtual void Show()
Show group of buttons.
virtual Int_t Insert(TGButton *button, int id=-1)
Inserts a button with the identifier id into the button group.
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
virtual EButtonState GetState() const
Definition: TGButton.h:112
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:409
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:289
virtual Int_t GetSelected() const
Definition: TGComboBox.h:134
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition: TGComboBox.h:125
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Definition: TGComboBox.cxx:450
virtual Int_t GetNumberOfEntries() const
Definition: TGComboBox.h:127
TGCompositeFrame(const TGCompositeFrame &)
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:371
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1054
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:303
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:294
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Definition: TGLabel.cxx:359
virtual void SetText(TGString *newText)
Set new text in label.
Definition: TGLabel.cxx:177
virtual void SetNumber(Double_t val)
UInt_t GetDefaultHeight() const
TGNumberEntryField * GetNumberEntry() const
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
virtual Long_t GetIntNumber() const
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual Double_t GetNumber() const
void SetNumStyle(EStyle style)
TGClient * fClient
Definition: TGObject.h:37
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set radio button state.
Definition: TGButton.cxx:1563
TGButton * GetButton() const
Definition: TGShutter.h:58
TGFrame * GetContainer() const
Definition: TGShutter.h:59
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition: TGShutter.cxx:71
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
Definition: TGShutter.cxx:300
virtual void Layout()
Layout shutter items.
Definition: TGShutter.cxx:216
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
Definition: TGShutter.cxx:330
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition: TGButton.cxx:594
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * GetText() const
Definition: TGTextEntry.h:134
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
const TGWindow * GetParent() const
Definition: TGWindow.h:85
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
Definition: TGedEditor.cxx:578
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:168
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
Bool_t fInit
Definition: TGedFrame.h:53
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
TGTab * fTab
Definition: TGeoGedFrame.h:16
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGeoTabManager * fTabMgr
Definition: TGeoGedFrame.h:17
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
Geometrical transformation package.
Definition: TGeoMatrix.h:41
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:24
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:41
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:97
virtual TGeoMatrix * GetMatrix() const =0
Base finder class for patterns.
virtual Int_t GetDivAxis()
Int_t GetNdiv() const
Double_t GetStep() const
Double_t GetStart() const
Base abstract class for all shapes.
Definition: TGeoShape.h:26
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
virtual const char * GetAxisName(Int_t iaxis) const =0
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:248
TGCompositeFrame * GetVolumeTab() const
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
static TObject * GetSelected()
static; return selected object
Editor for geometry volumes and assemblies of volumes.
TGPictureButton * fBSelMatrix
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGTextButton * fApplyDiv
void DoApplyDiv()
Apply current division settings.
TGTextButton * fAddNode
virtual ~TGeoVolumeEditor()
Destructor.
TGPictureButton * fBSelShape
void DoRemoveNode()
Remove a daughter.
TGeoVolumeEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
TGTextEntry * fVolumeName
TGNumberEntry * fEDivFrom
void DoSelectMatrix()
Select a matrix for positioning.
void DoEditMatrix()
Edit the position of the selected node.
void DoSelectMedium()
Select a new medium.
TGComboBox * fNodeList
void DoVisDaughters()
Slot for setting daughters visible/invisible.
TGNumberEntry * fEVisLevel
TGTextButton * fEditMatrix
TGNumberEntry * fEDivN
virtual void SetModel(TObject *obj)
Connect to the picked volume.
TGeoVolume * fVolume
TGTextButton * fEditShape
TGeoMedium * fSelectedMedium
TGeoVolume * fSelectedVolume
TGRadioButton * fBView[3]
void DoVisVolume()
Slot for setting volume visible/invisible.
TGeoShape * fSelectedShape
void DoDivFromTo()
Handle division range modification.
void DoVisAuto()
Slot for setting visibility depth auto.
void DoViewLeaves()
Slot for viewing last leaves only.
void DoViewOnly()
Slot for viewing volume only.
TGCheckButton * fBVis[2]
TGNumberEntry * fEDivStep
TGTextButton * fRemoveNode
void DoDivStep()
Handle division step modification.
void DoVisLevel()
Slot for visibility level.
TGeoMatrix * fSelectedMatrix
void DoRaytrace()
Slot for raytracing.
void DoSelectVolume()
Select a daughter volume.
void DoEditShape()
Edit the shape of the volume.
TGTextEntry * fDivName
TGCheckButton * fBRaytrace
TGNumberEntry * fCopyNumber
TGPictureButton * fBSelVolume
TGCheckButton * fBAuto
TGeoManager * fGeometry
void DoEditMedium()
Edit the medium of the volume.
TGTextButton * fEditMedium
TGPictureButton * fBSelMedium
void DoDivN()
Handle division N modification.
TGShutter * fCategories
void DoSelectShape()
Select a new shape.
void DoViewAll()
Slot for viewing volume and containers.
void DoAddNode()
Add a daughter.
TGRadioButton * fBDiv[3]
void DoDivSelAxis()
Change division axis and preserve number of slices.
void DoDivName()
Modify division name.
virtual void ActivateBaseClassEditors(TClass *cl)
Add editors to fGedFrame and exclude TLineEditor.
void DoVolumeName()
Modify volume name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:47
Bool_t IsVisContainers() const
Definition: TGeoVolume.h:153
void RemoveNode(TGeoNode *node)
Remove an existing daughter.
void Raytrace(Bool_t flag=kTRUE)
Draw this volume with current settings and perform raytracing in the pad.
TGeoMedium * GetMedium() const
Definition: TGeoVolume.h:171
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:169
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
void SetFinder(TGeoPatternFinder *finder)
Definition: TGeoVolume.h:229
Int_t GetNdaughters() const
Definition: TGeoVolume.h:347
TObjArray * GetNodes()
Definition: TGeoVolume.h:165
void VisibleDaughters(Bool_t vis=kTRUE)
set visibility for daughters
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
Bool_t IsVisibleDaughters() const
Definition: TGeoVolume.h:152
TGeoPatternFinder * GetFinder() const
Definition: TGeoVolume.h:173
TGeoShape * GetShape() const
Definition: TGeoVolume.h:186
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Division a la G3.
Bool_t IsRaytracing() const
Check if the painter is currently ray-tracing the content of this volume.
Definition: TGeoVolume.cxx:820
Bool_t IsVisLeaves() const
Definition: TGeoVolume.h:154
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
Bool_t IsVisOnly() const
Definition: TGeoVolume.h:155
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
Definition: TGeoVolume.cxx:931
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:151
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
An array of TObjects.
Definition: TObjArray.h:37
virtual void Clear(Option_t *option="")
Remove all objects from the array.
Definition: TObjArray.cxx:320
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:355
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition: TQObject.cxx:867
Basic string class.
Definition: TString.h:131
TF1 * f1
Definition: legend1.C:11