1 /**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
8 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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>
25 // AliEveTOFStripEditor class
26 // Editor for AliEveTOFStrip class
28 // Author A. De Caro (email: decaro@sa.infn.it)
31 ClassImp(AliEveTOFStripEditor)
33 AliEveTOFStripEditor::AliEveTOFStripEditor(const TGWindow *p, Int_t width, Int_t height,
34 UInt_t options, Pixel_t back) :
35 TGedFrame(p, width, height, options | kVerticalFrame, back),
39 // Initialize widget pointers to 0
43 MakeTitle("AliEveTOFStrip");
46 // fXYZZ = new TGSomeWidget(this, ...);
47 // AddFrame(fXYZZ, new TGLayoutHints(...));
48 // fXYZZ->Connect("SignalName()", "AliEveTOFStripEditor", this, "DoXYZZ()");
50 fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
51 fThreshold->SetNELength(4);
52 fThreshold->SetLabelWidth(60);
54 fThreshold->GetSlider()->SetWidth(120);
55 fThreshold->SetLimits(0,250);
56 fThreshold->Connect("ValueSet(Double_t)",
57 "AliEveTOFSectorEditor", this, "DoThreshold()");
58 AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
60 fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
61 fMaxVal->SetNELength(4);
62 fMaxVal->SetLabelWidth(60);
64 fMaxVal->GetSlider()->SetWidth(60);
65 fMaxVal->SetLimits(0, 500);
66 fMaxVal->Connect("ValueSet(Double_t)",
67 "AliEveTOFSectorEditor", this, "DoMaxVal()");
68 AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
72 /******************************************************************************/
74 void AliEveTOFStripEditor::SetModel(TObject* obj)
76 // Set object to monitor at visualization level
78 fM = dynamic_cast<AliEveTOFStrip*>(obj);
80 // Set values of widgets
81 // fXYZZ->SetValue(fM->GetXYZZ());
84 /******************************************************************************/
85 void AliEveTOFStripEditor::DoThreshold()
87 fM->SetThreshold((Short_t) fThreshold->GetValue());
88 fThreshold->SetValue(fM->GetThreshold());
92 /******************************************************************************/
93 void AliEveTOFStripEditor::DoMaxVal()
95 fM->SetMaxVal((Int_t) fMaxVal->GetValue());
96 fMaxVal->SetValue(fM->GetMaxVal());
100 // Implements callback/slot methods
102 // void AliEveTOFStripEditor::DoXYZZ()
104 // fM->SetXYZZ(fXYZZ->GetValue());