]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveTPCSector2DEditor.cxx
Net Particle updates (Jochen Thaeder <jochen@thaeder.de>)
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTPCSector2DEditor.cxx
index 0f00efe1423d3fb7932e3df280d69b50214cb680..fdbe307662a3d359b0fbd892fd93ef42028994e2 100644 (file)
 
 
 //______________________________________________________________________________
-// AliEveTPCSector2DEditor
 //
+// Editor for AliEveTPCSector2D.
 
 ClassImp(AliEveTPCSector2DEditor)
 
 AliEveTPCSector2DEditor::AliEveTPCSector2DEditor(const TGWindow *p,
-                                    Int_t width, Int_t height,
-                                    UInt_t options, Pixel_t back) :
+                                                 Int_t width, Int_t height,
+                                                 UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fM(0),
   fShowMax(0), fAverage(0), fUseTexture(0), fPickEmpty(0), fPickMode(0)
 {
+  // Constructor.
+
   MakeTitle("AliEveTPCSector2D");
 
   {
@@ -67,14 +69,13 @@ AliEveTPCSector2DEditor::AliEveTPCSector2DEditor(const TGWindow *p,
   }
 }
 
-AliEveTPCSector2DEditor::~AliEveTPCSector2DEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCSector2DEditor::SetModel(TObject* obj)
 {
-  fM = dynamic_cast<AliEveTPCSector2D*>(obj);
+  // Set model object.
+
+  fM = static_cast<AliEveTPCSector2D*>(obj);
 
   fShowMax->SetState(fM->fShowMax ? kButtonDown : kButtonUp);
   SetupAverage();
@@ -88,6 +89,8 @@ void AliEveTPCSector2DEditor::SetModel(TObject* obj)
 
 void AliEveTPCSector2DEditor::DoShowMax()
 {
+  // Slot for ShowMax.
+
   fM->SetShowMax(fShowMax->IsOn());
   SetupAverage();
   Update();
@@ -95,13 +98,17 @@ void AliEveTPCSector2DEditor::DoShowMax()
 
 void AliEveTPCSector2DEditor::DoAverage()
 {
+  // Slot for Average.
+
   fM->SetAverage(fAverage->IsOn());
   Update();
 }
 
 void AliEveTPCSector2DEditor::SetupAverage()
 {
-  if(fM->fShowMax) {
+  // Setup Average button according to mode.
+
+  if (fM->fShowMax) {
     fAverage->SetEnabled(kFALSE);
   } else {
     fAverage->SetEnabled(kTRUE);
@@ -113,18 +120,22 @@ void AliEveTPCSector2DEditor::SetupAverage()
 
 void AliEveTPCSector2DEditor::DoUseTexture()
 {
+  // Slot for UseTexture.
+
   fM->fUseTexture = fUseTexture->IsOn();
   Update();
 }
 
 void AliEveTPCSector2DEditor::DoPickEmpty()
 {
+  // Slot for PickEmpty.
+
   fM->fPickEmpty = fPickEmpty->IsOn();
-  // Update();
 }
 
 void AliEveTPCSector2DEditor::DoPickMode(Int_t mode)
 {
+  // Slot for PickMode.
+
   fM->fPickMode = mode;
-  // Update();
 }