]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveJetPlaneEditor.cxx
New more general analysis implemention for particle identification and correlation...
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveJetPlaneEditor.cxx
index c8e27e580f36d862bd4e4b8cb5397985cef9b127..6cd0df5936336e2954431442ef28cd25134a2289 100644 (file)
 
 #include <TEveGValuators.h>
 
-#include <TVirtualPad.h>
-#include <TColor.h>
-#include <TROOT.h>
-#include <TGLabel.h>
 #include <TGButton.h>
 #include <TGNumberEntry.h>
-#include <TGColorSelect.h>
-#include <TGDoubleSlider.h>
 #include <TGFrame.h>
 #include <TGTab.h>
 
+//==============================================================================
+//==============================================================================
+// AliEveJetPlaneEditor
+//==============================================================================
 
 //______________________________________________________________________________
-// AliEveJetPlaneEditor
 //
+// GUI editor for AliEveJetPlane class.
 
 AliEveJetPlaneEditor::StaticDataWindow* AliEveJetPlaneEditor::fgStaticWindow = 0;
 
@@ -40,19 +38,14 @@ AliEveJetPlaneEditor::AliEveJetPlaneEditor(const TGWindow *p, Int_t width, Int_t
   fRnrTracks(0),
   fEnergyScale(0),
   fEnergyColorScale(0),
-  fOneSelection(0),
-  fTwoSelection(0),
+  fOneSelection(0), fTwoSelection(0),
   fInformationSetup(0)
-  // Initialize widget pointers to 0
 {
+  // Constructor.
+
   MakeTitle("AliEveJetPlane");
   Int_t labelW = 67;
 
-  // Create widgets
-  // fXYZZ = new TGSomeWidget(this, ...);
-  // AddFrame(fXYZZ, new TGLayoutHints(...));
-  // fXYZZ->Connect("SignalName()", "AliEveJetPlaneEditor", this, "DoXYZZ()");
-
   fRnrJets  = new TGCheckButton(this, "Rnr Jets");
   AddFrame(fRnrJets, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
   fRnrJets->Connect("Clicked()", "AliEveJetPlaneEditor", this, "DoRnrJets()");
@@ -91,13 +84,12 @@ AliEveJetPlaneEditor::AliEveJetPlaneEditor(const TGWindow *p, Int_t width, Int_t
   // fInformationSetup->Connect("Clicked()", "AliEveJetPlaneEditor", this, "DoStaticDataWindow()");
 }
 
-AliEveJetPlaneEditor::~AliEveJetPlaneEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveJetPlaneEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<AliEveJetPlane*>(obj);
 
   // Set values of widgets
@@ -112,40 +104,42 @@ void AliEveJetPlaneEditor::SetModel(TObject* obj)
 
 /******************************************************************************/
 
-// Implements callback/slot methods
-
-// void AliEveJetPlaneEditor::DoXYZZ()
-// {
-//   fM->SetXYZZ(fXYZZ->GetValue());
-//   Update();
-// }
-
 void AliEveJetPlaneEditor::DoRnrJets()
 {
+  // Slot for RnrJets.
+
   fM->SetRnrJets(fRnrJets->IsOn());
   Update();
 }
 
 void AliEveJetPlaneEditor::DoRnrTracks()
 {
+  // Slot for RnrTracks.
+
   fM->SetRnrTracks(fRnrTracks->IsOn());
   Update();
 }
 
 void AliEveJetPlaneEditor::DoEnergyColorScale()
 {
+  // Slot for EnergyColorScale.
+
   fM->SetEnergyColorScale(fEnergyColorScale->GetValue());
   Update();
 }
 
 void AliEveJetPlaneEditor::DoEnergyScale()
 {
+  // Slot for EnergyScale.
+
   fM->SetEnergyScale(fEnergyScale->GetValue());
   Update();
 }
 
 void AliEveJetPlaneEditor::DoOneSelection()
 {
+  // Slot for OneSelection.
+
   fTwoSelection->SetState(kButtonUp);
   fM->SetOneSelection(fOneSelection->IsOn());
   fM->SetTwoSelection(fTwoSelection->IsOn());
@@ -154,6 +148,8 @@ void AliEveJetPlaneEditor::DoOneSelection()
 
 void AliEveJetPlaneEditor::DoTwoSelection()
 {
+  // Slot for TwoSelection.
+
   fOneSelection->SetState(kButtonUp);
   fM->SetOneSelection(fOneSelection->IsOn());
   fM->SetTwoSelection(fTwoSelection->IsOn());
@@ -162,6 +158,8 @@ void AliEveJetPlaneEditor::DoTwoSelection()
 
 void AliEveJetPlaneEditor::DoStaticDataWindow()
 {
+  // Slot for StaticDataWindow.
+
   printf("\n Soon available ... \n");
   if (fgStaticWindow == 0)
     fgStaticWindow = new StaticDataWindow(gClient->GetRoot(), this, 400, 200);
@@ -174,23 +172,29 @@ void AliEveJetPlaneEditor::DoStaticDataWindow()
   fgStaticWindow->CenterOnParent();
 }
 
-/******************************************************************************/
+
+//==============================================================================
+//==============================================================================
+// AliEveJetPlaneEditor::StaticDataWindow
+//==============================================================================
+
+//______________________________________________________________________________
+//
+// Common settings for all AliEveJetPlane objects.
+// Used as a pop-up from AliEveJetPlaneEditor.
 
 ClassImp(AliEveJetPlaneEditor::StaticDataWindow)
 
 AliEveJetPlaneEditor::StaticDataWindow::StaticDataWindow(const TGWindow *p, const TGWindow *main,
-                                                  UInt_t w, UInt_t h, UInt_t options) :
+                                                         UInt_t w, UInt_t h, UInt_t options) :
   TGTransientFrame(p, main, w, h, options),
-  fFrame1(0),
-  fOkButton(0),
-  fCancelButton(0),
-  fL1(0),
-  fL2(0),
-  fL3(0),
-  fL5(0),
+  fFrame1(0), fF2(0),
+  fOkButton(0), fCancelButton(0),
+  fL1(0), fL2(0), fL3(0), fL5(0),
   fTab(0),
-  fChk1(0),fChk2(0),fChk3(0),fChk4(0),fChk5(0)
+  fChk1(0), fChk2(0), fChk3(0), fChk4(0), fChk5(0)
 {
+  // Constructor.
   // Create a dialog window. A dialog window pops up with respect to its
   // "main" window.
 
@@ -264,11 +268,15 @@ AliEveJetPlaneEditor::StaticDataWindow::StaticDataWindow(const TGWindow *p, cons
 
 AliEveJetPlaneEditor::StaticDataWindow::~StaticDataWindow()
 {
+  // Destructor, deletes the window.
+
   DeleteWindow();
 }
 
 void AliEveJetPlaneEditor::StaticDataWindow::DoClose()
 {
+  // Close the window.
+
   UnmapWindow();
 }
 
@@ -281,11 +289,15 @@ void AliEveJetPlaneEditor::StaticDataWindow::DoOK()
 
 void AliEveJetPlaneEditor::StaticDataWindow::DoCancel()
 {
+  // Cancel, close the window.
+
   SendCloseMessage();
 }
 
 void AliEveJetPlaneEditor::StaticDataWindow::DoTab(Int_t /*id*/)
 {
+  // Tab selected.
+
   // printf("Tab item %d activated\n", id);
 }