]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/Alieve/TPCSector3DEditor.cxx
fixed typo in ESDListNames
[u/mrichter/AliRoot.git] / EVE / Alieve / TPCSector3DEditor.cxx
index edabd3aa40d9fdb85c52910df11b13a88d290f22..580aea7723b38849011aa43563bf75885895c8ff 100644 (file)
@@ -24,11 +24,13 @@ using namespace Alieve;
 
 ClassImp(TPCSector3DEditor)
 
-TPCSector3DEditor::TPCSector3DEditor(const TGWindow *p, Int_t id, Int_t width, Int_t height,
+TPCSector3DEditor::TPCSector3DEditor(const TGWindow *p,
+                                     Int_t width, Int_t height,
                                      UInt_t options, Pixel_t back) :
-  TGedFrame(p, id, width, height, options | kVerticalFrame, back)
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0),
+  fRnrFrame(0), fDriftVel(0), fPointFrac(0), fPointSize(0)
 {
-  fM = 0;
   MakeTitle("TPCSector3D");
 
   Int_t labelW = 60;
@@ -60,12 +62,17 @@ TPCSector3DEditor::TPCSector3DEditor(const TGWindow *p, Int_t id, Int_t width, I
                      "Alieve::TPCSector3DEditor", this, "DoPointFrac()");
   AddFrame(fPointFrac, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
 
-  // Register the editor.
-  TClass *cl = TPCSector3D::Class();
-  TGedElement *ge = new TGedElement;
-  ge->fGedFrame = this;
-  ge->fCanvas = 0;
-  cl->GetEditorList()->Add(ge);
+  fPointSize = new RGValuator(this,"Point size", 200, 0);
+  fPointSize->SetLabelWidth(labelW);
+  fPointSize->SetShowSlider(kFALSE);
+  fPointSize->SetNELength(4);
+  fPointSize->Build();
+  //fPointSize->GetSlider()->SetWidth(101 + 16);
+  fPointSize->SetLimits(0.1, 32.0, 1, TGNumberFormat::kNESRealOne);
+  fPointSize->SetToolTip("Size of displayed points");
+  fPointSize->Connect("ValueSet(Double_t)",
+                     "Alieve::TPCSector3DEditor", this, "DoPointSize()");
+  AddFrame(fPointSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
 }
 
 TPCSector3DEditor::~TPCSector3DEditor()
@@ -73,27 +80,15 @@ TPCSector3DEditor::~TPCSector3DEditor()
 
 /**************************************************************************/
 
-void TPCSector3DEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t /*event*/)
+void TPCSector3DEditor::SetModel(TObject* obj)
 {
-  fModel = 0;
-  fPad   = 0;
-
-  if (!obj || !obj->InheritsFrom(TPCSector3D::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
-    SetActive(kFALSE);
-    return;
-  }
-
-  fModel = obj;
-  fPad   = pad;
-
-  fM = dynamic_cast<TPCSector3D*>(fModel);
+  fM = dynamic_cast<TPCSector3D*>(obj);
 
   fRnrFrame->SetState(fM->fRnrFrame ? kButtonDown : kButtonUp);
   fDriftVel->SetValue(fM->fDriftVel);
 
   fPointFrac->SetValue(fM->fPointFrac);
-
-  SetActive();
+  fPointSize->SetValue(fM->fPointSize);
 }
 
 /**************************************************************************/
@@ -116,3 +111,9 @@ void TPCSector3DEditor::DoPointFrac()
   Update();
 }
 
+void TPCSector3DEditor::DoPointSize()
+{
+  fM->SetPointSize(fPointSize->GetValue());
+  Update();
+}
+