]>
Commit | Line | Data |
---|---|---|
d810d0de | 1 | // $Id$ |
fafff680 | 2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel & Bogdan Vulpescu: 2006, 2007 |
3626c858 | 3 | |
d810d0de | 4 | /************************************************************************** |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
9 | #include "AliEveMUONChamberEditor.h" | |
10 | ||
cb4245bb | 11 | #include <EveDet/AliEveMUONChamber.h> |
3626c858 | 12 | |
84aff7a4 | 13 | #include <TEveGValuators.h> |
eadce74d | 14 | |
3626c858 | 15 | #include <TVirtualPad.h> |
16 | #include <TColor.h> | |
17 | ||
18 | #include <TGLabel.h> | |
19 | #include <TGButton.h> | |
20 | #include <TGNumberEntry.h> | |
21 | #include <TGColorSelect.h> | |
22 | #include <TGSlider.h> | |
23 | #include <TGDoubleSlider.h> | |
d810d0de | 24 | |
3626c858 | 25 | |
57ffa5fb | 26 | //______________________________________________________________________________ |
d810d0de | 27 | // AliEveMUONChamberEditor |
3626c858 | 28 | // |
29 | ||
d810d0de | 30 | ClassImp(AliEveMUONChamberEditor) |
3626c858 | 31 | |
57ffa5fb | 32 | //______________________________________________________________________________ |
d810d0de | 33 | AliEveMUONChamberEditor::AliEveMUONChamberEditor(const TGWindow *p, |
3626c858 | 34 | Int_t width, Int_t height, |
35 | UInt_t options, Pixel_t back) : | |
36 | TGedFrame(p, width, height, options | kVerticalFrame, back), | |
eadce74d | 37 | fM(0), |
38 | fThreshold(0), | |
39 | fMaxVal(0), | |
fd31e9de | 40 | fClusterSize(0), |
41 | fHitSize(0) | |
3626c858 | 42 | { |
43 | // | |
44 | // constructor | |
45 | // | |
46 | ||
d810d0de | 47 | MakeTitle("AliEveMUONChamber"); |
3626c858 | 48 | |
eadce74d | 49 | Int_t labelW = 60; |
50 | ||
84aff7a4 | 51 | fThreshold = new TEveGValuator(this, "ADC min", 200, 0); |
eadce74d | 52 | fThreshold->SetNELength(4); |
53 | fThreshold->SetLabelWidth(labelW); | |
54 | fThreshold->Build(); | |
55 | fThreshold->GetSlider()->SetWidth(120); | |
56 | fThreshold->SetLimits(0,4096); | |
57 | fThreshold->Connect("ValueSet(Double_t)", | |
d810d0de | 58 | "AliEveMUONChamberEditor", this, "DoThreshold()"); |
eadce74d | 59 | AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); |
60 | ||
84aff7a4 | 61 | fMaxVal = new TEveGValuator(this,"ADC max", 200, 0); |
eadce74d | 62 | fMaxVal->SetNELength(4); |
63 | fMaxVal->SetLabelWidth(labelW); | |
64 | fMaxVal->Build(); | |
65 | fMaxVal->GetSlider()->SetWidth(120); | |
66 | fMaxVal->SetLimits(0, 4096); | |
67 | fMaxVal->Connect("ValueSet(Double_t)", | |
d810d0de | 68 | "AliEveMUONChamberEditor", this, "DoMaxVal()"); |
eadce74d | 69 | AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); |
70 | ||
84aff7a4 | 71 | fClusterSize = new TEveGValuator(this,"Cls size", 200, 0); |
eadce74d | 72 | fClusterSize->SetLabelWidth(labelW); |
73 | fClusterSize->SetShowSlider(kFALSE); | |
74 | fClusterSize->SetNELength(4); | |
75 | fClusterSize->Build(); | |
76 | fClusterSize->SetLimits(0, 24); | |
77 | fClusterSize->SetToolTip("Size of displayed clusters"); | |
78 | fClusterSize->Connect("ValueSet(Double_t)", | |
d810d0de | 79 | "AliEveMUONChamberEditor", this, "DoClusterSize()"); |
eadce74d | 80 | AddFrame(fClusterSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); |
81 | ||
84aff7a4 | 82 | fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0); |
eadce74d | 83 | fHitSize->SetLabelWidth(labelW); |
84 | fHitSize->SetShowSlider(kFALSE); | |
85 | fHitSize->SetNELength(4); | |
86 | fHitSize->Build(); | |
87 | fHitSize->SetLimits(0, 24); | |
88 | fHitSize->SetToolTip("Size of displayed clusters"); | |
89 | fHitSize->Connect("ValueSet(Double_t)", | |
d810d0de | 90 | "AliEveMUONChamberEditor", this, "DoHitSize()"); |
eadce74d | 91 | AddFrame(fHitSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); |
92 | ||
3626c858 | 93 | } |
94 | ||
57ffa5fb | 95 | //______________________________________________________________________________ |
d810d0de | 96 | AliEveMUONChamberEditor::~AliEveMUONChamberEditor() |
3626c858 | 97 | { |
98 | // | |
99 | // destructor | |
100 | // | |
101 | ||
102 | } | |
103 | ||
57ffa5fb | 104 | //______________________________________________________________________________ |
d810d0de | 105 | void AliEveMUONChamberEditor::SetModel(TObject* obj) |
3626c858 | 106 | { |
107 | // | |
108 | // ... | |
109 | // | |
110 | ||
d810d0de | 111 | fM = dynamic_cast<AliEveMUONChamber*>(obj); |
3626c858 | 112 | |
eadce74d | 113 | fThreshold->SetValue(fM->fThreshold); |
114 | fMaxVal->SetValue(fM->fMaxVal); | |
115 | fClusterSize->SetValue(fM->fClusterSize); | |
116 | fHitSize->SetValue(fM->fHitSize); | |
117 | ||
118 | } | |
119 | ||
57ffa5fb | 120 | //______________________________________________________________________________ |
d810d0de | 121 | void AliEveMUONChamberEditor::DoThreshold() |
eadce74d | 122 | { |
123 | // | |
124 | // set digit minimum amplitude | |
125 | // | |
126 | ||
127 | fM->SetThreshold((Short_t) fThreshold->GetValue()); | |
128 | fThreshold->SetValue(fM->fThreshold); | |
129 | Update(); | |
130 | ||
131 | } | |
132 | ||
57ffa5fb | 133 | //______________________________________________________________________________ |
d810d0de | 134 | void AliEveMUONChamberEditor::DoMaxVal() |
eadce74d | 135 | { |
136 | // | |
137 | // set digit maximum amplitude | |
138 | // | |
139 | ||
140 | fM->SetMaxVal((Int_t) fMaxVal->GetValue()); | |
141 | fMaxVal->SetValue(fM->fMaxVal); | |
142 | Update(); | |
143 | ||
144 | } | |
145 | ||
57ffa5fb | 146 | //______________________________________________________________________________ |
d810d0de | 147 | void AliEveMUONChamberEditor::DoClusterSize() |
eadce74d | 148 | { |
149 | // | |
150 | // set the cluster point size | |
151 | // | |
152 | ||
153 | fM->SetClusterSize((Int_t) fClusterSize->GetValue()); | |
154 | fClusterSize->SetValue(fM->fClusterSize); | |
155 | Update(); | |
156 | ||
157 | } | |
158 | ||
57ffa5fb | 159 | //______________________________________________________________________________ |
d810d0de | 160 | void AliEveMUONChamberEditor::DoHitSize() |
eadce74d | 161 | { |
162 | // | |
163 | // set the hit point size | |
164 | // | |
165 | ||
166 | fM->SetHitSize((Int_t) fHitSize->GetValue()); | |
167 | fHitSize->SetValue(fM->fHitSize); | |
168 | Update(); | |
169 | ||
3626c858 | 170 | } |