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 **************************************************************************/
10 #include "AliEveTOFStripEditor.h"
11 #include <EveDet/AliEveTOFStrip.h>
13 #include <TVirtualPad.h>
15 #include <TEveGValuators.h>
19 #include <TGNumberEntry.h>
20 #include <TGColorSelect.h>
22 #include <TGDoubleSlider.h>
24 //______________________________________________________________________________
25 // AliEveTOFStripEditor
28 ClassImp(AliEveTOFStripEditor)
30 AliEveTOFStripEditor::AliEveTOFStripEditor(const TGWindow *p, Int_t width, Int_t height,
31 UInt_t options, Pixel_t back) :
32 TGedFrame(p, width, height, options | kVerticalFrame, back),
34 // Initialize widget pointers to 0
36 MakeTitle("AliEveTOFStrip");
39 // fXYZZ = new TGSomeWidget(this, ...);
40 // AddFrame(fXYZZ, new TGLayoutHints(...));
41 // fXYZZ->Connect("SignalName()", "AliEveTOFStripEditor", this, "DoXYZZ()");
43 fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
44 fThreshold->SetNELength(4);
45 fThreshold->SetLabelWidth(60);
47 fThreshold->GetSlider()->SetWidth(120);
48 fThreshold->SetLimits(0,250);
49 fThreshold->Connect("ValueSet(Double_t)",
50 "AliEveTOFSectorEditor", this, "DoThreshold()");
51 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
53 fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
54 fMaxVal->SetNELength(4);
55 fMaxVal->SetLabelWidth(60);
57 fMaxVal->GetSlider()->SetWidth(60);
58 fMaxVal->SetLimits(0, 500);
59 fMaxVal->Connect("ValueSet(Double_t)",
60 "AliEveTOFSectorEditor", this, "DoMaxVal()");
61 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
65 AliEveTOFStripEditor::~AliEveTOFStripEditor()
68 /******************************************************************************/
70 void AliEveTOFStripEditor::SetModel(TObject* obj)
72 fM = dynamic_cast<AliEveTOFStrip*>(obj);
74 // Set values of widgets
75 // fXYZZ->SetValue(fM->GetXYZZ());
78 /******************************************************************************/
79 void AliEveTOFStripEditor::DoThreshold()
81 fM->SetThreshold((Short_t) fThreshold->GetValue());
82 fThreshold->SetValue(fM->GetThreshold());
86 void AliEveTOFStripEditor::DoMaxVal()
88 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
89 fMaxVal->SetValue(fM->GetMaxVal());
93 // Implements callback/slot methods
95 // void AliEveTOFStripEditor::DoXYZZ()
97 // fM->SetXYZZ(fXYZZ->GetValue());