]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveMUONChamberEditor.cxx
Temporary fix to avoid xrootd thrashing
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveMUONChamberEditor.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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 #include "AliEveMUONChamberEditor.h"
10
11 #include <EveDet/AliEveMUONChamber.h>
12
13 #include <TEveGValuators.h>
14
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>
24
25
26 //______________________________________________________________________________
27 // AliEveMUONChamberEditor
28 //
29
30 ClassImp(AliEveMUONChamberEditor)
31
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),
37   fM(0),
38   fThreshold(0),
39   fMaxVal(0),
40   fClusterSize(0)
41 {
42   //
43   // constructor
44   //
45
46   MakeTitle("AliEveMUONChamber");
47
48   Int_t labelW = 60;
49
50   fThreshold = new TEveGValuator(this, "ADC min", 200, 0);
51   fThreshold->SetNELength(4);
52   fThreshold->SetLabelWidth(labelW);
53   fThreshold->Build();
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));
59
60   fMaxVal = new TEveGValuator(this,"ADC max", 200, 0);
61   fMaxVal->SetNELength(4);
62   fMaxVal->SetLabelWidth(labelW);
63   fMaxVal->Build();
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));
69
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));
80
81   fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0);
82   fHitSize->SetLabelWidth(labelW);
83   fHitSize->SetShowSlider(kFALSE);
84   fHitSize->SetNELength(4);
85   fHitSize->Build();
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));
91
92 }
93
94 //______________________________________________________________________________
95 AliEveMUONChamberEditor::~AliEveMUONChamberEditor()
96 {
97   //
98   // destructor
99   //
100
101 }
102
103 //______________________________________________________________________________
104 void AliEveMUONChamberEditor::SetModel(TObject* obj)
105 {
106   //
107   // ...
108   //
109
110   fM = dynamic_cast<AliEveMUONChamber*>(obj);
111
112   fThreshold->SetValue(fM->fThreshold);
113   fMaxVal->SetValue(fM->fMaxVal);
114   fClusterSize->SetValue(fM->fClusterSize);
115   fHitSize->SetValue(fM->fHitSize);
116
117 }
118
119 //______________________________________________________________________________
120 void AliEveMUONChamberEditor::DoThreshold()
121 {
122   //
123   // set digit minimum amplitude
124   //
125
126   fM->SetThreshold((Short_t) fThreshold->GetValue());
127   fThreshold->SetValue(fM->fThreshold);
128   Update();
129
130 }
131
132 //______________________________________________________________________________
133 void AliEveMUONChamberEditor::DoMaxVal()
134 {
135   //
136   // set digit maximum amplitude
137   //
138
139   fM->SetMaxVal((Int_t) fMaxVal->GetValue());
140   fMaxVal->SetValue(fM->fMaxVal);
141   Update();
142
143 }
144
145 //______________________________________________________________________________
146 void AliEveMUONChamberEditor::DoClusterSize()
147 {
148   //
149   // set the cluster point size
150   //
151
152   fM->SetClusterSize((Int_t) fClusterSize->GetValue());
153   fClusterSize->SetValue(fM->fClusterSize);
154   Update();
155
156 }
157
158 //______________________________________________________________________________
159 void AliEveMUONChamberEditor::DoHitSize()
160 {
161   //
162   // set the hit point size
163   //
164
165   fM->SetHitSize((Int_t) fHitSize->GetValue());
166   fHitSize->SetValue(fM->fHitSize);
167   Update();
168
169 }