2 // Main authors: Matevz Tadel & Alja Mrak-Tadel & Bogdan Vulpescu: 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 **************************************************************************/
10 #include "AliEveMUONChamberEditor.h"
12 #include <EveDet/AliEveMUONChamber.h>
14 #include <TEveGValuators.h>
16 #include <TGDoubleSlider.h>
19 //______________________________________________________________________________
20 // AliEveMUONChamberEditor
23 ClassImp(AliEveMUONChamberEditor)
25 //______________________________________________________________________________
26 AliEveMUONChamberEditor::AliEveMUONChamberEditor(const TGWindow *p,
27 Int_t width, Int_t height,
28 UInt_t options, Pixel_t back) :
29 TGedFrame(p, width, height, options | kVerticalFrame, back),
40 MakeTitle("AliEveMUONChamber");
44 fThreshold = new TEveGValuator(this, "ADC min", 200, 0);
45 fThreshold->SetNELength(4);
46 fThreshold->SetLabelWidth(labelW);
48 fThreshold->GetSlider()->SetWidth(120);
49 fThreshold->SetLimits(0,4096);
50 fThreshold->Connect("ValueSet(Double_t)",
51 "AliEveMUONChamberEditor", this, "DoThreshold()");
52 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
54 fMaxVal = new TEveGValuator(this,"ADC max", 200, 0);
55 fMaxVal->SetNELength(4);
56 fMaxVal->SetLabelWidth(labelW);
58 fMaxVal->GetSlider()->SetWidth(120);
59 fMaxVal->SetLimits(0, 4096);
60 fMaxVal->Connect("ValueSet(Double_t)",
61 "AliEveMUONChamberEditor", this, "DoMaxVal()");
62 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
64 fClusterSize = new TEveGValuator(this,"Cls size", 200, 0);
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)",
72 "AliEveMUONChamberEditor", this, "DoClusterSize()");
73 AddFrame(fClusterSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
75 fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0);
76 fHitSize->SetLabelWidth(labelW);
77 fHitSize->SetShowSlider(kFALSE);
78 fHitSize->SetNELength(4);
80 fHitSize->SetLimits(0, 24);
81 fHitSize->SetToolTip("Size of displayed clusters");
82 fHitSize->Connect("ValueSet(Double_t)",
83 "AliEveMUONChamberEditor", this, "DoHitSize()");
84 AddFrame(fHitSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
88 //______________________________________________________________________________
89 AliEveMUONChamberEditor::~AliEveMUONChamberEditor()
97 //______________________________________________________________________________
98 void AliEveMUONChamberEditor::SetModel(TObject* obj)
104 fM = static_cast<AliEveMUONChamber*>(obj);
106 fThreshold->SetValue(fM->fThreshold);
107 fMaxVal->SetValue(fM->fMaxVal);
108 fClusterSize->SetValue(fM->fClusterSize);
109 fHitSize->SetValue(fM->fHitSize);
113 //______________________________________________________________________________
114 void AliEveMUONChamberEditor::DoThreshold()
117 // set digit minimum amplitude
120 fM->SetThreshold((Short_t) fThreshold->GetValue());
121 fThreshold->SetValue(fM->fThreshold);
126 //______________________________________________________________________________
127 void AliEveMUONChamberEditor::DoMaxVal()
130 // set digit maximum amplitude
133 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
134 fMaxVal->SetValue(fM->fMaxVal);
139 //______________________________________________________________________________
140 void AliEveMUONChamberEditor::DoClusterSize()
143 // set the cluster point size
146 fM->SetClusterSize((Int_t) fClusterSize->GetValue());
147 fClusterSize->SetValue(fM->fClusterSize);
152 //______________________________________________________________________________
153 void AliEveMUONChamberEditor::DoHitSize()
156 // set the hit point size
159 fM->SetHitSize((Int_t) fHitSize->GetValue());
160 fHitSize->SetValue(fM->fHitSize);