Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 "TGTab.h"
47#include "TGComboBox.h"
48#include "TGButton.h"
49#include "TGButtonGroup.h"
50#include "TGTextEntry.h"
51#include "TGNumberEntry.h"
52#include "TGLabel.h"
53#include "TGShutter.h"
54#include "TG3DLine.h"
55#include "TGeoTabManager.h"
56#include "TGedEditor.h"
57
59
84};
85
86////////////////////////////////////////////////////////////////////////////////
87/// Constructor for volume editor.
88
90 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
91{
92 fGeometry = 0;
93 fVolume = 0;
94
98
99 // TGShutter for categories
101 TGCompositeFrame *container, *f1;
102 Pixel_t color;
103 TGLabel *label;
104
105 // General settings
106 TGShutterItem *si = new TGShutterItem(fCategories, new TGHotString("Properties"), kCAT_GENERAL);
107 container = (TGCompositeFrame *)si->GetContainer();
109 fCategories->AddItem(si);
110
111 // TextEntry for volume name
112 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
113 f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
114 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
115 gClient->GetColorByName("#ff0000", color);
116 label->SetTextColor(color);
117 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
118 fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
120 fVolumeName->SetToolTipText("Enter the volume name");
121 container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
122
123 // Current shape
124 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
125 f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
126 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
127 gClient->GetColorByName("#ff0000", color);
128 label->SetTextColor(color);
129 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
130 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
131 fSelectedShape = 0;
132 fLSelShape = new TGLabel(f1, "Select shape");
133 gClient->GetColorByName("#0000ff", color);
134 fLSelShape->SetTextColor(color);
136 f1->AddFrame(fLSelShape, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
138 fBSelShape->SetToolTipText("Replace with one of the existing shapes");
139 fBSelShape->Associate(this);
140 f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
141 fEditShape = new TGTextButton(f1, "Edit");
142 f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
143 fEditShape->SetToolTipText("Edit selected shape");
144 fEditShape->Associate(this);
145 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
146
147 // Current medium
148 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
149 fSelectedMedium = 0;
150 fLSelMedium = new TGLabel(f1, "Select medium");
151 gClient->GetColorByName("#0000ff", color);
154 f1->AddFrame(fLSelMedium, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
156 fBSelMedium->SetToolTipText("Replace with one of the existing media");
157 fBSelMedium->Associate(this);
158 f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
159 fEditMedium = new TGTextButton(f1, "Edit");
160 f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
161 fEditMedium->SetToolTipText("Edit selected medium");
162 fEditMedium->Associate(this);
163 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
164
165 // List of daughters
166 si = new TGShutterItem(fCategories, new TGHotString("Daughters"), kCAT_DAUGHTERS);
167 container = (TGCompositeFrame *)si->GetContainer();
169 fCategories->AddItem(si);
170
171 // Existing daughters
172 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
173 f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
174 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
175 gClient->GetColorByName("#ff0000", color);
176 label->SetTextColor(color);
177 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
178
179 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
182 fNodeList->Associate(this);
183 f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
184 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
185 // Buttons for editing matrix and removing node
186 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
187 fEditMatrix = new TGTextButton(f1, "Position");
188 f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
189 fEditMatrix->SetToolTipText("Edit the position of selected node");
190 fEditMatrix->Associate(this);
191 fRemoveNode = new TGTextButton(f1, "Remove");
192 f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
193 fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
194 fRemoveNode->Associate(this);
195 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
196
197 // Adding daughters
198 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
199 f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
200 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
201 gClient->GetColorByName("#ff0000", color);
202 label->SetTextColor(color);
203 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
204
205 // Select from existing volumes
206 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
207 fSelectedVolume = 0;
208 fLSelVolume = new TGLabel(f1, "Select volume");
209 gClient->GetColorByName("#0000ff", color);
212 f1->AddFrame(fLSelVolume, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
214 fBSelVolume->SetToolTipText("Select one of the existing volumes");
215 fBSelVolume->Associate(this);
216 f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
217 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
218
219 // Matrix selection for nodes
220 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
221 fSelectedMatrix = 0;
222 fLSelMatrix = new TGLabel(f1, "Select matrix");
223 gClient->GetColorByName("#0000ff", color);
226 f1->AddFrame(fLSelMatrix, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
228 fBSelMatrix->SetToolTipText("Select one of the existing matrices");
229 fBSelMatrix->Associate(this);
230 f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
231 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
232
233 // Copy number
234 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
235 f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
241 nef->SetToolTipText("Enter node copy number");
242 fCopyNumber->Associate(this);
243 f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
244 fAddNode = new TGTextButton(f1, "Add");
245 f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
246 fAddNode->Associate(this);
247 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
248
249 // Visualization
250 si = new TGShutterItem(fCategories, new TGHotString("Visualization"), kCAT_VIS);
251 container = (TGCompositeFrame *)si->GetContainer();
253 fCategories->AddItem(si);
254
255 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
256 f1->AddFrame(/* label = */ new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
257 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
258 // gClient->GetColorByName("#ff0000", color);
259 // label->SetTextColor(color);
260 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
261
263 fBVis[0] = new TGCheckButton(f1, "Volume");
264 fBVis[1] = new TGCheckButton(f1, "Nodes");
265 f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
266 f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0, 0));
267 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
268
269 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
270 f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
271 // gClient->GetColorByName("#0000ff", color);
272 // label->SetTextColor(color);
278 nef->SetToolTipText("Set visibility level here");
280 fEVisLevel->Associate(this);
281 f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
282 fBAuto = new TGCheckButton(f1, "Auto");
283 f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
284 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
285
286 TString stitle = "View";
287 TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
288 fBView[0] = new TGRadioButton(bg, "All");
289 fBView[1] = new TGRadioButton(bg, "Leaves");
290 fBView[2] = new TGRadioButton(bg, "Only");
292 bg->Show();
293 container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
294
296 fBRaytrace = new TGCheckButton(f1, "Raytrace");
297 f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
298 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
299
300 // Division
301 si = new TGShutterItem(fCategories, new TGHotString("Division"), kCAT_DIVISION);
302 container = (TGCompositeFrame *)si->GetContainer();
304 fCategories->AddItem(si);
305 // TextEntry for division name
306 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
307 f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
308 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
309 gClient->GetColorByName("#ff0000", color);
310 label->SetTextColor(color);
311 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
312 fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
314 fDivName->SetToolTipText("Enter the volume name");
315 container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
316 // Axis selection
317 stitle = "Axis";
318 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
319 bg = new TGVButtonGroup(f1, stitle);
320 fBDiv[0] = new TGRadioButton(bg, "Axis 1");
321 fBDiv[1] = new TGRadioButton(bg, "Axis 2");
322 fBDiv[2] = new TGRadioButton(bg, "Axis 3");
323 bg->Insert(fBDiv[0]);
324 bg->Insert(fBDiv[1]);
325 bg->Insert(fBDiv[2]);
327 f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
328 fApplyDiv = new TGTextButton(f1, "Apply");
329 fApplyDiv->SetToolTipText("Apply new division settings");
330 f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
331 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
332 // Division range
333 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
334 f1->AddFrame(/* label = */ new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
335 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
336 // gClient->GetColorByName("#ff0000", color);
337 // label->SetTextColor(color);
338 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
339 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
340 f1->AddFrame(/* label = */ new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
341 // gClient->GetColorByName("#0000ff", color);
342 // label->SetTextColor(color);
344 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
345 // fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
348 nef->SetToolTipText("Set start value");
349 fEDivFrom->Associate(this);
350 f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0, 0));
351 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
352
353 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
354 f1->AddFrame(/* label = */ new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
355 // gClient->GetColorByName("#0000ff", color);
356 // label->SetTextColor(color);
358 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
362 nef->SetToolTipText("Set division step");
363 fEDivStep->Associate(this);
364 f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0, 0));
365 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
366
367 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
368 f1->AddFrame(/* label = */ new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
369 // gClient->GetColorByName("#0000ff", color);
370 // label->SetTextColor(color);
371 fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
376 nef->SetToolTipText("Set number of slices");
377 fEDivN->Associate(this);
378 f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0, 0));
379 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
380
381 fCategories->Resize(163, 340);
383
386}
387
388////////////////////////////////////////////////////////////////////////////////
389/// Destructor
390
392{
393 TGCompositeFrame *cont;
394 cont = (TGCompositeFrame *)fCategories->GetItem("Properties")->GetContainer();
396 fCategories->GetItem("Properties")->SetCleanup(0);
397 cont = (TGCompositeFrame *)fCategories->GetItem("Daughters")->GetContainer();
399 fCategories->GetItem("Daughters")->SetCleanup(0);
400 cont = (TGCompositeFrame *)fCategories->GetItem("Visualization")->GetContainer();
402 fCategories->GetItem("Visualization")->SetCleanup(0);
403 cont = (TGCompositeFrame *)fCategories->GetItem("Division")->GetContainer();
405 fCategories->GetItem("Division")->SetCleanup(0);
406
407 delete fBView[0];
408 delete fBView[1];
409 delete fBView[2];
410 delete fBDiv[0];
411 delete fBDiv[1];
412 delete fBDiv[2];
413 Cleanup();
414}
415
416////////////////////////////////////////////////////////////////////////////////
417/// Connect signals to slots.
418
420{
421 fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
422 fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
423 fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
424 fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
425 fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
426 fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
427 fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
428 fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
429 fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
430 fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
431 fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
432 fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
433 fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
434 fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
435 fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
436 fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
437 fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
438 fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
439 fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
440 fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
441 fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
442 fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
443 fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
444 fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
445 fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
446 fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
447}
448
449////////////////////////////////////////////////////////////////////////////////
450/// Connect to the picked volume.
451
453{
454 if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
456 return;
457 }
458 fVolume = (TGeoVolume *)obj;
460 const char *vname = fVolume->GetName();
461 fVolumeName->SetText(vname);
463 if (fSelectedShape)
466 if (fSelectedMedium)
468
470 TIter next2(fVolume->GetNodes());
471 TGeoNode *node;
472 Int_t icrt = 0;
473 while ((node = (TGeoNode *)next2()))
474 fNodeList->AddEntry(node->GetName(), icrt++);
475 fNodeList->Select(0);
477 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
480 } else {
483 }
484 if (!fSelectedVolume)
486 if (fVolume->IsAssembly()) {
489 }
501 } else {
502 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
503 Double_t start = 0., step = 0., end = 0.;
504 Int_t ndiv = 2, iaxis = 1;
505 TString axis_name;
506 for (Int_t i = 0; i < 3; i++) {
507 axis_name = fVolume->GetShape()->GetAxisName(i + 1);
508 fBDiv[i]->SetText(axis_name);
509 }
510
511 if (fVolume->GetFinder()) {
513 iaxis = fVolume->GetFinder()->GetDivAxis();
514 start = fVolume->GetFinder()->GetStart();
515 step = fVolume->GetFinder()->GetStep();
516 ndiv = fVolume->GetFinder()->GetNdiv();
517 } else {
518 fDivName->SetText("Enter name");
519 fSelectedShape->GetAxisRange(iaxis, start, end);
520 step = 0;
521 }
522 fBDiv[iaxis - 1]->SetState(kButtonDown, kTRUE);
523 fEDivFrom->SetNumber(start);
524 fEDivStep->SetNumber(step);
525 fEDivN->SetNumber(ndiv);
526 }
527
528 if (fInit)
530 SetActive();
531 if (GetParent() == fTabMgr->GetVolumeTab())
532 fTab->Layout();
533}
534
535////////////////////////////////////////////////////////////////////////////////
536/// Add editors to fGedFrame and exclude TLineEditor.
537
539{
542}
543
544////////////////////////////////////////////////////////////////////////////////
545/// Modify volume name.
546
548{
550}
551
552////////////////////////////////////////////////////////////////////////////////
553/// Select a new shape.
554
556{
557 TGeoShape *shape = fSelectedShape;
558 new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200, 300);
560 if (fSelectedShape)
562 else
563 fSelectedShape = shape;
564}
565
566////////////////////////////////////////////////////////////////////////////////
567/// Select a new medium.
568
570{
572 new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200, 300);
574 if (fSelectedMedium)
576 else
577 fSelectedMedium = med;
578}
579
580////////////////////////////////////////////////////////////////////////////////
581/// Select a matrix for positioning.
582
584{
585 TGeoMatrix *matrix = fSelectedMatrix;
586 new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200, 300);
588 if (fSelectedMatrix)
590 else
591 fSelectedMatrix = matrix;
592}
593
594////////////////////////////////////////////////////////////////////////////////
595/// Select a daughter volume.
596
598{
600 new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200, 300);
602 if (fSelectedVolume)
604 else
605 fSelectedVolume = vol;
606 if (fSelectedVolume)
608}
609
610////////////////////////////////////////////////////////////////////////////////
611/// Edit the shape of the volume.
612
614{
616}
617
618////////////////////////////////////////////////////////////////////////////////
619/// Edit the medium of the volume.
620
622{
624}
625
626////////////////////////////////////////////////////////////////////////////////
627/// Edit the position of the selected node.
628
630{
631 if (!fVolume->GetNdaughters())
632 return;
634 if (i < 0)
635 return;
637}
638
639////////////////////////////////////////////////////////////////////////////////
640/// Add a daughter.
641
643{
645 return;
646 Int_t icopy = fCopyNumber->GetIntNumber();
649 fNodeList->AddEntry(fVolume->GetNode(nd - 1)->GetName(), nd - 1);
650 fNodeList->Select(nd - 1);
651 fCopyNumber->SetNumber(nd + 1);
652 if (fSelectedMatrix)
658 Update();
659}
660
661////////////////////////////////////////////////////////////////////////////////
662/// Remove a daughter.
663
665{
666 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
669 return;
670 }
672 if (i < 0)
673 return;
676 TIter next(fVolume->GetNodes());
677 TGeoNode *node;
678 i = 0;
679 while ((node = (TGeoNode *)next()))
680 fNodeList->AddEntry(node->GetName(), i++);
681 fNodeList->Select(0);
683 if (!fVolume->GetNdaughters()) {
686 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
687 Double_t start = 0., step = 0., end = 0.;
688 Int_t ndiv = 2, iaxis = 1;
689 fSelectedShape->GetAxisRange(iaxis, start, end);
690 step = end - start;
691 fBDiv[iaxis - 1]->SetState(kButtonDown, kTRUE);
692 fEDivFrom->SetNumber(start);
693 fEDivStep->SetNumber(step);
694 fEDivN->SetNumber(ndiv);
695 }
696 Update();
697}
698
699////////////////////////////////////////////////////////////////////////////////
700/// Slot for setting volume visible/invisible.
701
703{
704 Bool_t on = (fBVis[0]->GetState() == kButtonDown) ? kTRUE : kFALSE;
705 if (fVolume->IsVisible() == on)
706 return;
708 Update();
709}
710
711////////////////////////////////////////////////////////////////////////////////
712/// Slot for setting daughters visible/invisible.
713
715{
716 Bool_t on = (fBVis[1]->GetState() == kButtonDown) ? kTRUE : kFALSE;
717 if (fVolume->IsVisibleDaughters() == on)
718 return;
720 Update();
721}
722
723////////////////////////////////////////////////////////////////////////////////
724/// Slot for setting visibility depth auto.
725
727{
729 if ((fGeometry->GetVisLevel() == 0) == on)
730 return;
731 if (on)
733 else
735 Update();
736}
737
738////////////////////////////////////////////////////////////////////////////////
739/// Slot for visibility level.
740
742{
745 Update();
746}
747
748////////////////////////////////////////////////////////////////////////////////
749/// Slot for viewing volume and containers.
750
752{
754 if (!on)
755 return;
756 if (fVolume->IsVisContainers() == on)
757 return;
758 if (fVolume->IsRaytracing()) {
761 }
763 Update();
764}
765
766////////////////////////////////////////////////////////////////////////////////
767/// Slot for viewing last leaves only.
768
770{
772 if (!on)
773 return;
774 if (fVolume->IsVisLeaves() == on)
775 return;
776 if (fVolume->IsRaytracing()) {
779 }
781 Update();
782}
783
784////////////////////////////////////////////////////////////////////////////////
785/// Slot for viewing volume only.
786
788{
790 if (!on)
791 return;
792 if (fVolume->IsVisOnly() == on)
793 return;
794 if (fVolume->IsRaytracing()) {
797 }
799 Update();
800}
801
802////////////////////////////////////////////////////////////////////////////////
803/// Slot for raytracing.
804
806{
808 if (fVolume->IsRaytracing() == on)
809 return;
811 Update();
812}
813
814////////////////////////////////////////////////////////////////////////////////
815/// Modify division name.
816
818{
820}
821
822////////////////////////////////////////////////////////////////////////////////
823/// Change division axis and preserve number of slices.
824
826{
827 Int_t iaxis = 1;
828 for (Int_t i = 0; i < 3; i++) {
829 if (fBDiv[i]->GetState() != kButtonDown)
830 continue;
831 iaxis = i + 1;
832 break;
833 }
834 TGeoShape *shape = fVolume->GetShape();
835 if (!shape) {
837 return;
838 }
839 Double_t xlo, xhi;
840 shape->GetAxisRange(iaxis, xlo, xhi);
841 if (xhi <= xlo) {
843 return;
844 }
845 fEDivFrom->SetNumber(xlo);
848}
849
850////////////////////////////////////////////////////////////////////////////////
851/// Handle division range modification.
852
854{
855 Double_t min, max, xlo, xhi, step;
856 Int_t iaxis = 1;
857 Int_t ndiv;
858 for (Int_t i = 0; i < 3; i++) {
859 if (fBDiv[i]->GetState() != kButtonDown)
860 continue;
861 iaxis = i + 1;
862 break;
863 }
864 TGeoShape *shape = fVolume->GetShape();
865 if (!shape) {
867 return;
868 }
869 shape->GetAxisRange(iaxis, xlo, xhi);
870 if (xhi - xlo <= 0) {
872 return;
873 }
874 min = fEDivFrom->GetNumber();
875 step = fEDivStep->GetNumber();
876 ndiv = fEDivN->GetIntNumber();
877 if (min < xlo) {
878 min = xlo;
879 fEDivFrom->SetNumber(xlo);
880 }
881 max = min + ndiv * step;
882 if (max > xhi) {
883 max = xhi;
884 step = (max - min) / ndiv;
885 fEDivStep->SetNumber(step);
886 }
887 if (min >= max) {
889 return;
890 }
892}
893
894////////////////////////////////////////////////////////////////////////////////
895/// Handle division step modification.
896
898{
899 Double_t min, max, xlo, xhi;
900 Int_t iaxis = 1;
901 for (Int_t i = 0; i < 3; i++) {
902 if (fBDiv[i]->GetState() != kButtonDown)
903 continue;
904 iaxis = i + 1;
905 break;
906 }
907 TGeoShape *shape = fVolume->GetShape();
908 if (!shape) {
910 return;
911 }
912 shape->GetAxisRange(iaxis, xlo, xhi);
913 if (xhi - xlo <= 0) {
915 return;
916 }
917 min = fEDivFrom->GetNumber();
918 Double_t step = fEDivStep->GetNumber();
919 Int_t ndiv = fEDivN->GetIntNumber();
920 max = min + ndiv * step;
921
922 // Check if ndiv*step < max-min
923 if (max <= xhi) {
925 return;
926 }
927 // Step too big - set value to fit range
928 max = xhi;
929 step = (max - min) / ndiv;
930 fEDivStep->SetNumber(step);
931 if (step < 0) {
933 return;
934 }
936}
937
938////////////////////////////////////////////////////////////////////////////////
939/// Handle division N modification.
940
942{
943 Double_t min, max, xlo, xhi;
944 Int_t iaxis = 1;
945 for (Int_t i = 0; i < 3; i++) {
946 if (fBDiv[i]->GetState() != kButtonDown)
947 continue;
948 iaxis = i + 1;
949 break;
950 }
951 TGeoShape *shape = fVolume->GetShape();
952 if (!shape) {
954 return;
955 }
956 shape->GetAxisRange(iaxis, xlo, xhi);
957 if (xhi - xlo <= 0) {
959 return;
960 }
961 Double_t step = fEDivStep->GetNumber();
962 // If step=0 it is discounted
963 if (step == 0) {
965 return;
966 }
967 Int_t ndiv = fEDivN->GetIntNumber();
968 min = fEDivFrom->GetNumber();
969 max = min + ndiv * step;
970 // Check if ndiv*step < max-min
971 if (max <= xhi) {
973 return;
974 }
975 max = xhi;
976 ndiv = (Int_t)((max - min) / step);
977 fEDivN->SetNumber(ndiv);
979}
980
981////////////////////////////////////////////////////////////////////////////////
982/// Apply current division settings
983
985{
986 Double_t xlo, xhi, step;
987 Int_t iaxis = 1;
988 Int_t ndiv;
989 for (Int_t i = 0; i < 3; i++) {
990 if (fBDiv[i]->GetState() != kButtonDown)
991 continue;
992 iaxis = i + 1;
993 break;
994 }
995 TGeoShape *shape = fVolume->GetShape();
996 if (!shape) {
998 return;
999 }
1000 shape->GetAxisRange(iaxis, xlo, xhi);
1001 if (xhi - xlo <= 0) {
1003 return;
1004 }
1005 xlo = fEDivFrom->GetNumber();
1006 step = fEDivStep->GetNumber();
1007 ndiv = fEDivN->GetIntNumber();
1008 TGeoPatternFinder *finder = fVolume->GetFinder();
1009 if (finder) {
1010 // we have to remove first the existing division
1011 TObjArray *nodes = fVolume->GetNodes();
1012 nodes->Delete();
1013 nodes->Clear();
1014 delete finder;
1015 fVolume->SetFinder(0);
1016 }
1017 fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
1020 Update();
1021 // fVolume->Draw();
1022}
@ kRaisedFrame
Definition GuiTypes.h:384
@ kSunkenFrame
Definition GuiTypes.h:383
@ kVerticalFrame
Definition GuiTypes.h:381
@ kDoubleBorder
Definition GuiTypes.h:385
@ kFixedWidth
Definition GuiTypes.h:387
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
@ kButtonDown
Definition TGButton.h:54
@ kButtonUp
Definition TGButton.h:53
#define gClient
Definition TGClient.h:157
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
@ kCAT_GENERAL
@ 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
static TClass * Class()
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Organizes TGButton widgets in a group.
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:445
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:459
Selects different options.
Definition TGButton.h:264
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition TGClient.cxx:289
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
virtual Int_t GetSelected() const
Definition TGComboBox.h:114
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition TGComboBox.h:105
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...
virtual Int_t GetNumberOfEntries() const
Definition TGComboBox.h:107
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
UInt_t GetDefaultWidth() const override
Definition TGFrame.h:312
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1218
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
UInt_t GetDefaultHeight() const override
Definition TGFrame.h:314
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:321
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
Definition TGFrame.cxx:312
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition TG3DLine.h:18
TGHotString is a string with a "hot" character underlined.
Definition TGString.h:42
This class handles GUI labels.
Definition TGLabel.h:24
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Definition TGLabel.cxx:362
virtual void SetText(TGString *newText)
Set new text in label.
Definition TGLabel.cxx:180
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
void Associate(const TGWindow *w) override
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
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
UInt_t GetDefaultHeight() const override
void SetNumStyle(EStyle style)
@ kNEAPositive
Positive number.
@ kNEANonNegative
Non-negative number.
@ kNESInteger
Style of number entry field.
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
Yield an action as soon as it is clicked.
Definition TGButton.h:228
Selects different options.
Definition TGButton.h:321
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set radio button state.
TGButton * GetButton() const
Definition TGShutter.h:44
TGFrame * GetContainer() const
Definition TGShutter.h:45
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
Definition TGShutter.h:55
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition TGShutter.cxx:73
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
void Layout() override
Layout shutter items.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition TGButton.cxx:644
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * GetText() const
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.
Organizes TGButton widgets in a group with one vertical column.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * GetParent() const
Definition TGWindow.h:83
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
Common base class for geombuilder editors.
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGeoTabManager * fTabMgr
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:38
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:23
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
TGeoVolume * GetVolume() const
Definition TGeoNode.h:99
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:25
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
virtual const char * GetAxisName(Int_t iaxis) const =0
const char * GetName() const override
Get the shape name.
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
TGPictureButton * fBSelShape
void DoRemoveNode()
Remove a daughter.
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
TGeoVolume * fVolume
TGTextButton * fEditShape
TGeoMedium * fSelectedMedium
TGeoVolume * fSelectedVolume
TGRadioButton * fBView[3]
void DoVisVolume()
Slot for setting volume visible/invisible.
TGeoShape * fSelectedShape
~TGeoVolumeEditor() override
Destructor.
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.
void SetModel(TObject *obj) override
Connect to the picked volume.
TGTextButton * fEditMedium
TGPictureButton * fBSelMedium
void DoDivN()
Handle division N modification.
void ActivateBaseClassEditors(TClass *cl) override
Add editors to fGedFrame and exclude TLineEditor.
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.
TGeoVolumeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoVolumeName()
Modify volume name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
void SetVisContainers(Bool_t flag=kTRUE) override
Set visibility for containers.
void SetVisibility(Bool_t vis=kTRUE) override
set visibility of this volume
Bool_t IsVisContainers() const
Definition TGeoVolume.h:157
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:175
TGeoManager * GetGeoManager() const
Definition TGeoVolume.h:173
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void SetVisOnly(Bool_t flag=kTRUE) override
Set visibility for leaves.
void SetFinder(TGeoPatternFinder *finder)
Definition TGeoVolume.h:244
Int_t GetNdaughters() const
Definition TGeoVolume.h:362
static TClass * Class()
TObjArray * GetNodes()
Definition TGeoVolume.h:169
void VisibleDaughters(Bool_t vis=kTRUE)
set visibility for daughters
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Bool_t IsVisibleDaughters() const
Definition TGeoVolume.h:156
TGeoPatternFinder * GetFinder() const
Definition TGeoVolume.h:177
TGeoShape * GetShape() const
Definition TGeoVolume.h:190
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.
Bool_t IsVisLeaves() const
Definition TGeoVolume.h:158
Bool_t IsVisOnly() const
Definition TGeoVolume.h:159
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
virtual Bool_t IsVisible() const
Definition TGeoVolume.h:155
void SetVisLeaves(Bool_t flag=kTRUE) override
Set visibility for leaves.
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:140
An array of TObjects.
Definition TObjArray.h:31
void Clear(Option_t *option="") override
Remove all objects from the array.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
Mother of all ROOT objects.
Definition TObject.h:41
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:525
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:869
Basic string class.
Definition TString.h:139
TF1 * f1
Definition legend1.C:11