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),
36 // Initialize widget pointers to 0
38 MakeTitle("AliEveTOFStrip");
41 // fXYZZ = new TGSomeWidget(this, ...);
42 // AddFrame(fXYZZ, new TGLayoutHints(...));
43 // fXYZZ->Connect("SignalName()", "AliEveTOFStripEditor", this, "DoXYZZ()");
45 fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
46 fThreshold->SetNELength(4);
47 fThreshold->SetLabelWidth(60);
49 fThreshold->GetSlider()->SetWidth(120);
50 fThreshold->SetLimits(0,250);
51 fThreshold->Connect("ValueSet(Double_t)",
52 "AliEveTOFSectorEditor", this, "DoThreshold()");
53 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
55 fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
56 fMaxVal->SetNELength(4);
57 fMaxVal->SetLabelWidth(60);
59 fMaxVal->GetSlider()->SetWidth(60);
60 fMaxVal->SetLimits(0, 500);
61 fMaxVal->Connect("ValueSet(Double_t)",
62 "AliEveTOFSectorEditor", this, "DoMaxVal()");
63 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
67 /******************************************************************************/
69 void AliEveTOFStripEditor::SetModel(TObject* obj)
71 fM = dynamic_cast<AliEveTOFStrip*>(obj);
73 // Set values of widgets
74 // fXYZZ->SetValue(fM->GetXYZZ());
77 /******************************************************************************/
78 void AliEveTOFStripEditor::DoThreshold()
80 fM->SetThreshold((Short_t) fThreshold->GetValue());
81 fThreshold->SetValue(fM->GetThreshold());
85 void AliEveTOFStripEditor::DoMaxVal()
87 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
88 fMaxVal->SetValue(fM->GetMaxVal());
92 // Implements callback/slot methods
94 // void AliEveTOFStripEditor::DoXYZZ()
96 // fM->SetXYZZ(fXYZZ->GetValue());