]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveDet/AliEveMUONChamberEditor.cxx
Bug fixed
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveMUONChamberEditor.cxx
CommitLineData
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 **************************************************************************/
a15e6d7d 9
d810d0de 10#include "AliEveMUONChamberEditor.h"
11
cb4245bb 12#include <EveDet/AliEveMUONChamber.h>
3626c858 13
84aff7a4 14#include <TEveGValuators.h>
3626c858 15#include <TGSlider.h>
16#include <TGDoubleSlider.h>
d810d0de 17
3626c858 18
57ffa5fb 19//______________________________________________________________________________
d810d0de 20// AliEveMUONChamberEditor
3626c858 21//
22
d810d0de 23ClassImp(AliEveMUONChamberEditor)
3626c858 24
57ffa5fb 25//______________________________________________________________________________
d810d0de 26AliEveMUONChamberEditor::AliEveMUONChamberEditor(const TGWindow *p,
3626c858 27 Int_t width, Int_t height,
28 UInt_t options, Pixel_t back) :
29 TGedFrame(p, width, height, options | kVerticalFrame, back),
eadce74d 30 fM(0),
31 fThreshold(0),
32 fMaxVal(0),
fd31e9de 33 fClusterSize(0),
34 fHitSize(0)
3626c858 35{
36 //
37 // constructor
38 //
39
d810d0de 40 MakeTitle("AliEveMUONChamber");
3626c858 41
eadce74d 42 Int_t labelW = 60;
43
84aff7a4 44 fThreshold = new TEveGValuator(this, "ADC min", 200, 0);
eadce74d 45 fThreshold->SetNELength(4);
46 fThreshold->SetLabelWidth(labelW);
47 fThreshold->Build();
48 fThreshold->GetSlider()->SetWidth(120);
49 fThreshold->SetLimits(0,4096);
50 fThreshold->Connect("ValueSet(Double_t)",
d810d0de 51 "AliEveMUONChamberEditor", this, "DoThreshold()");
eadce74d 52 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
53
84aff7a4 54 fMaxVal = new TEveGValuator(this,"ADC max", 200, 0);
eadce74d 55 fMaxVal->SetNELength(4);
56 fMaxVal->SetLabelWidth(labelW);
57 fMaxVal->Build();
58 fMaxVal->GetSlider()->SetWidth(120);
59 fMaxVal->SetLimits(0, 4096);
60 fMaxVal->Connect("ValueSet(Double_t)",
d810d0de 61 "AliEveMUONChamberEditor", this, "DoMaxVal()");
eadce74d 62 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
63
84aff7a4 64 fClusterSize = new TEveGValuator(this,"Cls size", 200, 0);
eadce74d 65 fClusterSize->SetLabelWidth(labelW);
66 fClusterSize->SetShowSlider(kFALSE);
67 fClusterSize->SetNELength(4);
68 fClusterSize->Build();
69 fClusterSize->SetLimits(0, 24);
70 fClusterSize->SetToolTip("Size of displayed clusters");
71 fClusterSize->Connect("ValueSet(Double_t)",
d810d0de 72 "AliEveMUONChamberEditor", this, "DoClusterSize()");
eadce74d 73 AddFrame(fClusterSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
74
84aff7a4 75 fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0);
eadce74d 76 fHitSize->SetLabelWidth(labelW);
77 fHitSize->SetShowSlider(kFALSE);
78 fHitSize->SetNELength(4);
79 fHitSize->Build();
80 fHitSize->SetLimits(0, 24);
81 fHitSize->SetToolTip("Size of displayed clusters");
82 fHitSize->Connect("ValueSet(Double_t)",
d810d0de 83 "AliEveMUONChamberEditor", this, "DoHitSize()");
eadce74d 84 AddFrame(fHitSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
85
3626c858 86}
87
57ffa5fb 88//______________________________________________________________________________
d810d0de 89AliEveMUONChamberEditor::~AliEveMUONChamberEditor()
3626c858 90{
91 //
92 // destructor
93 //
94
95}
96
57ffa5fb 97//______________________________________________________________________________
d810d0de 98void AliEveMUONChamberEditor::SetModel(TObject* obj)
3626c858 99{
100 //
101 // ...
102 //
103
d810d0de 104 fM = dynamic_cast<AliEveMUONChamber*>(obj);
3626c858 105
eadce74d 106 fThreshold->SetValue(fM->fThreshold);
107 fMaxVal->SetValue(fM->fMaxVal);
108 fClusterSize->SetValue(fM->fClusterSize);
109 fHitSize->SetValue(fM->fHitSize);
110
111}
112
57ffa5fb 113//______________________________________________________________________________
d810d0de 114void AliEveMUONChamberEditor::DoThreshold()
eadce74d 115{
116 //
117 // set digit minimum amplitude
118 //
119
120 fM->SetThreshold((Short_t) fThreshold->GetValue());
121 fThreshold->SetValue(fM->fThreshold);
122 Update();
123
124}
125
57ffa5fb 126//______________________________________________________________________________
d810d0de 127void AliEveMUONChamberEditor::DoMaxVal()
eadce74d 128{
129 //
130 // set digit maximum amplitude
131 //
132
133 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
134 fMaxVal->SetValue(fM->fMaxVal);
135 Update();
136
137}
138
57ffa5fb 139//______________________________________________________________________________
d810d0de 140void AliEveMUONChamberEditor::DoClusterSize()
eadce74d 141{
142 //
143 // set the cluster point size
144 //
145
146 fM->SetClusterSize((Int_t) fClusterSize->GetValue());
147 fClusterSize->SetValue(fM->fClusterSize);
148 Update();
149
150}
151
57ffa5fb 152//______________________________________________________________________________
d810d0de 153void AliEveMUONChamberEditor::DoHitSize()
eadce74d 154{
155 //
156 // set the hit point size
157 //
158
159 fM->SetHitSize((Int_t) fHitSize->GetValue());
160 fHitSize->SetValue(fM->fHitSize);
161 Update();
162
3626c858 163}