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 **************************************************************************/
7 #include "AliEveVZEROModuleEditor.h"
8 #include <EveDet/AliEveVZEROModule.h>
10 #include <AliVZERORawStream.h>
12 #include <TEveGValuators.h>
15 //______________________________________________________________________________
17 // Editor for AliEveVZEROModule.
19 ClassImp(AliEveVZEROModuleEditor)
21 AliEveVZEROModuleEditor::AliEveVZEROModuleEditor(const TGWindow *p,
22 Int_t width, Int_t height,
23 UInt_t options, Pixel_t back) :
24 TGedFrame(p, width, height, options | kVerticalFrame, back),
30 MakeTitle("AliEveVZEROModule");
32 fSampleIndex = new TEveGValuator(this,"Sample", 200, 0);
33 fSampleIndex->SetNELength(4);
34 fSampleIndex->SetLabelWidth(60);
35 fSampleIndex->Build();
36 fSampleIndex->GetSlider()->SetWidth(120);
37 fSampleIndex->SetLimits(0, AliVZERORawStream::kNEvOfInt-1, AliVZERORawStream::kNEvOfInt, TGNumberFormat::kNESInteger);
38 fSampleIndex->Connect("ValueSet(Double_t)",
39 "AliEveVZEROModuleEditor", this, "DoSampleIndex()");
40 AddFrame(fSampleIndex, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
43 fSampleIndex = new TGNumberEntry(this,
44 AliVZERORawStream::kNEvOfInt/2, 3, -1,
45 TGNumberFormat::kNESInteger,
46 TGNumberFormat::kNEANonNegative,
47 TGNumberFormat::kNELLimitMinMax,
48 0,AliVZERORawStream::kNEvOfInt);
49 AddFrame(fSampleIndex, new TGLayoutHints(kLHintsNormal, 10, 2, 0, 0));
50 fSampleIndex->Connect("ValueSet(Double_t)",
51 "AliEveVZEROModuleEditor", this, "DoSampleIndex()");
52 fSampleIndex->SetText("ADC sample index (between 0 and 21)");
56 /******************************************************************************/
58 void AliEveVZEROModuleEditor::SetModel(TObject* obj)
62 fM = dynamic_cast<AliEveVZEROModule*>(obj);
64 fSampleIndex->SetValue(fM->GetSampleIndex());
67 /******************************************************************************/
69 void AliEveVZEROModuleEditor::DoSampleIndex()
71 // Slot for SampleIndex.
73 fM->SetSampleIndex((Int_t)fSampleIndex->GetValue());