Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveTrackEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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#include "TEveTrackEditor.h"
13#include "TEveTrack.h"
14#include "TEveTrackPropagator.h"
16#include "TEveManager.h"
17
18#include "TEveGValuators.h"
19
20#include "TGedEditor.h"
21#include "TAttMarkerEditor.h"
22#include "TGLabel.h"
23#include "TG3DLine.h"
24#include "TGButton.h"
25#include "TGDoubleSlider.h"
26
27/** \class TEveTrackEditor
28\ingroup TEve
29Editor for TEveTrack class.
30*/
31
32
33////////////////////////////////////////////////////////////////////////////////
34/// Constructor.
35
37 UInt_t options, Pixel_t back) :
38 TGedFrame(p, width, height, options | kVerticalFrame, back),
39 fM(nullptr),
40 fRSEditor(nullptr)
41{
42 MakeTitle("TEveTrack");
43
45
46 fRSEditor = new TGTextButton(f, "Edit Propagator");
47 fRSEditor->Connect("Clicked()", "TEveTrackEditor", this, "DoEditPropagator()");
48 f->AddFrame(fRSEditor, new TGLayoutHints(kLHintsLeft, 2, 1, 4, 4));
49
50 AddFrame(f, new TGLayoutHints(kLHintsTop, 0,0,2,1));
51}
52
53////////////////////////////////////////////////////////////////////////////////
54/// Set model object.
55
57{
58 fM = dynamic_cast<TEveTrack*>(obj);
59}
60
61////////////////////////////////////////////////////////////////////////////////
62/// Slot for EditPropagator.
63
68
69/** \class TEveTrackListEditor
70\ingroup TEve
71Editor for TEveTrackList class.
72*/
73
74
75////////////////////////////////////////////////////////////////////////////////
76/// Constructor.
77
80 UInt_t options, Pixel_t back) :
81 TGedFrame(p, width, height, options | kVerticalFrame, back),
82
83 fTC (nullptr),
84 fPtRange (nullptr),
85 fPRange (nullptr),
86 fRSSubEditor(nullptr)
87{
88 {
90
91 fRnrPoints = new TGCheckButton(f, "Draw Marker");
92 f->AddFrame(fRnrPoints, new TGLayoutHints(kLHintsLeft, 2,1,0,0));
93 fRnrPoints->Connect("Toggled(Bool_t)", "TEveTrackListEditor", this, "DoRnrPoints()");
94
95 fRnrLine = new TGCheckButton(f, "Draw Line");
96 f->AddFrame(fRnrLine, new TGLayoutHints(kLHintsLeft, 1,2,0,0));
97 fRnrLine->Connect("Toggled(Bool_t)", "TEveTrackListEditor", this, "DoRnrLine()");
98
99 AddFrame(f, new TGLayoutHints(kLHintsTop, 0,0,2,1));
100 }
101 { // --- Selectors
102 Int_t labelW = 51;
103 Int_t dbW = 210;
104
105 fPtRange = new TEveGDoubleValuator(this,"Pt rng:", 40, 0);
108 fPtRange->Build();
111 fPtRange->Connect("ValueSet()",
112 "TEveTrackListEditor", this, "DoPtRange()");
113 AddFrame(fPtRange, new TGLayoutHints(kLHintsTop, 1, 1, 4, 1));
114
115 fPRange = new TEveGDoubleValuator(this,"P rng:", 40, 0);
118 fPRange->Build();
121 fPRange->Connect("ValueSet()",
122 "TEveTrackListEditor", this, "DoPRange()");
123 AddFrame(fPRange, new TGLayoutHints(kLHintsTop, 1, 1, 4, 1));
124 }
125
126 MakeTitle("RenderStyle");
128 fRSSubEditor->Connect("Changed()", "TEveTrackListEditor", this, "Update()");
131}
132
133////////////////////////////////////////////////////////////////////////////////
134/// Create tab for control of path-mark display.
135
137{
139
142 kFitWidth |
145 title1->AddFrame(new TGLabel(title1, "PathMarks"),
146 new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
147 title1->AddFrame(new TGHorizontal3DLine(title1),
148 new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
149 fRefs->AddFrame(title1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
150
151 // path marks
155}
156
157////////////////////////////////////////////////////////////////////////////////
158/// Set model object.
159
176
177////////////////////////////////////////////////////////////////////////////////
178/// Slot for RnrLine.
179
185
186////////////////////////////////////////////////////////////////////////////////
187/// Slot for RnrPoints.
188
194
195////////////////////////////////////////////////////////////////////////////////
196/// Slot for PtRange.
197
203
204////////////////////////////////////////////////////////////////////////////////
205/// Slot for PRange.
206
212
@ kButton1Down
Definition Buttons.h:17
@ kVerticalFrame
Definition GuiTypes.h:381
@ kFixedWidth
Definition GuiTypes.h:387
@ kFitWidth
Definition GuiTypes.h:386
@ kHorizontalFrame
Definition GuiTypes.h:382
@ kOwnBackground
Definition GuiTypes.h:391
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TEveManager * gEve
@ kButtonDown
Definition TGButton.h:54
@ kButtonUp
Definition TGButton.h:53
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
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
Composite GUI element for selection of range (label, two number-entries and double-slider).
Float_t GetMin() const
void Build(Bool_t connect=kTRUE) override
Create sub-components (label, number entries, double-slider).
TGDoubleHSlider * GetSlider()
void SetLimits(Int_t min, Int_t max)
Set limits of the represented range for integer values.
Float_t GetMax() const
void SetValues(Float_t min, Float_t max, Bool_t emit=kFALSE)
Set min/max values, optionally emit signal.
void SetLabelWidth(Int_t w)
void SetNELength(Int_t l)
TEveGedEditor * GetEditor() const
Returns main object editor.
void DoEditPropagator()
Slot for EditPropagator.
TEveTrackEditor(const TEveTrackEditor &)
TGTextButton * fRSEditor
void SetModel(TObject *obj) override
Set model object.
void CreateRefsTab()
Create tab for control of path-mark display.
TEveTrackListEditor(const TEveTrackListEditor &)
void DoRnrPoints()
Slot for RnrPoints.
TEveGDoubleValuator * fPtRange
TGCheckButton * fRnrPoints
TGVerticalFrame * fRefs
TGCheckButton * fRnrLine
TEveGDoubleValuator * fPRange
void SetModel(TObject *obj) override
Set model object.
TEveTrackPropagatorSubEditor * fRSSubEditor
void DoRnrLine()
Slot for RnrLine.
void DoPRange()
Slot for PRange.
TEveTrackList * fTC
void DoPtRange()
Slot for PtRange.
A list of tracks supporting change of common attributes and selection based on track parameters.
Definition TEveTrack.h:140
Double_t fMinPt
Definition TEveTrack.h:155
void SelectByP(Double_t min_p, Double_t max_p)
Select visibility of tracks by momentum.
void SetRnrPoints(Bool_t r)
Set rendering of track as points for the list and the elements.
Double_t fMaxPt
Definition TEveTrack.h:156
Bool_t GetRnrLine() const
Definition TEveTrack.h:199
Double_t fMaxP
Definition TEveTrack.h:159
Bool_t GetRnrPoints() const
Definition TEveTrack.h:203
void SelectByPt(Double_t min_pt, Double_t max_pt)
Select visibility of tracks by transverse momentum.
Double_t fLimP
Definition TEveTrack.h:160
Double_t fLimPt
Definition TEveTrack.h:157
TEveTrackPropagator * GetPropagator()
Definition TEveTrack.h:175
Double_t fMinP
Definition TEveTrack.h:158
void SetRnrLine(Bool_t rnr)
Set rendering of track as line for the list and the elements.
Sub-editor for TEveTrackPropagator class.
void SetModel(TEveTrackPropagator *m)
Set model object.
void CreateRefsContainer(TGVerticalFrame *p)
Create a frame containing track-reference controls under parent frame p.
Visual representation of a track.
Definition TEveTrack.h:33
TEveTrackPropagator * GetPropagator() const
Definition TEveTrack.h:84
Selects different options.
Definition TGButton.h:264
Bool_t IsOn() const override
Definition TGButton.h:310
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
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
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void SetWidth(UInt_t w)
Definition TGFrame.h:248
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition TG3DLine.h:18
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
@ kNESRealOne
Fixed fraction real, one digit.
@ kNESInteger
Style of number entry field.
@ kNESRealTwo
Fixed fraction real, two digit.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
virtual TVirtualPad * GetPad() const
Definition TGedEditor.h:78
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual void SetGedEditor(TGedEditor *ed)
Definition TGedFrame.h:80
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Mother of all ROOT objects.
Definition TObject.h:41
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
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Definition TMath.h:773