]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add some docs.
authoralja <alja@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2007 12:22:08 +0000 (12:22 +0000)
committeralja <alja@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2007 12:22:08 +0000 (12:22 +0000)
EVE/Reve/NLTBases.cxx
EVE/Reve/NLTBases.h
EVE/Reve/NLTProjectorEditor.cxx
EVE/Reve/NLTProjectorEditor.h

index 1185d751f9fc3fb51c0c7e0a4d5609fb3689e072..505251f95b863d0d53cfa9e593bd7a65e793ecfc 100644 (file)
@@ -1,20 +1,24 @@
 // $Header$
 
-#include "NLTBases.h"
-#include "Reve/NLTPolygonSet.h"
+#include <Reve/NLTPolygonSet.h>
+#include <Reve/NLTBases.h>
 
 using namespace Reve;
 
 //______________________________________________________________________________
 // NLTProjectable
 //
+// Abstract base-class for non-linear projectable objects. Creates TClass instance 
+// for the projected class and keeps references to the projected objects.
+//
+//  See also NLTProjector::ImportElements().
 
 ClassImp(NLTProjectable)
 
 //______________________________________________________________________________
 NLTProjectable::NLTProjectable()
 {
-  // Default constructor.
+  // Comstructor.
 }
 
 //______________________________________________________________________________
@@ -33,6 +37,7 @@ NLTProjectable::~NLTProjectable()
 //______________________________________________________________________________
 // NLTProjected
 //
+//
 
 ClassImp(NLTProjected)
 
@@ -42,7 +47,7 @@ NLTProjected::NLTProjected() :
   fProjectable (0),
   fDepth       (0)
 {
-  // Default constructor.
+  // Constructor.
 }
 
 //______________________________________________________________________________
index 97a9ba1cab76db936528654891b10a136cf7a232..0616cd86d9a33ae9233a97975dcb446b5d588c1c 100644 (file)
@@ -14,6 +14,14 @@ namespace Reve {
 class NLTProjected;
 class NLTProjector;
 
+////////////////////////////////////////////////////////////////
+//                                                            //
+// NLTProjectable                                             //
+//                                                            //
+// Abstract base class for non-linear projectable objects.    //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
 class NLTProjectable
 {
 private:
@@ -21,8 +29,7 @@ private:
   NLTProjectable& operator=(const NLTProjectable&); // Not implemented
 
 protected:
-  // Eventually, references to all projected instances.
-  std::list<NLTProjected*> fProjectedList;
+  std::list<NLTProjected*> fProjectedList; // references to projected instances.
 
 public:
   NLTProjectable();
@@ -33,10 +40,16 @@ public:
   virtual void AddProjected(NLTProjected* p)    { fProjectedList.push_back(p); }
   virtual void RemoveProjected(NLTProjected* p) { fProjectedList.remove(p); }
 
-  ClassDef(NLTProjectable, 0);
+  ClassDef(NLTProjectable, 0); // Abstract base class for non-linear projectable objects.  
 }; // endclass NLTProjectable
 
-/**************************************************************************/
+////////////////////////////////////////////////////////////////
+//                                                            //
+// NLTProjected                                               //
+//                                                            //
+// Abstract base class for non-linear projected objects.      //
+//                                                            //
+////////////////////////////////////////////////////////////////
 
 class NLTProjected
 {
@@ -45,10 +58,9 @@ private:
   NLTProjected& operator=(const NLTProjected&); // Not implemented
 
 protected:
-  NLTProjector   *fProjector;
-  NLTProjectable *fProjectable;
-
-  Float_t         fDepth;
+  NLTProjector   *fProjector;     // manager
+  NLTProjectable *fProjectable;   // link to original object
+  Float_t         fDepth;         // z coordinate
 
 public:
   NLTProjected();
@@ -61,7 +73,7 @@ public:
 
   virtual void UpdateProjection() = 0;
 
-  ClassDef(NLTProjected, 0);
+  ClassDef(NLTProjected, 0); // Abstract base class for non-linear projected object. 
 }; // endclass NLTProjected
 
 }
index 4d633122da68f51f65f17c2c6c9c6518de0037bc..44905b3b67e8ad0b9292015ae6a64541ec1ec297 100644 (file)
@@ -17,10 +17,12 @@ using namespace Reve;
 //______________________________________________________________________
 // NLTProjectorEditor
 //
+// GUI editor for class NLTProjector.
+//
 
 ClassImp(NLTProjectorEditor)
 
