2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 #include "AliEveMUONChamberEditor.h"
11 #include <EveDet/AliEveMUONChamber.h>
13 #include <TEveGValuators.h>
15 #include <TVirtualPad.h>
20 #include <TGNumberEntry.h>
21 #include <TGColorSelect.h>
23 #include <TGDoubleSlider.h>
26 //______________________________________________________________________________
27 // AliEveMUONChamberEditor
30 ClassImp(AliEveMUONChamberEditor)
32 //______________________________________________________________________________
33 AliEveMUONChamberEditor::AliEveMUONChamberEditor(const TGWindow *p,
34 Int_t width, Int_t height,
35 UInt_t options, Pixel_t back) :
36 TGedFrame(p, width, height, options | kVerticalFrame, back),
46 MakeTitle("AliEveMUONChamber");
50 fThreshold = new TEveGValuator(this, "ADC min", 200, 0);
51 fThreshold->SetNELength(4);
52 fThreshold->SetLabelWidth(labelW);
54 fThreshold->GetSlider()->SetWidth(120);
55 fThreshold->SetLimits(0,4096);
56 fThreshold->Connect("ValueSet(Double_t)",
57 "AliEveMUONChamberEditor", this, "DoThreshold()");
58 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
60 fMaxVal = new TEveGValuator(this,"ADC max", 200, 0);
61 fMaxVal->SetNELength(4);
62 fMaxVal->SetLabelWidth(labelW);
64 fMaxVal->GetSlider()->SetWidth(120);
65 fMaxVal->SetLimits(0, 4096);
66 fMaxVal->Connect("ValueSet(Double_t)",
67 "AliEveMUONChamberEditor", this, "DoMaxVal()");
68 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
70 fClusterSize = new TEveGValuator(this,"Cls size", 200, 0);
71 fClusterSize->SetLabelWidth(labelW);
72 fClusterSize->SetShowSlider(kFALSE);
73 fClusterSize->SetNELength(4);
74 fClusterSize->Build();
75 fClusterSize->SetLimits(0, 24);
76 fClusterSize->SetToolTip("Size of displayed clusters");
77 fClusterSize->Connect("ValueSet(Double_t)",
78 "AliEveMUONChamberEditor", this, "DoClusterSize()");
79 AddFrame(fClusterSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
81 fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0);
82 fHitSize->SetLabelWidth(labelW);
83 fHitSize->SetShowSlider(kFALSE);
84 fHitSize->SetNELength(4);
86 fHitSize->SetLimits(0, 24);
87 fHitSize->SetToolTip("Size of displayed clusters");
88 fHitSize->Connect("ValueSet(Double_t)",
89 "AliEveMUONChamberEditor", this, "DoHitSize()");
90 AddFrame(fHitSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
94 //______________________________________________________________________________
95 AliEveMUONChamberEditor::~AliEveMUONChamberEditor()
103 //______________________________________________________________________________
104 void AliEveMUONChamberEditor::SetModel(TObject* obj)
110 fM = dynamic_cast<AliEveMUONChamber*>(obj);
112 fThreshold->SetValue(fM->fThreshold);
113 fMaxVal->SetValue(fM->fMaxVal);
114 fClusterSize->SetValue(fM->fClusterSize);
115 fHitSize->SetValue(fM->fHitSize);
119 //______________________________________________________________________________
120 void AliEveMUONChamberEditor::DoThreshold()
123 // set digit minimum amplitude
126 fM->SetThreshold((Short_t) fThreshold->GetValue());
127 fThreshold->SetValue(fM->fThreshold);
132 //______________________________________________________________________________
133 void AliEveMUONChamberEditor::DoMaxVal()
136 // set digit maximum amplitude
139 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
140 fMaxVal->SetValue(fM->fMaxVal);
145 //______________________________________________________________________________
146 void AliEveMUONChamberEditor::DoClusterSize()
149 // set the cluster point size
152 fM->SetClusterSize((Int_t) fClusterSize->GetValue());
153 fClusterSize->SetValue(fM->fClusterSize);
158 //______________________________________________________________________________
159 void AliEveMUONChamberEditor::DoHitSize()
162 // set the hit point size
165 fM->SetHitSize((Int_t) fHitSize->GetValue());
166 fHitSize->SetValue(fM->fHitSize);