]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveTOFSectorEditor.cxx
Preparation for the next Root release
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTOFSectorEditor.cxx
index d50462ee0b50671a1a2c27e115e86aa53b52e96e..f4951dc38963809881979d2436fb2b3181132c97 100644 (file)
@@ -1,12 +1,12 @@
-// $Id$
-// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
-
 /**************************************************************************
  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
 
+// $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
 #include "AliEveTOFSectorEditor.h"
 #include <EveDet/AliEveTOFSector.h>
 
 
 ClassImp(AliEveTOFSectorEditor)
 
-  AliEveTOFSectorEditor::AliEveTOFSectorEditor(const TGWindow *p, Int_t width, Int_t height,
-                                  UInt_t options, Pixel_t back) :
-    TGedFrame(p, width, height, options | kVerticalFrame, back),
-    fM(0) ,
-    //fHMTrans   (0),
-    fSectorID  (0), fAutoTrans (0),
-    fPlate0(0x0), fPlate1(0x0), fPlate2(0x0), fPlate3(0x0), fPlate4(0x0),
-    fThreshold (0), fMaxVal    (0)
-    // fTime      (0)
-    // Initialize widget pointers to 0
-    //{
-
-    /*
-      fHMTrans = new TEveTransSubEditor(this);
-      fHMTrans->Connect("UseTrans()",     "AliEveTPCSectorVizEditor", this, "Update()");
-      fHMTrans->Connect("TransChanged()", "AliEveTPCSectorVizEditor", this, "Update()");
-      AddFrame(fHMTrans, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
-
-      MakeTitle("AliEveTPCSectorViz");*/
+AliEveTOFSectorEditor::AliEveTOFSectorEditor(const TGWindow *p, Int_t width, Int_t height,
+                                            UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0) ,
+  fSectorID  (0), fAutoTrans (0),
+  fPlate (0),
+  fPlate0(0), fPlate1(0), fPlate2(0), fPlate3(0), fPlate4(0),
+  fThreshold (0), fMaxVal(0)
 {
+  //ctr
 
   fPlate = new TGCheckButton*[5];
   for (Int_t ii=0; ii<5; ii++) fPlate[ii] = new TGCheckButton;
@@ -75,79 +65,83 @@ ClassImp(AliEveTOFSectorEditor)
   // fXYZZ = new TGSomeWidget(this, ...);
   // AddFrame(fXYZZ, new TGLayoutHints(...));
   // fXYZZ->Connect("SignalName()", "AliEveTOFSectorEditor", this, "DoXYZZ()"); {
-    TGHorizontalFrame* f = new TGHorizontalFrame(this);
-
-    Int_t nPlate = 0;
-    fPlate0 = new TGCheckButton(f, "Plate0");
-    f->AddFrame(fPlate0, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
-    fPlate0->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate0()");
-    //fPlate0->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
-
-    nPlate = 1;
-    fPlate1 = new TGCheckButton(f, "Plate 1");
-    f->AddFrame(fPlate1, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
-    fPlate1->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate1()");
-    //fPlate1->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
-
-    nPlate = 2;
-    fPlate2 = new TGCheckButton(f, "Plate 2");
-    f->AddFrame(fPlate2, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
-    fPlate2->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate2()");
-    //fPlate2->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
-
-    nPlate = 3;
-    fPlate3 = new TGCheckButton(f, "Plate 3");
-    f->AddFrame(fPlate3, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
-    fPlate3->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate3()");
-    //fPlate3->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
-
-    nPlate = 4;
-    fPlate4 = new TGCheckButton(f, "Plate 4");
-    f->AddFrame(fPlate4, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
-    fPlate4->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate4()");
-    //fPlate4->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
-
-
-    fPlate[0] = fPlate0;
-    fPlate[1] = fPlate1;
-    fPlate[2] = fPlate2;
-    fPlate[3] = fPlate3;
-    fPlate[4] = fPlate4;
-
-    AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
-
-    fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
-    fThreshold->SetNELength(4);
-    fThreshold->SetLabelWidth(60);
-    fThreshold->Build();
-    fThreshold->GetSlider()->SetWidth(120);
-    fThreshold->SetLimits(0,250);
-    fThreshold->Connect("ValueSet(Double_t)",
-                       "AliEveTOFSectorEditor", this, "DoThreshold()");
-    AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
-
-    fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
-    fMaxVal->SetNELength(4);
-    fMaxVal->SetLabelWidth(60);
-    fMaxVal->Build();
-    fMaxVal->GetSlider()->SetWidth(60);
-    fMaxVal->SetLimits(0, 500);
-    fMaxVal->Connect("ValueSet(Double_t)",
-                    "AliEveTOFSectorEditor", this, "DoMaxVal()");
-    AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
+  TGHorizontalFrame* f = new TGHorizontalFrame(this);
+
+  Int_t nPlate = 0;
+  fPlate0 = new TGCheckButton(f, "Plate0");
+  f->AddFrame(fPlate0, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+  fPlate0->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate0()");
+  //fPlate0->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
+
+  nPlate = 1;
+  fPlate1 = new TGCheckButton(f, "Plate 1");
+  f->AddFrame(fPlate1, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+  fPlate1->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate1()");
+  //fPlate1->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
+
+  nPlate = 2;
+  fPlate2 = new TGCheckButton(f, "Plate 2");
+  f->AddFrame(fPlate2, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+  fPlate2->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate2()");
+  //fPlate2->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
+
+  nPlate = 3;
+  fPlate3 = new TGCheckButton(f, "Plate 3");
+  f->AddFrame(fPlate3, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+  fPlate3->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate3()");
+  //fPlate3->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
+
+  nPlate = 4;
+  fPlate4 = new TGCheckButton(f, "Plate 4");
+  f->AddFrame(fPlate4, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
+  fPlate4->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate4()");
+  //fPlate4->Connect("Toggled(Bool_t)","AliEveTOFSectorEditor", this, "DoPlate(Int_t)");
+
+  fPlate[0] = fPlate0;
+  fPlate[1] = fPlate1;
+  fPlate[2] = fPlate2;
+  fPlate[3] = fPlate3;
+  fPlate[4] = fPlate4;
+
+  AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+
+  fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
+  fThreshold->SetNELength(4);
+  fThreshold->SetLabelWidth(60);
+  fThreshold->Build();
+  fThreshold->GetSlider()->SetWidth(120);
+  fThreshold->SetLimits(0,250);
+  fThreshold->Connect("ValueSet(Double_t)",
+                     "AliEveTOFSectorEditor", this, "DoThreshold()");
+  AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
+
+  fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
+  fMaxVal->SetNELength(4);
+  fMaxVal->SetLabelWidth(60);
+  fMaxVal->Build();
+  fMaxVal->GetSlider()->SetWidth(60);
+  fMaxVal->SetLimits(0, 500);
+  fMaxVal->Connect("ValueSet(Double_t)",
+                  "AliEveTOFSectorEditor", this, "DoMaxVal()");
+  AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
 
 }
 
-
-
+/******************************************************************************/
 
 AliEveTOFSectorEditor::~AliEveTOFSectorEditor()
-{}
+{
+  //dtr
+
+  delete [] fPlate;
+}
 
 /******************************************************************************/
 
 void AliEveTOFSectorEditor::SetModel(TObject* obj)
 {
+  // Set object to monitor at visualization level
+
   fM = dynamic_cast<AliEveTOFSector*>(obj);
 
   fSectorID->SetValue(fM->GetSectorID());
@@ -158,9 +152,6 @@ void AliEveTOFSectorEditor::SetModel(TObject* obj)
   fPlate2->SetState(fM->GetPlate(2) ? kButtonDown : kButtonUp);
   fPlate3->SetState(fM->GetPlate(3) ? kButtonDown : kButtonUp);
   fPlate4->SetState(fM->GetPlate(4) ? kButtonDown : kButtonUp);
-
-  // Set values of widgets
-  // fXYZZ->SetValue(fM->GetXYZZ());
 }
 
 /******************************************************************************/
@@ -228,38 +219,11 @@ void AliEveTOFSectorEditor::DoMaxVal()
   Update();
 }
 
-/******************************************************************************/
 /*
 void AliEveTOFSectorEditor::DoTime()
-{
+{ 
   fM->SetMinTime((Int_t) fTime->GetMin());
   fM->SetMaxTime((Int_t) fTime->GetMax());
   Update();
 }
 */
-
-/******************************************************************************/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// Implements callback/slot methods
-
-// void AliEveTOFSectorEditor::DoXYZZ()
-// {
-//   fM->SetXYZZ(fXYZZ->GetValue());
-//   Update();
-// }