]>
Commit | Line | Data |
---|---|---|
ca8a6926 | 1 | // @(#)root/eve:$Id$ |
2 | // Author: Matevz Tadel 2007 | |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
7 | * full copyright notice. * | |
8 | **************************************************************************/ | |
9 | ||
10 | #include "AliEveV0ListEditor.h" | |
11 | #include "AliEveV0.h" | |
12 | ||
13 | #include "TEveGValuators.h" | |
14 | ||
15 | #include "TVirtualPad.h" | |
16 | #include "TColor.h" | |
17 | ||
18 | // Cleanup these includes: | |
19 | #include "TGLabel.h" | |
20 | #include "TGButton.h" | |
21 | #include "TGNumberEntry.h" | |
22 | #include "TGColorSelect.h" | |
23 | #include "TGDoubleSlider.h" | |
24 | ||
25 | ||
26 | //______________________________________________________________________________ | |
27 | // GUI editor for AliEveV0List. | |
28 | // | |
29 | ||
30 | ClassImp(AliEveV0ListEditor) | |
31 | ||
32 | //______________________________________________________________________________ | |
33 | AliEveV0ListEditor::AliEveV0ListEditor(const TGWindow *p, Int_t width, Int_t height, | |
34 | UInt_t options, Pixel_t back) : | |
35 | TGedFrame(p, width, height, options | kVerticalFrame, back), | |
36 | fM(0), | |
e1bb28b4 | 37 | fMinMaxRCut(0), |
38 | fMinMaxDaughterDCA(0), | |
39 | fMinMaxPt(0) | |
ca8a6926 | 40 | { |
41 | // Constructor. | |
42 | ||
43 | MakeTitle("AliEveV0List"); | |
44 | ||
45 | // Create widgets | |
46 | // fXYZZ = new TGSomeWidget(this, ...); | |
47 | // AddFrame(fXYZZ, new TGLayoutHints(...)); | |
48 | // fXYZZ->Connect("SignalName()", "Reve::AliEveV0ListEditor", this, "DoXYZZ()"); | |
49 | ||
50 | fMinMaxRCut = new TEveGDoubleValuator(this,"Radius:", 130, 0); | |
51 | fMinMaxRCut->SetNELength(5); | |
52 | fMinMaxRCut->SetLabelWidth(74); | |
53 | fMinMaxRCut->Build(); | |
54 | fMinMaxRCut->GetSlider()->SetWidth(200); | |
55 | fMinMaxRCut->SetLimits(0, 100, TGNumberFormat::kNESRealOne); | |
56 | fMinMaxRCut->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxRCut()"); | |
57 | AddFrame(fMinMaxRCut, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); | |
e1bb28b4 | 58 | |
59 | fMinMaxDaughterDCA = new TEveGDoubleValuator(this,"DCA:", 130, 0); | |
60 | fMinMaxDaughterDCA->SetNELength(5); | |
61 | fMinMaxDaughterDCA->SetLabelWidth(74); | |
62 | fMinMaxDaughterDCA->Build(); | |
63 | fMinMaxDaughterDCA->GetSlider()->SetWidth(200); | |
64 | fMinMaxDaughterDCA->SetLimits(0, 1, TGNumberFormat::kNESRealTwo); | |
65 | fMinMaxDaughterDCA->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxDaughterDCA()"); | |
66 | AddFrame(fMinMaxDaughterDCA, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); | |
67 | ||
68 | fMinMaxPt = new TEveGDoubleValuator(this,"pT:", 130, 0); | |
69 | fMinMaxPt->SetNELength(5); | |
70 | fMinMaxPt->SetLabelWidth(74); | |
71 | fMinMaxPt->Build(); | |
72 | fMinMaxPt->GetSlider()->SetWidth(200); | |
73 | fMinMaxPt->SetLimits(0, 20, TGNumberFormat::kNESRealOne); | |
74 | fMinMaxPt->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxPt()"); | |
75 | AddFrame(fMinMaxPt, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); | |
ca8a6926 | 76 | } |
77 | ||
78 | /******************************************************************************/ | |
79 | ||
80 | //______________________________________________________________________________ | |
81 | void AliEveV0ListEditor::SetModel(TObject* obj) | |
82 | { | |
83 | // Set model object. | |
84 | ||
85 | fM = dynamic_cast<AliEveV0List*>(obj); | |
86 | ||
87 | // Set values of widgets | |
88 | // fXYZZ->SetValue(fM->GetXYZZ()); | |
89 | ||
90 | fMinMaxRCut->SetValues(fM->fMinRCut, fM->fMaxRCut); | |
e1bb28b4 | 91 | fMinMaxDaughterDCA->SetValues(fM->fMinDaughterDCA, fM->fMaxDaughterDCA); |
92 | fMinMaxPt->SetValues(fM->fMinPt, fM->fMaxPt); | |
ca8a6926 | 93 | } |
94 | ||
95 | /******************************************************************************/ | |
96 | ||
97 | // Implements callback/slot methods | |
98 | ||
99 | //______________________________________________________________________________ | |
100 | // void AliEveV0ListEditor::DoXYZZ() | |
101 | // { | |
102 | // // Slot for XYZZ. | |
103 | // | |
104 | // fM->SetXYZZ(fXYZZ->GetValue()); | |
105 | // Update(); | |
106 | // } | |
107 | ||
108 | void AliEveV0ListEditor::DoMinMaxRCut() | |
109 | { | |
110 | fM->FilterByRadius(fMinMaxRCut->GetMin(), fMinMaxRCut->GetMax()); | |
111 | } | |
e1bb28b4 | 112 | |
113 | void AliEveV0ListEditor::DoMinMaxDaughterDCA() | |
114 | { | |
115 | fM->FilterByDaughterDCA(fMinMaxDaughterDCA->GetMin(), fMinMaxDaughterDCA->GetMax()); | |
116 | } | |
117 | ||
118 | void AliEveV0ListEditor::DoMinMaxPt() | |
119 | { | |
120 | fM->FilterByPt(fMinMaxPt->GetMin(), fMinMaxPt->GetMax()); | |
121 | } |