-  NLTProjectorEditor::NLTProjectorEditor(const TGWindow *p,
+NLTProjectorEditor::NLTProjectorEditor(const TGWindow *p,
                                         Int_t width, Int_t height,
                                         UInt_t options, Pixel_t back) :
     TGedFrame(p, width, height, options | kVerticalFrame, back),
@@ -41,6 +43,8 @@ ClassImp(NLTProjectorEditor)
     fSIMode(0),
     fSILevel(0)
 {
+  // Constructor.
+
   MakeTitle("NLTProjection");
   {
     TGHorizontalFrame* f = new TGHorizontalFrame(this);
@@ -204,13 +208,11 @@ ClassImp(NLTProjectorEditor)
   fCenterFrame->AddFrame(fCenterZ, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
 }
 
-NLTProjectorEditor::~NLTProjectorEditor()
-{}
-
-/**************************************************************************/
-
+//______________________________________________________________________________
 void NLTProjectorEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<NLTProjector*>(obj);
 
   fAxisColor->SetColor(TColor::Number2Pixel(fM->GetAxisColor()), kFALSE);
@@ -229,71 +231,97 @@ void NLTProjectorEditor::SetModel(TObject* obj)
   fCenterZ->SetValue(fM->GetCenter().z);
 }
 
-/**************************************************************************/
-
+//______________________________________________________________________________
 void NLTProjectorEditor::DoType(Int_t type)
 {
+  // Slot for setting of projection type.
+
   fM->SetProjection((NLTProjection::PType_e)type, 0.001f * fDistortion->GetValue());
   fM->ProjectChildren();
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoDistortion()
 {
+  // Slot for setting distortion.
+
   fM->GetProjection()->SetDistortion(0.001f * fDistortion->GetValue());
   fM->UpdateName();
   fM->ProjectChildren();
   Update();
 }
 
-void NLTProjectorEditor::DoFixedRadius()
+//______________________________________________________________________________
+ void NLTProjectorEditor::DoFixedRadius()
 {
+  // Slot for setting fixed radius.
+
   fM->GetProjection()->SetFixedRadius(fFixedRadius->GetValue());
   fM->ProjectChildren();
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoCurrentDepth()
 {
+  // Slot for setting current depth.
+
   fM->SetCurrentDepth(fCurrentDepth->GetValue());
   fM->ProjectChildren();
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoCenter()
 {
+  // Slot for setting center of distortion.
   fM->SetCenter(fCenterX->GetValue(), fCenterY->GetValue(), fCenterZ->GetValue());
-
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoDrawOrigin()
 {
+  // Slot for setting draw of origin.
+
   fM->SetDrawOrigin(fDrawOrigin->IsOn());
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoDrawCenter()
 {
+  // Slot for setting draw of center.
+
   fM->SetDrawCenter(fDrawCenter->IsOn());
   Update();
 }
-/**************************************************************************/
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoSplitInfoMode(Int_t type)
 {
+  // Slot for setting split info mode.
+
   fM->SetSplitInfoMode(type);
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoSplitInfoLevel()
 {
+  // Slot for setting tick-mark density.
+
   fM->SetSplitInfoLevel((Int_t)fSILevel->GetNumber());
   Update();
 }
 
+//______________________________________________________________________________
 void NLTProjectorEditor::DoAxisColor(Pixel_t pixel)
 {
+  // Slot for setting axis color.
+
   fM->SetAxisColor(Color_t(TColor::GetColor(pixel)));
   Update();
 }
index 5c44e11afe4b4e4ff1e6406210b3b458c89ecf27..b0c8e165851d4a969039c4d81fd75f9a3c7c968b 100644 (file)
@@ -22,14 +22,16 @@ private:
   NLTProjectorEditor& operator=(const NLTProjectorEditor&); // Not implemented
 
 protected:
-  NLTProjector  *fM; // fModel dynamic-casted to NLTProjectorEditor
+  NLTProjector    *fM; // fModel dynamic-casted to NLTProjectorEditor
 
-  TGComboBox    *fType;
-  RGValuator    *fDistortion;
-  RGValuator    *fFixedRadius;
-  RGValuator    *fCurrentDepth;
+  // projection
+  TGComboBox      *fType;
+  RGValuator      *fDistortion;
+  RGValuator      *fFixedRadius;
+  RGValuator      *fCurrentDepth;
 
-  TGVerticalFrame *fCenterFrame;
+  // center 
+  TGVerticalFrame *fCenterFrame;  // Parent frame for projection center interface.
   TGCheckButton   *fDrawCenter;
   TGCheckButton   *fDrawOrigin;
   RGValuator      *fCenterX;
@@ -37,16 +39,18 @@ protected:
   RGValuator      *fCenterZ;
 
   // axis
-  TGColorSelect *fAxisColor;
-  TGComboBox    *fSIMode;
-  TGNumberEntry *fSILevel;
+  TGColorSelect   *fAxisColor;
+  TGComboBox      *fSIMode;
+  TGNumberEntry   *fSILevel;
 
 public:
   NLTProjectorEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  virtual ~NLTProjectorEditor();
+  virtual ~NLTProjectorEditor(){}
 
   virtual void SetModel(TObject* obj);
 
+  // Declare callback/slot methods
+
   void DoSplitInfoMode(Int_t type);
   void DoSplitInfoLevel();
   void DoAxisColor(Pixel_t pixel);
@@ -59,7 +63,7 @@ public:
   void DoDrawOrigin();
   void DoCenter();
 
-  ClassDef(NLTProjectorEditor, 0); // Editor for NLTProjector
+  ClassDef(NLTProjectorEditor, 0); // Editor for NLTProjector.
 }; // endclass NLTProjectorEditor
 
 }