Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoPconEditor.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 TGeoPconEditor
13\ingroup Geometry_builder
14
15Editor for a TGeoPcon.
16
17\image html geom_pcon_pic.png
18
19\image html geom_pcon_ed.png
20
21*/
22
23#include "TGeoPconEditor.h"
24#include "TGeoTabManager.h"
25#include "TGeoPcon.h"
26#include "TGeoManager.h"
27#include "TVirtualGeoPainter.h"
28#include "TVirtualPad.h"
29#include "TView.h"
30#include "TGCanvas.h"
31#include "TGButton.h"
32#include "TGTextEntry.h"
33#include "TGNumberEntry.h"
34#include "TGLabel.h"
35
36
38
39////////////////////////////////////////////////////////////////////////////////
40/// Constructor for polycone editor
41
43 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
44{
45 fShape = nullptr;
46 fNsections = 0;
47 fSections = nullptr;
48 fNsecti = 0;
49 fPhi1i = 0;
50 fDPhii = 0;
51 fZi = nullptr;
52 fRmini = nullptr;
53 fRmaxi = nullptr;
56
57 fLHsect = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 2, 2);
58
59 // TextEntry for shape name
60 MakeTitle("Name");
61 fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kPCON_NAME);
63 fShapeName->SetToolTipText("Enter the polycone name");
64 fShapeName->Associate(this);
66
67 MakeTitle("Parameters");
68 // Number entry for Nsections
71 f1->AddFrame(new TGLabel(f1, "Nz"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
72 fENz = new TGNumberEntry(f1, 0., 5, kPCON_NZ);
77 nef->SetToolTipText("Enter the number of Z sections");
78 fENz->Associate(this);
79 f1->AddFrame(fENz, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
80 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
81
82 // Number entry for Phi1
83 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
84 f1->AddFrame(new TGLabel(f1, "Phi1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
85 fEPhi1 = new TGNumberEntry(f1, 0., 5, kPCON_PHI1);
88 nef->SetToolTipText("Enter the starting phi angle [deg]");
89 fEPhi1->Associate(this);
90 f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
91 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
92
93 // Number entry for Dphi
94 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
95 f1->AddFrame(new TGLabel(f1, "Dphi"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
96 fEDPhi = new TGNumberEntry(f1, 0., 5, kPCON_DPHI);
100 nef->SetToolTipText("Enter the phi range [deg]");
101 fEDPhi->Associate(this);
102 f1->AddFrame(fEDPhi, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
103 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
104
105 // TGCanvas containing sections
106 MakeTitle("Pcon sections");
107 fCan = new TGCanvas(this, 160, 200, kSunkenFrame | kDoubleBorder);
110 // labels for #i, Z, Rmin, Rmax
112 f1->AddFrame(new TGLabel(f1, "#"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
113 f1->AddFrame(new TGLabel(f1, "Z"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
114 f1->AddFrame(new TGLabel(f1, "Rmin"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
115 f1->AddFrame(new TGLabel(f1, "Rmax"), new TGLayoutHints(kLHintsLeft, 2, 10, 6, 0));
116 cont->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
118
119 AddFrame(fCan, new TGLayoutHints(kLHintsLeft, 0, 0, 4, 4));
120
121 // Delayed draw
123 fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
125 AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
126
127 // Buttons
129 fApply = new TGTextButton(fBFrame, "Apply");
130 fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
131 fApply->Associate(this);
132 fUndo = new TGTextButton(fBFrame, "Undo");
133 fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
134 fUndo->Associate(this);
135 AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
137}
138
139////////////////////////////////////////////////////////////////////////////////
140/// Destructor
141
143{
144 if (fSections)
145 delete fSections;
146 if (fZi)
147 delete[] fZi;
148 if (fRmini)
149 delete[] fRmini;
150 if (fRmaxi)
151 delete[] fRmaxi;
153 TIter next(GetList());
154 while ((el = (TGFrameElement *)next())) {
155 if (el->fFrame->IsComposite())
157 }
158 Cleanup();
159}
160
161////////////////////////////////////////////////////////////////////////////////
162/// Connect signals to slots.
163
165{
166 fENz->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoNz()");
167 fEPhi1->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoPhi()");
168 fEDPhi->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoPhi()");
169 fApply->Connect("Clicked()", "TGeoPconEditor", this, "DoApply()");
170 fUndo->Connect("Clicked()", "TGeoPconEditor", this, "DoUndo()");
171 fShapeName->Connect("TextChanged(const char *)", "TGeoPconEditor", this, "DoModified()");
172 fInit = kFALSE;
173}
174
175////////////////////////////////////////////////////////////////////////////////
176/// Connect to a given pcon.
177
179{
180 if (obj == nullptr || (obj->IsA() != TGeoPcon::Class())) {
182 return;
183 }
184 fShape = (TGeoPcon *)obj;
185 const char *sname = fShape->GetName();
186 if (!strcmp(sname, fShape->ClassName()))
187 fShapeName->SetText("-no_name");
188 else
190
195 fPhi1i = fShape->GetPhi1();
197 fDPhii = fShape->GetDphi();
200
203
204 if (fInit)
206 SetActive();
207}
208
209////////////////////////////////////////////////////////////////////////////////
210/// Change dynamically the number of sections.
211
213{
214 if (inew == fNsections)
215 return;
216 if (!fSections)
217 fSections = new TObjArray(8);
220 Int_t isect;
221 // new sections requested
222 if (inew > fNsections) {
223 for (isect = fNsections; isect < inew; isect++) {
224 sect = new TGeoPconSection(cont, 150, 10, isect);
226 cont->AddFrame(sect, fLHsect);
227 sect->Connect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
228 }
229 } else {
230 // some sections need to be removed
231 for (isect = inew; isect < fNsections; isect++) {
233 sect->HideDaughters();
234 cont->HideFrame(sect);
235 cont->RemoveFrame(sect);
236 // sect->Disconnect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
238 delete sect;
239 }
240 }
243 cont->Layout();
244 cont->MapWindow();
245 fCan->Layout();
246}
247
248////////////////////////////////////////////////////////////////////////////////
249/// Check validity of sections
250
252{
254 Double_t zmin = 0;
255 Double_t rmin = 0, rmax = 1.;
256 for (Int_t isect = 0; isect < fNsections; isect++) {
258 if (isect && (sect->GetZ() < zmin)) {
259 if (!change)
260 return kFALSE;
261 sect->SetZ(zmin + 1.);
262 }
263 zmin = sect->GetZ();
264 if (sect->GetRmin() < 0 || (sect->GetRmax() < 0) || ((sect->GetRmin() == 0) && (sect->GetRmax() == 0))) {
265 if (!change)
266 return kFALSE;
267 sect->SetRmin(rmin);
268 sect->SetRmax(rmax);
269 }
270 rmin = sect->GetRmin();
271 rmax = sect->GetRmax();
272 }
273 return kTRUE;
274}
275
276////////////////////////////////////////////////////////////////////////////////
277/// Update sections according fShape.
278
280{
281 if (fZi)
282 delete[] fZi;
283 if (fRmini)
284 delete[] fRmini;
285 if (fRmaxi)
286 delete[] fRmaxi;
287 fZi = new Double_t[fNsections];
291 for (Int_t isect = 0; isect < fNsections; isect++) {
293 sect->SetZ(fShape->GetZ(isect));
295 sect->SetRmin(fShape->GetRmin(isect));
297 sect->SetRmax(fShape->GetRmax(isect));
299 }
300}
301
302////////////////////////////////////////////////////////////////////////////////
303/// Check if shape drawing is delayed.
304
306{
307 return (fDelayed->GetState() == kButtonDown);
308}
309
310////////////////////////////////////////////////////////////////////////////////
311/// Perform name change
312
314{
315 DoModified();
316}
317
318////////////////////////////////////////////////////////////////////////////////
319/// Slot for applying modifications.
320
322{
323 const char *name = fShapeName->GetText();
324 if (strcmp(name, fShape->GetName()))
327 fUndo->SetEnabled();
328 if (!CheckSections())
329 return;
330 // check if number of sections changed
335 if (nz != fShape->GetNz())
336 recreate = kTRUE;
338 Int_t isect;
339 if (recreate) {
340 Double_t *array = new Double_t[3 * (nz + 1)];
341 array[0] = phi1;
342 array[1] = dphi;
343 array[2] = nz;
344 for (isect = 0; isect < nz; isect++) {
346 array[3 + 3 * isect] = sect->GetZ();
347 array[4 + 3 * isect] = sect->GetRmin();
348 array[5 + 3 * isect] = sect->GetRmax();
349 }
350 fShape->SetDimensions(array);
351 delete[] array;
352 if (fPad) {
354 TView *view = fPad->GetView();
355 if (!view) {
356 fShape->Draw();
357 fPad->GetView()->ShowAxis();
358 } else {
359 const Double_t *orig = fShape->GetOrigin();
360 view->SetRange(orig[0] - fShape->GetDX(), orig[1] - fShape->GetDY(), orig[2] - fShape->GetDZ(),
361 orig[0] + fShape->GetDX(), orig[1] + fShape->GetDY(), orig[2] + fShape->GetDZ());
362 Update();
363 }
364 } else
365 Update();
366 }
367 return;
368 }
369 // No need to call SetDimensions
370 if (TMath::Abs(phi1 - fShape->GetPhi1()) > 1.e-6)
371 fShape->Phi1() = phi1;
372 if (TMath::Abs(dphi - fShape->GetDphi()) > 1.e-6)
373 fShape->Dphi() = dphi;
374 for (isect = 0; isect < fNsections; isect++) {
376 fShape->Z(isect) = sect->GetZ();
377 fShape->Rmin(isect) = sect->GetRmin();
378 fShape->Rmax(isect) = sect->GetRmax();
379 }
381 if (fPad) {
383 TView *view = fPad->GetView();
384 if (!view) {
385 fShape->Draw();
386 fPad->GetView()->ShowAxis();
387 } else {
388 const Double_t *orig = fShape->GetOrigin();
389 view->SetRange(orig[0] - fShape->GetDX(), orig[1] - fShape->GetDY(), orig[2] - fShape->GetDZ(),
390 orig[0] + fShape->GetDX(), orig[1] + fShape->GetDY(), orig[2] + fShape->GetDZ());
391 Update();
392 }
393 } else
394 Update();
395 }
396}
397
398////////////////////////////////////////////////////////////////////////////////
399/// Change parameters of section isect;
400
402{
403 TGeoPconSection *sect, *sectlo = nullptr, *secthi = nullptr;
405 if (isect)
407 if (isect < fNsections - 1)
409 Double_t z = sect->GetZ();
410 if (sectlo && z < sectlo->GetZ()) {
411 z = sectlo->GetZ();
412 sect->SetZ(z);
413 }
414 if (secthi && z > secthi->GetZ()) {
415 z = secthi->GetZ();
416 sect->SetZ(z);
417 }
418 DoModified();
419 if (!IsDelayed())
420 DoApply();
421}
422
423////////////////////////////////////////////////////////////////////////////////
424/// Change number of sections.
425
427{
429 if (nz < 2) {
430 nz = 2;
431 fENz->SetNumber(nz);
432 }
435 DoModified();
436 if (!IsDelayed())
437 DoApply();
438}
439
440////////////////////////////////////////////////////////////////////////////////
441/// Change phi range.
442
444{
447 if (TMath::Abs(phi1) > 360)
448 fEPhi1->SetNumber(0);
449 if (dphi > 360)
450 fEDPhi->SetNumber(360);
451 DoModified();
452 if (!IsDelayed())
453 DoApply();
454}
455
456////////////////////////////////////////////////////////////////////////////////
457/// Slot for signaling modifications.
458
463
464////////////////////////////////////////////////////////////////////////////////
465/// Slot for undoing last operation.
466
468{
474 for (Int_t isect = 0; isect < fNsections; isect++) {
476 sect->SetZ(fZi[isect]);
477 sect->SetRmin(fRmini[isect]);
478 sect->SetRmax(fRmaxi[isect]);
479 }
480 DoApply();
483}
484
485/** \class TGeoPconSection
486\ingroup Geometry_builder
487
488Utility frame used by TGeoPcon editor.
489
490*/
491
492
493////////////////////////////////////////////////////////////////////////////////
494/// Constructor.
495
498{
499 fNumber = id;
501 // Label with number
502 AddFrame(new TGLabel(this, TString::Format("#%i", id)), new TGLayoutHints(kLHintsLeft, 2, 4, 6, 0));
503
504 // Z entry
505 fEZ = new TGNumberEntry(this, 0., 5);
508 nef->SetToolTipText("Enter the Z position");
509 fEZ->Associate(this);
510 AddFrame(fEZ, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
511 // Rmin entry
512 fERmin = new TGNumberEntry(this, 0., 5);
516 nef->SetToolTipText("Enter the minimum radius");
517 fERmin->Associate(this);
518 AddFrame(fERmin, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
519 // Rmax entry
520 fERmax = new TGNumberEntry(this, 0., 5);
524 nef->SetToolTipText("Enter the maximum radius");
525 fERmax->Associate(this);
526 AddFrame(fERmax, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
527
530 Layout();
531}
532
533////////////////////////////////////////////////////////////////////////////////
534/// Destructor
535
540
541////////////////////////////////////////////////////////////////////////////////
542/// Hide daughter frames
543
550
551////////////////////////////////////////////////////////////////////////////////
552/// Emit Changed(Int_t) signal.
553
555{
556 Emit("Changed(Int_t)", i);
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Connect signals to slots.
561
563{
564 fEZ->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoZ()");
565 fERmin->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmin()");
566 fERmax->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmax()");
567}
568
569////////////////////////////////////////////////////////////////////////////////
570/// Z value getter
571
573{
574 return fEZ->GetNumber();
575}
576
577////////////////////////////////////////////////////////////////////////////////
578/// Rmin value getter
579
581{
582 return fERmin->GetNumber();
583}
584
585////////////////////////////////////////////////////////////////////////////////
586/// Rmax value getter
587
589{
590 return fERmax->GetNumber();
591}
592
593////////////////////////////////////////////////////////////////////////////////
594/// Z value setter
595
597{
598 fEZ->SetNumber(z);
599}
600
601////////////////////////////////////////////////////////////////////////////////
602/// Rmin value setter
603
608
609////////////////////////////////////////////////////////////////////////////////
610/// Rmax value setter
611
616
617////////////////////////////////////////////////////////////////////////////////
618/// Z slot.
619
621{
623}
624
625////////////////////////////////////////////////////////////////////////////////
626/// Rmin slot.
627
629{
632 if (rmin > rmax - 1.e-8)
635}
636
637////////////////////////////////////////////////////////////////////////////////
638/// Rmax slot.
639
641{
644 if (rmax < rmin + 1.e-8)
647}
@ 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
#define h(i)
Definition RSha256.hxx:106
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kButtonDown
Definition TGButton.h:54
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
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
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
ETGeoPconWid
@ kPCON_PHI1
@ kPCON_UNDO
@ kPCON_DPHI
@ kPCON_APPLY
@ kPCON_NAME
@ kPCON_NZ
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:453
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
Definition TGCanvas.h:192
virtual void SetContainer(TGFrame *f)
Definition TGCanvas.h:222
TGFrame * GetContainer() const
Definition TGCanvas.h:216
TGViewPort * GetViewPort() const
Definition TGCanvas.h:217
void MapSubwindows() override
Map all canvas sub windows.
void Layout() override
Create layout for canvas.
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
virtual TList * GetList() const
Definition TGFrame.h:312
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:959
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1156
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1249
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:254
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:193
TGDimension GetSize() const
Definition TGFrame.h:232
void UnmapWindow() override
unmap window
Definition TGFrame.h:208
This class handles GUI labels.
Definition TGLabel.h:24
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.
@ kNESInteger
Style of number entry field.
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
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
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.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual const Double_t * GetOrigin() const
Definition TGeoBBox.h:79
virtual Double_t GetDX() const
Definition TGeoBBox.h:76
virtual Double_t GetDZ() const
Definition TGeoBBox.h:78
virtual Double_t GetDY() const
Definition TGeoBBox.h:77
Common base class for geombuilder editors.
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TVirtualPad * fPad
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TVirtualGeoPainter * GetPainter() const
TGTextEntry * fShapeName
TObjArray * fSections
void CreateSections(Int_t inew)
Change dynamically the number of sections.
void SetModel(TObject *obj) override
Connect to a given pcon.
virtual void DoUndo()
Slot for undoing last operation.
void DoModified()
Slot for signaling modifications.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoNz()
Change number of sections.
void DoSectionChange(Int_t i)
Change parameters of section isect;.
TGNumberEntry * fEPhi1
Double_t * fRmaxi
TGLayoutHints * fLHsect
TGTextButton * fUndo
Bool_t CheckSections(Bool_t change=kFALSE)
Check validity of sections.
Double_t * fRmini
TGNumberEntry * fEDPhi
TGeoPcon * fShape
TGCompositeFrame * fBFrame
TGCanvas * fCan
void DoName()
Perform name change.
TGCompositeFrame * fDFrame
TGTextButton * fApply
TGeoPconEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for polycone editor.
void DoPhi()
Change phi range.
Bool_t fIsShapeEditable
~TGeoPconEditor() override
Destructor.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoApply()
Slot for applying modifications.
TGCheckButton * fDelayed
void UpdateSections()
Update sections according fShape.
TGNumberEntry * fENz
Utility frame used by TGeoPcon editor.
void DoRmin()
Rmin slot.
void SetZ(Double_t z)
Z value setter.
void SetRmin(Double_t rmin)
Rmin value setter.
void SetRmax(Double_t rmax)
Rmax value setter.
TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id)
Constructor.
~TGeoPconSection() override
Destructor.
void HideDaughters()
Hide daughter frames.
TGNumberEntry * fERmax
Double_t GetRmax() const
Rmax value getter.
void DoRmax()
Rmax slot.
TGNumberEntry * fEZ
TGNumberEntry * fERmin
virtual void Changed(Int_t i)
Emit Changed(Int_t) signal.
Double_t GetZ() const
Z value getter.
void DoZ()
Z slot.
virtual void ConnectSignals2Slots()
Connect signals to slots.
Double_t GetRmin() const
Rmin value getter.
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
Definition TGeoPcon.h:17
Double_t * GetRmax() const
Definition TGeoPcon.h:82
Double_t & Rmin(Int_t ipl)
Definition TGeoPcon.h:95
Double_t GetDphi() const
Definition TGeoPcon.h:77
Double_t & Rmax(Int_t ipl)
Definition TGeoPcon.h:96
void SetDimensions(Double_t *param) override
Set polycone dimensions starting from an array.
Double_t & Z(Int_t ipl)
Definition TGeoPcon.h:97
Double_t * GetZ() const
Definition TGeoPcon.h:84
static TClass * Class()
Double_t & Phi1()
Definition TGeoPcon.h:93
Double_t & Dphi()
Definition TGeoPcon.h:94
void ComputeBBox() override
compute bounding box of the pcon Check if the sections are in increasing Z order
Definition TGeoPcon.cxx:287
Int_t GetNz() const
Definition TGeoPcon.h:78
Double_t * GetRmin() const
Definition TGeoPcon.h:80
Double_t GetPhi1() const
Definition TGeoPcon.h:76
void Draw(Option_t *option="") override
Draw this shape.
const char * GetName() const override
Get the shape name.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
An array of TObjects.
Definition TObjArray.h:31
TObject * At(Int_t idx) const override
Definition TObjArray.h:164
TObject * RemoveAt(Int_t idx) override
Remove object at index idx.
void Add(TObject *obj) override
Definition TObjArray.h:68
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:226
virtual TClass * IsA() const
Definition TObject.h:246
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
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:865
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2384
See TView3D.
Definition TView.h:25
virtual void SetRange(const Double_t *min, const Double_t *max)=0
virtual Bool_t IsPaintingShape() const =0
virtual TView * GetView() const =0
TF1 * f1
Definition legend1.C:11
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:124