]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added class documentation.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jan 2008 16:44:32 +0000 (16:44 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jan 2008 16:44:32 +0000 (16:44 +0000)
30 files changed:
EVE/EveBase/AliEveJetPlane.cxx
EVE/EveBase/AliEveJetPlane.h
EVE/EveBase/AliEveJetPlaneEditor.cxx
EVE/EveBase/AliEveJetPlaneEditor.h
EVE/EveBase/AliEveJetPlaneGL.cxx
EVE/EveBase/AliEveJetPlaneGL.h
EVE/EveDet/AliEveTPCData.cxx
EVE/EveDet/AliEveTPCData.h
EVE/EveDet/AliEveTPCLoader.cxx
EVE/EveDet/AliEveTPCLoader.h
EVE/EveDet/AliEveTPCLoaderEditor.cxx
EVE/EveDet/AliEveTPCLoaderEditor.h
EVE/EveDet/AliEveTPCSector2D.cxx
EVE/EveDet/AliEveTPCSector2D.h
EVE/EveDet/AliEveTPCSector2DEditor.cxx
EVE/EveDet/AliEveTPCSector2DEditor.h
EVE/EveDet/AliEveTPCSector2DGL.cxx
EVE/EveDet/AliEveTPCSector2DGL.h
EVE/EveDet/AliEveTPCSector3D.cxx
EVE/EveDet/AliEveTPCSector3D.h
EVE/EveDet/AliEveTPCSector3DEditor.cxx
EVE/EveDet/AliEveTPCSector3DEditor.h
EVE/EveDet/AliEveTPCSector3DGL.cxx
EVE/EveDet/AliEveTPCSector3DGL.h
EVE/EveDet/AliEveTPCSectorData.cxx
EVE/EveDet/AliEveTPCSectorData.h
EVE/EveDet/AliEveTPCSectorViz.cxx
EVE/EveDet/AliEveTPCSectorViz.h
EVE/EveDet/AliEveTPCSectorVizEditor.cxx
EVE/EveDet/AliEveTPCSectorVizEditor.h

index d0040c14e5e9075cc06f210e64219d368fe165f2..7d341eac5648bf8cb9da7cfd46bf9bbbd67ef478 100644 (file)
 #include <TVirtualPad.h>
 #include <TVirtualViewer3D.h>
 
-
 //______________________________________________________________________________
-// AliEveJetPlane
 //
+// Show jets and tracks in eta-phi plane.
 
+ClassImp(AliEveJetPlane)
 
 Bool_t AliEveJetPlane::fgOneMomentumXYZ      = kFALSE;
 Bool_t AliEveJetPlane::fgOneMomentumPhiTheta = kFALSE;
-Bool_t AliEveJetPlane::fgOneEta     = kFALSE;
-Bool_t AliEveJetPlane::fgOneE       = kFALSE;
-Bool_t AliEveJetPlane::fgOneChgMass = kFALSE;
+Bool_t AliEveJetPlane::fgOneEta              = kFALSE;
+Bool_t AliEveJetPlane::fgOneE                = kFALSE;
+Bool_t AliEveJetPlane::fgOneChgMass          = kFALSE;
 
 
-ClassImp(AliEveJetPlane)
-
 AliEveJetPlane::AliEveJetPlane(Int_t iev) :
   TEveElementList(Form("AliEveJetPlane %i",iev), Form("%i",iev)),
 
@@ -69,6 +67,8 @@ AliEveJetPlane::AliEveJetPlane(Int_t iev) :
 
 void AliEveJetPlane::AddJet(AliAODJet jet)
 {
+  // Add a jet for display.
+
   fJets.push_back(jet);
 }
 
@@ -76,6 +76,8 @@ void AliEveJetPlane::AddJet(AliAODJet jet)
 
 void AliEveJetPlane::AddTrack(AliAODTrack track)
 {
+  // Add a track for display.
+
   fTracks.push_back(track);
 }
 
@@ -84,6 +86,8 @@ void AliEveJetPlane::AddTrack(AliAODTrack track)
 
 void AliEveJetPlane::ComputeBBox()
 {
+  // Calculate bounding-box.
+
   BBoxInit();
   BBoxCheckPoint(-350, -350, -20);
   BBoxCheckPoint( 350,  350,  20);
@@ -91,6 +95,8 @@ void AliEveJetPlane::ComputeBBox()
 
 void AliEveJetPlane::Paint(Option_t* /*option*/)
 {
+  // Paint the object.
+
   TBuffer3D buff(TBuffer3DTypes::kGeneric);
 
   // Section kCore
index 7f1f3ebed0eb14b733ca90ade72915bb5ddf6748..b7c20922651e05a68d0cbc37b2ec2d10543dcaa5 100644 (file)
@@ -34,40 +34,41 @@ private:
   AliEveJetPlane& operator=(const AliEveJetPlane&); // Not implemented
 
 protected:
-  Float_t fMinEta;
-  Float_t fMaxEta;
-  Float_t fMinPhi;
-  Float_t fMaxPhi;
-  Int_t   fNEtaDiv;
-  Int_t   fNPhiDiv;
+  Float_t fMinEta;    // Min eta for display.
+  Float_t fMaxEta;    // Max eta for display.
+  Float_t fMinPhi;    // Min phi for display.
+  Float_t fMaxPhi;    // Max phi for display.
+  Int_t   fNEtaDiv;   // Number of eta divisions for display.
+  Int_t   fNPhiDiv;   // Number of phi divisions for display.
 
-  Float_t fEtaScale;
-  Float_t fPhiScale;
-  Float_t fEnergyScale;
-  Float_t fEnergyColorScale;
+  Float_t fEtaScale;          // Multiplier for eta.
+  Float_t fPhiScale;          // Multiplier for phi.
+  Float_t fEnergyScale;       // Multiplier for energy.
+  Float_t fEnergyColorScale;  // Multiplier for energy color.
 
-  Color_t fGridColor;
+  Color_t fGridColor; // Color of coordinate grid.
 
-  TEveTrans  fHMTrans;
+  TEveTrans  fHMTrans;// Transformation matrix.
 
-  std::vector<AliAODJet>   fJets;
-  std::vector<AliAODTrack> fTracks;
+  std::vector<AliAODJet>   fJets;   // Jets to display.
+  std::vector<AliAODTrack> fTracks; // Tracks to display.
 
-  Bool_t                 fRnrJets;
-  Bool_t                 fRnrTracks;
-  Bool_t                 fOneSelection;
-  Bool_t                 fTwoSelection;
+  Bool_t                 fRnrJets;       // Show jets.
+  Bool_t                 fRnrTracks;     // Show tracks.
+  Bool_t                 fOneSelection;  // One object selected.
+  Bool_t                 fTwoSelection;  // Two objects selected.
 
-  AliAODJet             *fJet1,   *fJet2;
-  AliAODTrack           *fTrack1, *fTrack2;
+  AliAODJet             *fJet1,   *fJet2;    // Selection jets.
+  AliAODTrack           *fTrack1, *fTrack2;  // Selection tracks.
 
-  Int_t                  fSelectionFlag;
+  Int_t                  fSelectionFlag; // Selection state, handled by GL renderer.
 
-  static Bool_t fgOneMomentumXYZ;
-  static Bool_t fgOneMomentumPhiTheta;
-  static Bool_t fgOneEta;
-  static Bool_t fgOneE;
-  static Bool_t fgOneChgMass;
+  // Common settings:
+  static Bool_t fgOneMomentumXYZ;       // Display momentum as coordinates.
+  static Bool_t fgOneMomentumPhiTheta;  // Display momentum as phi/theta.
+  static Bool_t fgOneEta;               // Display eta.
+  static Bool_t fgOneE;                 // Display energy.
+  static Bool_t fgOneChgMass;           // Display charge and mass.
 
 public:
   AliEveJetPlane(Int_t iev);
@@ -124,7 +125,7 @@ public:
   void SetTransMatrix(Double_t* carr)        { fHMTrans.SetFrom(carr); }
   void SetTransMatrix(const TGeoMatrix& mat) { fHMTrans.SetFrom(mat);  }
 
-  ClassDef(AliEveJetPlane, 1);
+  ClassDef(AliEveJetPlane, 1); // Show jets and tracks in eta-phi plane.
 }; // endclass AliEveJetPlane
 
 #endif
index 0e4dad7e5a418ce42148fbdba776499be7c1d1d3..adf439030645a83f1d99ae476a217f7a4932e29c 100644 (file)
@@ -40,19 +40,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 +86,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 +106,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 +150,8 @@ void AliEveJetPlaneEditor::DoOneSelection()
 
 void AliEveJetPlaneEditor::DoTwoSelection()
 {
+  // Slot for TwoSelection.
+
   fOneSelection->SetState(kButtonUp);
   fM->SetOneSelection(fOneSelection->IsOn());
   fM->SetTwoSelection(fTwoSelection->IsOn());
@@ -162,6 +160,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,12 +174,18 @@ void AliEveJetPlaneEditor::DoStaticDataWindow()
   fgStaticWindow->CenterOnParent();
 }
 
+
+/******************************************************************************/
 /******************************************************************************/
 
+//______________________________________________________________________________
+//
+// Common settings for all AliEveJetPlane objects.
+
 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), fF2(0),
   fOkButton(0), fCancelButton(0),
@@ -187,6 +193,7 @@ AliEveJetPlaneEditor::StaticDataWindow::StaticDataWindow(const TGWindow *p, cons
   fTab(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.
 
@@ -260,11 +267,15 @@ AliEveJetPlaneEditor::StaticDataWindow::StaticDataWindow(const TGWindow *p, cons
 
 AliEveJetPlaneEditor::StaticDataWindow::~StaticDataWindow()
 {
+  // Destructor, deletes the window.
+
   DeleteWindow();
 }
 
 void AliEveJetPlaneEditor::StaticDataWindow::DoClose()
 {
+  // Close the window.
+
   UnmapWindow();
 }
 
@@ -277,11 +288,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);
 }
 
index 62ba66e0a6c4ff206d4637b0c6ef08eb5839d01c..dca81cb68a29da59375422d0a087e71166033f45 100644 (file)
@@ -32,21 +32,19 @@ private:
   AliEveJetPlaneEditor& operator=(const AliEveJetPlaneEditor&); // Not implemented
 
 protected:
-  AliEveJetPlane          *fM; // fModel dynamic-casted to AliEveJetPlaneEditor
+  AliEveJetPlane   *fM; // Model object.
 
-  // Declare widgets
-  // TGSomeWidget*   fXYZZ;
-  TGCheckButton*     fRnrJets;
-  TGCheckButton*     fRnrTracks;
-  TEveGValuator*  fEnergyScale;
-  TEveGValuator*  fEnergyColorScale;
-  TGButton          *fOneSelection, *fTwoSelection;
-  TGButton          *fInformationSetup;
+  TGCheckButton    *fRnrJets;          // Widget for flag RnrJets.
+  TGCheckButton    *fRnrTracks;        // Widget for flag RnrTracks.
+  TEveGValuator    *fEnergyScale;      // Widget for EnergyScale.
+  TEveGValuator    *fEnergyColorScale; // Widget for EnergyColorScale.
+  TGButton         *fOneSelection, *fTwoSelection;  // Widgets for one/two selection flags.
+  TGButton         *fInformationSetup; // Widget for InformationSetup.
 
 public:
   AliEveJetPlaneEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
-                UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  virtual ~AliEveJetPlaneEditor();
+                       UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  virtual ~AliEveJetPlaneEditor() {}
 
   virtual void SetModel(TObject* obj);
 
@@ -69,11 +67,11 @@ public:
     StaticDataWindow(const StaticDataWindow&);            // Not implemented
     StaticDataWindow& operator=(const StaticDataWindow&); // Not implemented
 
-    TGCompositeFrame    *fFrame1, *fF2;
-    TGButton            *fOkButton, *fCancelButton;
-    TGLayoutHints       *fL1, *fL2, *fL3, *fL5;
-    TGTab               *fTab;
-    TGButton            *fChk1, *fChk2,*fChk3, *fChk4,*fChk5;
+    TGCompositeFrame    *fFrame1, *fF2;             // Frames.
+    TGButton            *fOkButton, *fCancelButton; // Ok, cancel buttons.
+    TGLayoutHints       *fL1, *fL2, *fL3, *fL5;     // Layout hints.
+    TGTab               *fTab;                      // Tab container.
+    TGButton            *fChk1, *fChk2,*fChk3, *fChk4,*fChk5; // Check-buttons.
 
   public:
     StaticDataWindow(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h,
@@ -86,13 +84,13 @@ public:
     void DoCancel();
     void DoTab(Int_t id);
 
-    ClassDef(StaticDataWindow, 0);
+    ClassDef(StaticDataWindow, 0); // Common settings for all AliEveJetPlane objects.
   };
 
 protected:
-  static StaticDataWindow* fgStaticWindow;
+  static StaticDataWindow* fgStaticWindow; // Common window for global settings.
 
-  ClassDef(AliEveJetPlaneEditor, 1); // Editor for AliEveJetPlane
+  ClassDef(AliEveJetPlaneEditor, 1); // Editor for AliEveJetPlane.
 }; // endclass AliEveJetPlaneEditor
 
 #endif
index 352e01abbb179e28b53fbc7012a70e805ef31e00..0897800557b0e2b923a22cbaffaf42152f782160 100644 (file)
 
 
 //______________________________________________________________________________
-// AliEveJetPlaneGL
 //
+// GL renderer for AliEveJetPlane.
 
 ClassImp(AliEveJetPlaneGL)
 
 AliEveJetPlaneGL::AliEveJetPlaneGL() : TGLObject(), fM(0)
 {
+  // Constructor.
+
   fDLCache = kFALSE; // Disable display list -- axis pain.
 }
 
-AliEveJetPlaneGL::~AliEveJetPlaneGL()
-{}
-
 /******************************************************************************/
 
 Bool_t AliEveJetPlaneGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 {
+  // Set model object.
+
   if(SetModelCheckClass(obj, AliEveJetPlane::Class())) {
     fM = dynamic_cast<AliEveJetPlane*>(obj);
     return kTRUE;
@@ -49,7 +50,8 @@ Bool_t AliEveJetPlaneGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 
 void AliEveJetPlaneGL::SetBBox()
 {
-  // !! This ok if master sub-classed from TAttBBox
+  // Set bounding box.
+
   SetAxisAlignedBBox(((AliEveJetPlane*)fExternalObj)->AssertBBox());
 }
 
@@ -57,13 +59,14 @@ void AliEveJetPlaneGL::SetBBox()
 
 void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
 {
+  // Render the object.
 
   Float_t minEta = (fM->fMinEta)*(fM->fEtaScale);
   Float_t maxEta = (fM->fMaxEta)*(fM->fEtaScale);
   Float_t minPhi = (fM->fMinPhi)*(fM->fPhiScale);
   Float_t maxPhi = (fM->fMaxPhi)*(fM->fPhiScale);
   Float_t phiCoord, etaCoord, dPhi, dEta;
-  Double_t eta, phi, E, x, y;
+  Double_t eta, phi, e, x, y;
 
   // Show frame for Eta-Phi coordinates
 
@@ -161,12 +164,12 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
     {
       eta = j->Eta();
       phi = j->Phi();
-      E   = j->E();
+      e   = j->E();
 
       x = eta*(fM->fEtaScale);
       y = phi*(fM->fPhiScale);
 
-      Int_t colBin = TMath::Min((Int_t) ((nCol-2)*E*
+      Int_t colBin = TMath::Min((Int_t) ((nCol-2)*e*
                                         TMath::Power(10.,fM->fEnergyColorScale)/(eMax)),nCol-2);
       Int_t colIdx = gStyle->GetColorPalette(colBin);
       TColor* c    = gROOT->GetColor(colIdx);
@@ -179,10 +182,9 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
       }
 
       glLoadName(jetid);
-      TGLUtil::DrawLine( TGLVertex3(x,y,0.),
-                        TGLVector3(0.,0.,TMath::Log(E + 1.)*fM->fEnergyScale),
-                        TGLUtil::kLineHeadArrow, 25.0, col);
-
+      TGLUtil::DrawLine(TGLVertex3(x,y,0.),
+                       TGLVector3(0.,0.,TMath::Log(e + 1.)*fM->fEnergyScale),
+                       TGLUtil::kLineHeadArrow, 25.0, col);
       ++j; ++jetid;
     }
   }
@@ -196,16 +198,15 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
     glEnable(GL_DEPTH_TEST);    // Turn Depth Testing On
     UInt_t trackid = 0;
 
-
     k = fM->fTracks.begin();
 
     while (k != fM->fTracks.end())
     {
       eta = k->Eta();
       phi = k->Phi();
-      E   = k->E();
+      e   = k->E();
 
-      if (E < 0.)
+      if (e < 0.)
       {
        //                      printf(" WARNING: Particle with negative energy has been found.\n");
        //                      printf(" PARTICLE NOT DISPLAYED. TrackID: %i\n", trackid);
@@ -216,7 +217,7 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
       x = eta*(fM->fEtaScale);
       y = phi*(fM->fPhiScale);
 
-      Int_t colBin = TMath::Min((Int_t) ((nCol-2)*E*
+      Int_t colBin = TMath::Min((Int_t) ((nCol-2)*e*
                                         TMath::Power(10.,fM->fEnergyColorScale)/(eMax)),nCol-2);
       Int_t colIdx = gStyle->GetColorPalette(colBin);
       TColor* c    = gROOT->GetColor(colIdx);
@@ -230,7 +231,7 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
 
       glLoadName(trackid);
       TGLUtil::DrawLine( TGLVertex3(x,y,0.),
-                        TGLVector3(0.,0.,TMath::Log(E + 1.)*fM->fEnergyScale),
+                        TGLVector3(0.,0.,TMath::Log(e + 1.)*fM->fEnergyScale),
                         TGLUtil::kLineHeadArrow, 5.0, col);
 
       ++k; ++trackid;
@@ -239,15 +240,14 @@ void AliEveJetPlaneGL::DirectDraw(TGLRnrCtx & /*rnrCtx*/) const
 
   glPopName();
   TGLUtil::ResetDrawQuality();
-
-
-
 }
 
 /******************************************************************************/
 
 void AliEveJetPlaneGL::ProcessSelection(TGLRnrCtx & /*rnrCtx*/, TGLSelectRecord & rec)
 {
+  // Process selection and print jet information.
+
   //   printf("beep %u\n", rec.GetN());
   //   rec.Print();
   static Int_t jet1State;
@@ -320,17 +320,17 @@ void AliEveJetPlaneGL::ProcessSelection(TGLRnrCtx & /*rnrCtx*/, TGLSelectRecord
 
       if(jet1State && jet2State)
       {
-       Double_t Eta1, Eta2, Phi1, Phi2, d;
+       Double_t eta1, eta2, phi1, phi2, d;
 
-       Eta1 = (fM->GetJet1()).Eta();
-       Eta2 = (fM->GetJet2()).Eta();
-       Phi1 = (fM->GetJet1()).Phi();
-        Phi2 = (fM->GetJet2()).Phi();
+       eta1 = (fM->GetJet1()).Eta();
+       eta2 = (fM->GetJet2()).Eta();
+       phi1 = (fM->GetJet1()).Phi();
+        phi2 = (fM->GetJet2()).Phi();
 
-       d = TMath::Sqrt(TMath::Power(Eta2-Eta1,2) + TMath::Power(Phi2-Phi1,2));
+       d = TMath::Sqrt(TMath::Power(eta2-eta1,2) + TMath::Power(phi2-phi1,2));
 
-       printf("Eta-Phi: %f, %f\n", Eta1, Phi1 );
-       printf("Eta-Phi: %f, %f\n", Eta2, Phi2 );
+       printf("Eta-Phi: %f, %f\n", eta1, phi1);
+       printf("Eta-Phi: %f, %f\n", eta2, phi2);
        printf("Eta-Phi Distance: %f\n", d);
       }
 
index 6a2e1d6f8358709a4ba1e7ea862ee33e85abb74b..6be8d0e182ac9e538522235ca2ebd7960d3248ea 100644 (file)
@@ -25,13 +25,13 @@ private:
   AliEveJetPlaneGL& operator=(const AliEveJetPlaneGL&); // Not implemented
 
 protected:
-  AliEveJetPlane* fM; // fModel dynamic-casted to AliEveJetPlaneGL
+  AliEveJetPlane* fM; // Model object.
 
   virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
 
 public:
   AliEveJetPlaneGL();
-  virtual ~AliEveJetPlaneGL();
+  virtual ~AliEveJetPlaneGL() {}
 
   virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
   virtual void   SetBBox();
@@ -40,7 +40,7 @@ public:
   virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
   virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
 
-  ClassDef(AliEveJetPlaneGL, 0);
+  ClassDef(AliEveJetPlaneGL, 0); // GL renderer for AliEveJetPlane.
 }; // endclass AliEveJetPlaneGL
 
 #endif
index 9709acf04115d97d733d9f24d7965134a050528a..0986d6fbec3a9ecae2ef7a2c250bd70e983a39ac 100644 (file)
@@ -18,7 +18,6 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCData
 //
 // A central manager for TPC data of an event.  Can read digits (from
 // a tree: LoadDigits()) and raw-data (via AliRawReader: LoadRaw()).
@@ -41,11 +40,15 @@ AliEveTPCData::AliEveTPCData() :
   fSectors(36), fSectorBlockSize(65536),
   fLoadThreshold(0), fLoadPedestal(0), fAutoPedestal(kFALSE)
 {
+  // Constructor.
+
   AliEveTPCSectorData::InitStatics();
 }
 
 AliEveTPCData::~AliEveTPCData()
 {
+  // Destructor, deletes all sector-data.
+
   DeleteAllSectors();
 }
 
@@ -53,27 +56,35 @@ AliEveTPCData::~AliEveTPCData()
 
 void AliEveTPCData::CreateSector(Int_t sector)
 {
-  if(fSectors[sector] == 0)
+  // Create sector-data for sector if it does not exist already.
+
+  if (fSectors[sector] == 0)
     fSectors[sector] = new AliEveTPCSectorData(sector, fSectorBlockSize);
 }
 
 void AliEveTPCData::CreateAllSectors()
 {
-  for(Int_t s=0; s<36; ++s)
+  // Create all 36 sectors.
+
+  for (Int_t s=0; s<36; ++s)
     CreateSector(s);
 }
 
 void AliEveTPCData::DropAllSectors()
 {
-  for(Int_t s=0; s<36; ++s) {
-    if(fSectors[s] != 0)
+  // Drop data of all existing sectors.
+
+  for (Int_t s=0; s<36; ++s) {
+    if (fSectors[s] != 0)
       fSectors[s]->DropData();
   }
 }
 
 void AliEveTPCData::DeleteAllSectors()
 {
-  for(Int_t s=0; s<36; ++s) {
+  // Delete all sector-data.
+
+  for (Int_t s=0; s<36; ++s) {
     delete fSectors[s];
     fSectors[s] = 0;
   }
@@ -83,8 +94,11 @@ void AliEveTPCData::DeleteAllSectors()
 
 AliEveTPCSectorData* AliEveTPCData::GetSectorData(Int_t sector, Bool_t spawnSectors)
 {
-  if(sector < 0 || sector > 35) return 0;
-  if(fSectors[sector] == 0 && spawnSectors)
+  // Get sector-data for sector. If spawnSectors is true, the
+  // sector-data is created if it does not exist already.
+
+  if (sector < 0 || sector > 35) return 0;
+  if (fSectors[sector] == 0 && spawnSectors)
     CreateSector(sector);
   return fSectors[sector];
 }
@@ -110,15 +124,15 @@ void AliEveTPCData::LoadDigits(TTree* tree, Bool_t spawnSectors)
   for (Int_t ent=0; ent<numEnt; ent++) {
     tree->GetEntry(ent);
     AliEveTPCSectorData::GetParam().AdjustSectorRow(digit.GetID(), sector, row);
-    if(sector >= 36) {
+    if (sector >= 36) {
       sector -= 36;
       row    += AliEveTPCSectorData::GetInnSeg().GetNRows();
     }
     secData = GetSectorData(sector, spawnSectors);
-    if(secData == 0)
+    if (secData == 0)
       continue;
 
-    if(digit.First() == kFALSE)
+    if (digit.First() == kFALSE)
       continue;
     curPad = -1;
     do {
@@ -126,23 +140,23 @@ void AliEveTPCData::LoadDigits(TTree* tree, Bool_t spawnSectors)
       time   = digit.CurrentRow();
       signal = digit.CurrentDigit();
 
-      if(pad != curPad) {
-       if(inFill)
+      if (pad != curPad) {
+       if (inFill)
          secData->EndPad(fAutoPedestal, fLoadThreshold);
        secData->BeginPad(row, pad, kFALSE);
        curPad = pad;
        inFill = kTRUE;
       }
-      if(fAutoPedestal) {
+      if (fAutoPedestal) {
        secData->RegisterData(time, signal);
       } else {
        signal -= fLoadPedestal;
-       if(signal >= fLoadThreshold)
+       if (signal >= fLoadThreshold)
          secData->RegisterData(time, signal);
       }
 
     } while (digit.Next());
-    if(inFill) {
+    if (inFill) {
       secData->EndPad(fAutoPedestal, fLoadThreshold);
       inFill = kFALSE;
     }
@@ -169,12 +183,12 @@ void AliEveTPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t
 
   while (input.Next()) {
     if (input.IsNewSector()) {
-      if(inFill) {
+      if (inFill) {
        secData->EndPad(fAutoPedestal, threshold);
        inFill = kFALSE;
       }
       sector = input.GetSector();
-      if(sector >= 36) {
+      if (sector >= 36) {
        sector -= 36;
        rowOffset = AliEveTPCSectorData::GetInnSeg().GetNRows();
       } else {
@@ -186,15 +200,15 @@ void AliEveTPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t
       continue;
 
     if (input.IsNewPad()) {
-      if(inFill) {
+      if (inFill) {
        secData->EndPad(fAutoPedestal, threshold);
        inFill = kFALSE;
       }
       row = input.GetRow() + rowOffset;
       pad = input.GetPad();
 
-      if(pad >= AliEveTPCSectorData::GetNPadsInRow(row)) {
-       if(warn) {
+      if (pad >= AliEveTPCSectorData::GetNPadsInRow(row)) {
+       if (warn) {
          Warning(eH.Data(), "pad out of range (row=%d, pad=%d, maxpad=%d).",
                  row, pad, AliEveTPCSectorData::GetNPadsInRow(row));
        }
@@ -202,7 +216,7 @@ void AliEveTPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t
       }
 
       AliEveTPCSectorData::PadRowHack* prh = secData->GetPadRowHack(row, pad);
-      if(prh != 0) {
+      if (prh != 0) {
        threshold = prh->fThrExt + Short_t(prh->fThrFac*fLoadThreshold);
       } else {
        threshold = fLoadThreshold;
@@ -215,9 +229,9 @@ void AliEveTPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t
 
     time   = input.GetTime();
     signal = input.GetSignal();
-    if(time >= lastTime) {
-      if(lastTimeWarn == kFALSE) {
-       if(warn)
+    if (time >= lastTime) {
+      if (lastTimeWarn == kFALSE) {
+       if (warn)
          Warning(eH.Data(), "time out of order (row=%d, pad=%d, time=%d, lastTime=%d).",
                  row, pad, time, lastTime);
         lastTimeWarn = kTRUE;
@@ -225,16 +239,16 @@ void AliEveTPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t
       continue;
     }
     lastTime = time;
-    if(fAutoPedestal) {
+    if (fAutoPedestal) {
       secData->RegisterData(time, signal);
     } else {
       signal -= fLoadPedestal;
-      if(signal > threshold)
+      if (signal > threshold)
        secData->RegisterData(time, signal);
     }
   }
 
-  if(inFill) {
+  if (inFill) {
     secData->EndPad(fAutoPedestal, threshold);
     inFill = kFALSE;
   }
index 13ee5ac4603df9526779d2aa3dabffce6944898a..9f9e548f840ea72ea8a3290ed3dfe82b93c7adea 100644 (file)
@@ -26,11 +26,11 @@ class AliEveTPCSectorData;
 class AliEveTPCData : public TObject, public TEveRefCnt
 {
 protected:
-  std::vector<AliEveTPCSectorData*>  fSectors;
-  Int_t                        fSectorBlockSize;
-  Short_t                      fLoadThreshold;
-  Short_t                      fLoadPedestal;
-  Bool_t                       fAutoPedestal;
+  std::vector<AliEveTPCSectorData*>  fSectors; // Vector of sector-data.
+  Int_t                      fSectorBlockSize; // Block-size of sector-data.
+  Short_t                    fLoadThreshold;   // Threshold at load-time.
+  Short_t                    fLoadPedestal;    // Pedestal at load-time.
+  Bool_t                     fAutoPedestal;    // If true determine pedestals automatically for each pad.
 
 public:
   AliEveTPCData();
index 7c4a598097864279ecdcbc231dbcd0c4dd37f3ad..6775c66349f461330035a57fbec9ad7827d78573 100644 (file)
@@ -21,8 +21,9 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCLoader
 //
+// Front-end for stand-alone inspection of TPC raw-data.
+// GUI is implemented in AliEveTPCLoaderEditor class.
 
 ClassImp(AliEveTPCLoader)
 
@@ -43,11 +44,15 @@ AliEveTPCLoader::AliEveTPCLoader(const Text_t* n, const Text_t* t) :
   fSetInitSectorParams(kFALSE),
   fInitMinTime(0), fInitMaxTime(460), fInitThreshold(5), fInitMaxVal(128)
 {
+  // Constructor.
+
   fData = new AliEveTPCData;
 }
 
 AliEveTPCLoader::~AliEveTPCLoader()
 {
+  // Destructor.
+
   delete fReader;
   delete fData;
 }
@@ -56,15 +61,22 @@ AliEveTPCLoader::~AliEveTPCLoader()
 
 void AliEveTPCLoader::RemoveElementLocal(TEveElement* el)
 {
-  for(Int_t i=0; i<36; ++i) {
-    if(fSec2Ds[i] == el) fSec2Ds[i] = 0;
-    if(fSec3Ds[i] == el) fSec3Ds[i] = 0;
+  // Local removal an element, virtual from TEveElement.
+  // Need to search for it in visual sector representations and remove
+  // it there as well.
+
+  for (Int_t i=0; i<36; ++i) {
+    if (fSec2Ds[i] == el) fSec2Ds[i] = 0;
+    if (fSec3Ds[i] == el) fSec3Ds[i] = 0;
   }
 }
 
 void AliEveTPCLoader::RemoveElementsLocal()
 {
-  for(Int_t i=0; i<36; ++i) {
+  // Local removal of all elements, virtual from TEveElement.
+  // Must remove all visual sector representations.
+
+  for (Int_t i=0; i<36; ++i) {
     fSec2Ds[i] = 0;
     fSec3Ds[i] = 0;
   }
@@ -74,6 +86,8 @@ void AliEveTPCLoader::RemoveElementsLocal()
 
 void AliEveTPCLoader::SetData(AliEveTPCData* d)
 {
+  // Set external TPC-data container. The old one is deleted.
+
   delete fData;
   fData = d;
 }
@@ -82,9 +96,14 @@ void AliEveTPCLoader::SetData(AliEveTPCData* d)
 
 void AliEveTPCLoader::OpenFile()
 {
+  // Open the raw-data file, as set in fFile data-member.
+  // Raw-reader is also created and attached to the file.
+  // First event is loaded and all sectors for which the data-exists
+  // are created.
+
   static const TEveException eH("AliEveTPCLoader::OpenFile ");
 
-  if(gSystem->AccessPathName(fFile, kReadPermission))
+  if (gSystem->AccessPathName(fFile, kReadPermission))
       throw(eH + "can not read '" + fFile + "'.");
 
   fData->DeleteAllSectors();
@@ -94,7 +113,7 @@ void AliEveTPCLoader::OpenFile()
   fEvent  = -1;
 
   fReader = new AliRawReaderRoot(fFile);
-  if(fTPCEquipementMap != "")
+  if (fTPCEquipementMap != "")
     fReader->LoadEquipmentIdsMap
       (gSystem->ExpandPathName(fTPCEquipementMap.Data()));
 
@@ -105,9 +124,11 @@ void AliEveTPCLoader::OpenFile()
 
 void AliEveTPCLoader::LoadEvent()
 {
+  // Load an event.
+
   static const TEveException eH("AliEveTPCLoader::LoadEvent ");
 
-  if(fReader == 0)
+  if (fReader == 0)
     throw(eH + "data file not opened.");
 
   printf("Now loading event %d\n", fEvent);
@@ -122,17 +143,21 @@ void AliEveTPCLoader::LoadEvent()
 
 void AliEveTPCLoader::NextEvent(Bool_t rewindOnEnd)
 {
+  // Go o the next event.
+  // When the last event is reached and rewindOnEnd is true, the file
+  // is rewound back to the first event. Otherwise an exception is thrown.
+
   static const TEveException eH("AliEveTPCLoader::NextEvent ");
 
-  if(fReader == 0)
+  if (fReader == 0)
     throw(eH + "data file not opened.");
 
-  if(fReader->NextEvent() == kTRUE) {
+  if (fReader->NextEvent() == kTRUE) {
     ++fEvent;
   } else {
-    if(fEvent == -1)
+    if (fEvent == -1)
       throw(eH + "no events available.");
-    if(rewindOnEnd) {
+    if (rewindOnEnd) {
       printf("Reached end of stream (event=%d), rewinding to first event.\n", fEvent);
       fReader->RewindEvents();
       fReader->NextEvent();
@@ -145,15 +170,17 @@ void AliEveTPCLoader::NextEvent(Bool_t rewindOnEnd)
 
 void AliEveTPCLoader::GotoEvent(Int_t event)
 {
+  // Go to specified event.
+
   static const TEveException eH("AliEveTPCLoader::GotoEvent ");
 
-  if(fReader == 0)
+  if (fReader == 0)
     throw(eH + "data file not opened.");
 
-  if(event == fEvent)
+  if (event == fEvent)
     return;
   Bool_t checkEnd;
-  if(event < fEvent) {
+  if (event < fEvent) {
     fReader->RewindEvents();
     fEvent = -1;
     checkEnd = kFALSE;
@@ -162,13 +189,17 @@ void AliEveTPCLoader::GotoEvent(Int_t event)
   }
   do {
     NextEvent();
-  } while(fEvent != event && !(checkEnd == kTRUE && fEvent == 0));
+  } while (fEvent != event && !(checkEnd == kTRUE && fEvent == 0));
   LoadEvent();
   UpdateSectors();
 }
 
 void* AliEveTPCLoader::LoopEvent(AliEveTPCLoader* loader)
 {
+  // Loop to next event on given loader. Static member to be used for
+  // external control during animations.
+  // Calls NextEvent(), LoadEvent() and UpdateSectors().
+
   loader->NextEvent();
   loader->LoadEvent();
   loader->UpdateSectors();
@@ -181,13 +212,17 @@ void* AliEveTPCLoader::LoopEvent(AliEveTPCLoader* loader)
 
 void AliEveTPCLoader::UpdateSectors(Bool_t dropNonPresent)
 {
+  // Update visual representations of sectors.
+  // If dropNonPresent is true, the sectors for which there is no data in
+  // the current event are removed.
+
   gEve->DisableRedraw();
-  for(Int_t i=0; i<=35; ++i)
+  for (Int_t i=0; i<=35; ++i)
   {
     AliEveTPCSectorData* sd = fData->GetSectorData(i);
 
     // 2D sectors
-    if(fSec2Ds[i] != 0)
+    if (fSec2Ds[i] != 0)
     {
       if (dropNonPresent && sd == 0) {
        gEve->RemoveElement(fSec2Ds[i], this);
@@ -199,16 +234,16 @@ void AliEveTPCLoader::UpdateSectors(Bool_t dropNonPresent)
     }
     else
     {
-      if(sd != 0) {
+      if (sd != 0) {
        AliEveTPCSector2D* s = new AliEveTPCSector2D(Form("Sector2D %d", i));
        fSec2Ds[i] = s;
        s->SetSectorID(i);
        s->SetDataSource(fData);
 
-       if(fDoubleSR)
+       if (fDoubleSR)
          s->SetMaxTime(1023);
 
-        if(fSetInitSectorParams) {
+        if (fSetInitSectorParams) {
           s->SetMinTime(fInitMinTime);
           s->SetMaxTime(fInitMaxTime);
           s->SetThreshold(fInitThreshold);
@@ -223,7 +258,7 @@ void AliEveTPCLoader::UpdateSectors(Bool_t dropNonPresent)
     }
 
     // 3D sectors
-    if(fSec3Ds[i] != 0)
+    if (fSec3Ds[i] != 0)
     {
       if (dropNonPresent && sd == 0) {
        gEve->RemoveElement(fSec3Ds[i], this);
@@ -240,24 +275,28 @@ void AliEveTPCLoader::UpdateSectors(Bool_t dropNonPresent)
 
 void AliEveTPCLoader::ReloadSectors()
 {
+  // Reload current event and update sectors.
+
   LoadEvent();
   UpdateSectors();
 }
 
 void AliEveTPCLoader::CreateSectors3D()
 {
+  // Create 3D representations of sectors.
+
   gEve->DisableRedraw();
-  for(Int_t i=0; i<=35; ++i) {
+  for (Int_t i=0; i<=35; ++i) {
     AliEveTPCSectorData* sd = fData->GetSectorData(i);
-    if(sd != 0 && fSec3Ds[i] == 0) {
+    if (sd != 0 && fSec3Ds[i] == 0) {
       AliEveTPCSector3D* s = new AliEveTPCSector3D(Form("Sector3D %d", i));
       fSec3Ds[i] = s;
       s->SetSectorID(i);
       s->SetDataSource(fData);
 
-      if(fDoubleSR)
+      if (fDoubleSR)
        s->SetDriftVel(2.273);
-      if(fSec2Ds[i] != 0)
+      if (fSec2Ds[i] != 0)
        s->CopyVizParams(*fSec2Ds[i]);
 
       s->SetAutoTrans(kTRUE);
@@ -271,10 +310,12 @@ void AliEveTPCLoader::CreateSectors3D()
 
 void AliEveTPCLoader::DeleteSectors3D()
 {
+  // Delete 3D representations of sectors.
+
   gEve->DisableRedraw();
-  for(Int_t i=0; i<=35; ++i) {
+  for (Int_t i=0; i<=35; ++i) {
     TEveElement* re = fSec3Ds[i];
-    if(re != 0) {
+    if (re != 0) {
       gEve->RemoveElement(re, this);
       // delete re; // Done automatically.
       fSec3Ds[i] = 0;
@@ -287,6 +328,8 @@ void AliEveTPCLoader::DeleteSectors3D()
 
 void AliEveTPCLoader::SetInitParams(Int_t mint, Int_t maxt, Int_t thr, Int_t maxval)
 {
+  // Set initial viualization parameters for 2D and 3D sector representations.
+
   fSetInitSectorParams = kTRUE;
   fInitMinTime   = mint;
   fInitMaxTime   = maxt;
index 3a7fb1d7ac244c306790fdfed32c9c97c35b48d4..577e2b3f35978caad20de3e7ed54148a594bdfec 100644 (file)
@@ -28,22 +28,22 @@ class AliEveTPCLoader : public TEveElementList
   AliEveTPCLoader& operator=(const AliEveTPCLoader&); // Not implemented
 
 protected:
-  TString           fFile;
-  Int_t             fEvent;
-  Bool_t            fDoubleSR;
+  TString           fFile;      // File holding raw-data.
+  Int_t             fEvent;     // Current event.
+  Bool_t            fDoubleSR;  // Set to true for double sampling-rate.
 
-  TString           fTPCEquipementMap;
-  AliRawReaderRoot* fReader;
-  AliEveTPCData*          fData;
+  TString           fTPCEquipementMap; // Equipement-map file-name, if set passed to raw-reader.
+  AliRawReaderRoot *fReader;           // Raw-data reader.
+  AliEveTPCData    *fData;             // TPC data container.
 
-  std::vector<AliEveTPCSector2D*> fSec2Ds;
-  std::vector<AliEveTPCSector3D*> fSec3Ds;
+  std::vector<AliEveTPCSector2D*> fSec2Ds; // 2D sector representations.
+  std::vector<AliEveTPCSector3D*> fSec3Ds; // 3D sector representations.
 
-  Bool_t   fSetInitSectorParams;
-  Int_t    fInitMinTime;
-  Int_t    fInitMaxTime;
-  Int_t    fInitThreshold;
-  Int_t    fInitMaxVal;
+  Bool_t   fSetInitSectorParams; // If true, initial parameters of 2D and 3D sectors are set from values below.
+  Int_t    fInitMinTime;         // Min time for display.
+  Int_t    fInitMaxTime;         // Max time for display.
+  Int_t    fInitThreshold;       // Threshold.
+  Int_t    fInitMaxVal;          // Maximum-signal value (all signals above mapped to saturation color).
 
 public:
   AliEveTPCLoader(const Text_t* n="AliEveTPCLoader", const Text_t* t=0);
@@ -75,7 +75,7 @@ public:
 
   void SetInitParams(Int_t mint, Int_t maxt, Int_t thr, Int_t maxval=128);
 
-  ClassDef(AliEveTPCLoader, 1);
+  ClassDef(AliEveTPCLoader, 1); // Front-end for stand-alone inspection of TPC raw-data.
 }; // endclass AliEveTPCLoader
 
 #endif
index fc10e78430c2c3ad002df907904bba99a820ce38..05c56b325b4adaab3d1e9f07ccdfd6429d26ce77 100644 (file)
@@ -28,8 +28,8 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCLoaderEditor
 //
+// Editor for AliEveTPCLoader.
 
 ClassImp(AliEveTPCLoaderEditor)
 
@@ -55,6 +55,8 @@ AliEveTPCLoaderEditor::AliEveTPCLoaderEditor(const TGWindow *p,
   fCreateSectors3D (0),
   fDeleteSectors3D (0)
 {
+  // Constructor.
+
   MakeTitle("AliEveTPCLoader");
 
   Int_t labelW;
@@ -163,13 +165,12 @@ AliEveTPCLoaderEditor::AliEveTPCLoaderEditor(const TGWindow *p,
   }
 }
 
-AliEveTPCLoaderEditor::~AliEveTPCLoaderEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCLoaderEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<AliEveTPCLoader*>(obj);
 
   // !!!! order changed, need TGTextEntry::SetText NO BLOODY EMIT.
@@ -203,6 +204,8 @@ const char *tpcfiletypes[] = {
 
 void AliEveTPCLoaderEditor::FileSelect()
 {
+  // Slot for FileSelect.
+
   TGFileInfo fi;
   fi.fIniDir    = StrDup(gSystem->DirName (fM->fFile));
   fi.fFilename  = StrDup(gSystem->BaseName(fM->fFile));
@@ -217,11 +220,15 @@ void AliEveTPCLoaderEditor::FileSelect()
 
 void AliEveTPCLoaderEditor::FileChanged()
 {
+  // Slot for FileChanged.
+
   fM->fFile = fFile->GetText();
 }
 
 void AliEveTPCLoaderEditor::DoOpen()
 {
+  // Slot for Open.
+
   fM->OpenFile();
   SetModel(fM);
 }
@@ -230,12 +237,16 @@ void AliEveTPCLoaderEditor::DoOpen()
 
 void AliEveTPCLoaderEditor::DoEvent()
 {
+  // Slot for Event.
+
   fM->GotoEvent((Int_t) fEvent->GetValue());
   SetModel(fM);
 }
 
 void AliEveTPCLoaderEditor::DoDoubleSR()
 {
+  // Slot for DoubleSR.
+
   fM->SetDoubleSR(fDoubleSR->IsOn());
   Update();
 }
@@ -244,18 +255,24 @@ void AliEveTPCLoaderEditor::DoDoubleSR()
 
 void AliEveTPCLoaderEditor::DoDataLoadThreshold()
 {
+  // Slot for DataLoadThreshold.
+
   if (fM->GetData() == 0) return;
   fM->GetData()->SetLoadThreshold((Short_t) fDataLoadThreshold->GetValue());
 }
 
 void AliEveTPCLoaderEditor::DoDataLoadPedestal()
 {
+  // Slot for DataLoadPedestal.
+
   if (fM->GetData() == 0) return;
   fM->GetData()->SetLoadPedestal((Short_t) fDataLoadPedestal->GetValue());
 }
 
 void AliEveTPCLoaderEditor::DoDataAutoPedestal()
 {
+  // Slot for DataAutoPedestal.
+
   if (fM->GetData() == 0) return;
   fM->GetData()->SetAutoPedestal(fDataAutoPedestal->IsOn());
   fDataLoadPedestal->SetEnabled(!fDataAutoPedestal->IsOn());
@@ -265,21 +282,29 @@ void AliEveTPCLoaderEditor::DoDataAutoPedestal()
 
 void AliEveTPCLoaderEditor::DoUpdateSectors()
 {
+  // Slot for UpdateSectors.
+
   fM->UpdateSectors();
 }
 
 void AliEveTPCLoaderEditor::DoReloadSectors()
 {
+  // Slot for ReloadSectors.
+
   fM->ReloadSectors();
 }
 
 void AliEveTPCLoaderEditor::DoCreateSectors3D()
 {
+  // Slot for CreateSectors3D.
+
   fM->CreateSectors3D();
 }
 
 
 void AliEveTPCLoaderEditor::DoDeleteSectors3D()
 {
+  // Slot for DeleteSectors3D.
+
   fM->DeleteSectors3D();
 }
index f536e08f3b98bdd974410e8063ab94e411de5e02..4a5513b208f72e97c42fd9ba2c2a7d954e9d4a58 100644 (file)
@@ -29,28 +29,28 @@ class AliEveTPCLoaderEditor : public TGedFrame
   AliEveTPCLoaderEditor& operator=(const AliEveTPCLoaderEditor&); // Not implemented
 
 protected:
-  AliEveTPCLoader* fM; // fModel dynamic-casted to AliEveTPCLoaderEditor
+  AliEveTPCLoader *fM;                  // Model object.
 
-  TGTextEntry*  fFile;
-  TGTextButton* fOpenFile;
+  TGTextEntry     *fFile;               // Text entry for file-name.
+  TGTextButton    *fOpenFile;           // Button to open the file.
 
-  TEveGValuator* fEvent;
-  TGCheckButton*    fDoubleSR;
+  TEveGValuator   *fEvent;              // Valueator for event number.
+  TGCheckButton   *fDoubleSR;           // Check-box for double sampling-rate.
 
   // AliEveTPCData loading settings
-  TEveGValuator* fDataLoadThreshold;
-  TEveGValuator* fDataLoadPedestal;
-  TGCheckButton*    fDataAutoPedestal;
+  TEveGValuator   *fDataLoadThreshold;  // Valuator for threshold.
+  TEveGValuator   *fDataLoadPedestal;   // Valuator for pedestal.
+  TGCheckButton   *fDataAutoPedestal;   // Check-box for auto pedestal.
 
-  TGTextButton* fUpdateSectors;
-  TGTextButton* fReloadSectors;
-  TGTextButton* fCreateSectors3D;
-  TGTextButton* fDeleteSectors3D;
+  TGTextButton    *fUpdateSectors;      // Button to update sectors.
+  TGTextButton    *fReloadSectors;      // Button to reload sectors.
+  TGTextButton    *fCreateSectors3D;    // Button to create 3D sectors.
+  TGTextButton    *fDeleteSectors3D;    // Button to delete 3D sectors.
 
 public:
   AliEveTPCLoaderEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
-                 UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  ~AliEveTPCLoaderEditor();
+                        UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTPCLoaderEditor() {}
 
   virtual void SetModel(TObject* obj);
 
@@ -70,7 +70,7 @@ public:
   void DoCreateSectors3D();
   void DoDeleteSectors3D();
 
-  ClassDef(AliEveTPCLoaderEditor, 0); // Editor for AliEveTPCLoader
+  ClassDef(AliEveTPCLoaderEditor, 0); // Editor for AliEveTPCLoader.
 }; // endclass AliEveTPCLoaderEditor
 
 #endif
index 46c3d5012fd116b22fae0dcf95cf2e0b281c9725..aed7fbca0f0f9b1a5fc8cf8224aac7884702a534 100644 (file)
@@ -54,19 +54,22 @@ AliEveTPCSector2D::AliEveTPCSector2D(const Text_t* n, const Text_t* t) :
   fUseTexture (kTRUE),
   fPickEmpty  (kFALSE),
   fPickMode   (1)
-{}
-
-AliEveTPCSector2D::~AliEveTPCSector2D()
-{}
+{
+  // Constructor.
+}
 
 /******************************************************************************/
 
 void AliEveTPCSector2D::MakeSector3D()
 {
+  // Make a 3D sector with same setting as this one.
+  // It is added as a child ot this object.
+
   AliEveTPCSector3D* s = new AliEveTPCSector3D;
   s->SetDataSource(fTPCData);
   s->SetSectorID(fSectorID);
   s->SetAutoTrans(fAutoTrans);
+  s->CopyVizParams(*this);
   gEve->AddElement(s, this);
   gEve->Redraw3D();
 }
@@ -75,6 +78,8 @@ void AliEveTPCSector2D::MakeSector3D()
 
 void AliEveTPCSector2D::ComputeBBox()
 {
+  // Compute boundig-box.
+
   const AliEveTPCSectorData::SegmentInfo&  iSeg = AliEveTPCSectorData::GetInnSeg();
   const AliEveTPCSectorData::SegmentInfo& o2Seg = AliEveTPCSectorData::GetOut2Seg();
 
@@ -154,6 +159,8 @@ void AliEveTPCSector2D::PadSelected(Int_t row, Int_t pad)
 
 void AliEveTPCSector2D::Paint(Option_t* )
 {
+  // Paint object.
+
   if(fRnrSelf == kFALSE)
     return;
 
index e5fd0958c365f58428433b27b562ede3ac321d58..82b401f9380e297a041c19f49436021eb5efa3fc 100644 (file)
@@ -22,16 +22,16 @@ class AliEveTPCSector2D : public AliEveTPCSectorViz
   friend class AliEveTPCSector2DEditor;
 
 protected:
-  Bool_t      fShowMax;
-  Bool_t      fAverage;
+  Bool_t      fShowMax;    // Show maximum signal-value in time range.
+  Bool_t      fAverage;    // Show average signal value in time range.
 
-  Bool_t      fUseTexture;
-  Bool_t      fPickEmpty;
-  Int_t       fPickMode;  // 0-print, 1-1dhisto of pad, 2-2dhisto of padrow
+  Bool_t      fUseTexture; // Use texture to draw each segment.
+  Bool_t      fPickEmpty;  // Pick also empty pads.
+  Int_t       fPickMode;   // Pick mode: 0-print, 1-1dhisto of pad, 2-2dhisto of padrow.
 
 public:
   AliEveTPCSector2D(const Text_t* n="AliEveTPCSector2D", const Text_t* t=0);
-  virtual ~AliEveTPCSector2D();
+  virtual ~AliEveTPCSector2D() {}
 
   void SetShowMax(Bool_t sm)  { fShowMax  = sm;  IncRTS(); }
   void SetAverage(Bool_t avg) { fAverage  = avg; IncRTS(); }
@@ -47,7 +47,7 @@ public:
 
   virtual void Paint(Option_t* option="");
 
-  ClassDef(AliEveTPCSector2D, 1); // Visualization of TPC raw-data in 2D
+  ClassDef(AliEveTPCSector2D, 1); // Visualization of TPC raw-data in 2D.
 }; // endclass AliEveTPCSector2D
 
 #endif
index 0f00efe1423d3fb7932e3df280d69b50214cb680..ad0de3027b515f8abd7b7fe10b7d2ad774d4b99d 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,13 +69,12 @@ AliEveTPCSector2DEditor::AliEveTPCSector2DEditor(const TGWindow *p,
   }
 }
 
-AliEveTPCSector2DEditor::~AliEveTPCSector2DEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCSector2DEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<AliEveTPCSector2D*>(obj);
 
   fShowMax->SetState(fM->fShowMax ? kButtonDown : kButtonUp);
@@ -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();
 }
index 2eff2ff1e2ad72f1cfa6c99b1d2923c3770c4bdb..f0527e2fb59adb96c1b1cbdd09af3ef62cd4bec1 100644 (file)
@@ -24,19 +24,19 @@ class AliEveTPCSector2DEditor : public TGedFrame
   AliEveTPCSector2DEditor& operator=(const AliEveTPCSector2DEditor&); // Not implemented
 
 protected:
-  AliEveTPCSector2D* fM; // fModel dynamic-casted to AliEveTPCSector2DEditor
+  AliEveTPCSector2D *fM;            // Model object.
 
-  TGCheckButton*   fShowMax;
-  TGCheckButton*   fAverage;
+  TGCheckButton     *fShowMax;      // Check to show maximum signal.
+  TGCheckButton     *fAverage;      // Check-box to show average of the signal.
 
-  TGCheckButton*   fUseTexture;
-  TGCheckButton*   fPickEmpty;
-  TGComboBox*      fPickMode;
+  TGCheckButton     *fUseTexture;   // Check-box to use texture.
+  TGCheckButton     *fPickEmpty;    // Check-box for picking of empty pads.
+  TGComboBox        *fPickMode;     // Selector of pick-mode.
 
 public:
   AliEveTPCSector2DEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
                    UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  ~AliEveTPCSector2DEditor();
+  ~AliEveTPCSector2DEditor() {}
 
   virtual void SetModel(TObject* obj);
 
@@ -48,7 +48,7 @@ public:
   void DoPickEmpty();
   void DoPickMode(Int_t mode);
 
-  ClassDef(AliEveTPCSector2DEditor, 0); // Editor for AliEveTPCSector2D
+  ClassDef(AliEveTPCSector2DEditor, 0); // Editor for AliEveTPCSector2D.
 }; // endclass AliEveTPCSector2DEditor
 
 #endif
index 716152cf0c91ee7bb4096f98c3cf645650818c0d..28346e64546853dda8b0fe1c0b7f08f2d026fc76 100644 (file)
 #include <TGLSelectRecord.h>
 #include <TGLIncludes.h>
 
-using namespace std;
-
 //______________________________________________________________________________
-// AliEveTPCSector2DGL
 //
+// GL renderer for TPCSector2D.
 
 ClassImp(AliEveTPCSector2DGL)
 
@@ -40,19 +38,26 @@ AliEveTPCSector2DGL::AliEveTPCSector2DGL() :
   fImage   (0),
   fTexture (0),
   fRTS     (0)
-{}
+{
+  // Constructor.
+}
 
 AliEveTPCSector2DGL::~AliEveTPCSector2DGL()
 {
-  if(fImage)   delete fImage;
-  if(fTexture) glDeleteTextures(1, &fTexture);
+  // Destructor.
+  // !!!! Should unregister texture via ContextIdentity!
+
+  if (fImage)   delete fImage;
+  if (fTexture) glDeleteTextures(1, &fTexture);
 }
 
 /******************************************************************************/
 
 Bool_t AliEveTPCSector2DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 {
-  if(SetModelCheckClass(obj, AliEveTPCSector2D::Class())) {
+  // Set model object.
+
+  if (SetModelCheckClass(obj, AliEveTPCSector2D::Class())) {
     fSector = (AliEveTPCSector2D*) fExternalObj;
     return kTRUE;
   }
@@ -61,14 +66,19 @@ Bool_t AliEveTPCSector2DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 
 void AliEveTPCSector2DGL::SetBBox()
 {
+  // Set bounding-box.
+
   SetAxisAlignedBBox(((AliEveTPCSector2D*)fExternalObj)->AssertBBox());
 }
 
 /******************************************************************************/
 
 void AliEveTPCSector2DGL::ProcessSelection(TGLRnrCtx       & /*rnrCtx*/,
-                                    TGLSelectRecord & rec)
+                                           TGLSelectRecord & rec)
 {
+  // Process selection record.
+  // Determine row and pad, call PadSelected() in model object.
+
   if (rec.GetN() != 3) return;
   Int_t row = rec.GetItem(1);
   Int_t pad = rec.GetItem(2);
@@ -152,8 +162,10 @@ void AliEveTPCSector2DGL::DirectDraw(TGLRnrCtx& rnrCtx) const
 /******************************************************************************/
 
 void AliEveTPCSector2DGL::LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
-                              Int_t row, Int_t col_off) const
+                                     Int_t row, Int_t col_off) const
 {
+  // Load data for one pad-row into the texture.
+
   Int_t    padVal;
   Int_t    time, val;
 
@@ -198,6 +210,8 @@ void AliEveTPCSector2DGL::LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
 
 void AliEveTPCSector2DGL::CreateTexture() const
 {
+  // Create texture that holds pad data.
+
   if (fImage == 0 ) {
     fImage = new UChar_t[fgkTextureByteSize];
     glGenTextures(1, &fTexture);
@@ -244,8 +258,10 @@ void AliEveTPCSector2DGL::CreateTexture() const
 /******************************************************************************/
 
 void AliEveTPCSector2DGL::DisplayTexture(const AliEveTPCSectorData::SegmentInfo& seg,
-                                   Int_t startCol, Int_t startRow) const
+                                         Int_t startCol, Int_t startRow) const
 {
+  // Display segment data via one textured rectangle.
+
   Float_t w  = seg.GetNMaxPads()*seg.GetPadWidth()/2;
   Float_t y1 = seg.GetRLow();
   Float_t y2 = y1 + seg.GetNRows()*seg.GetPadHeight();
@@ -266,8 +282,10 @@ void AliEveTPCSector2DGL::DisplayTexture(const AliEveTPCSectorData::SegmentInfo&
 /******************************************************************************/
 
 void AliEveTPCSector2DGL::DisplayQuads(const AliEveTPCSectorData::SegmentInfo& seg,
-                                 Int_t startCol, Int_t startRow) const
+                                       Int_t startCol, Int_t startRow) const
 {
+  // Display segment data by rendering one quad per pad.
+
   Float_t y_d, y_u;
   Float_t x_off, x;
   Float_t padW = seg.GetPadWidth();
@@ -297,8 +315,11 @@ void AliEveTPCSector2DGL::DisplayQuads(const AliEveTPCSectorData::SegmentInfo& s
 }
 
 void AliEveTPCSector2DGL::DisplayNamedQuads(const AliEveTPCSectorData::SegmentInfo& seg,
-                                     Int_t startCol, Int_t startRow) const
+                                            Int_t startCol, Int_t startRow) const
 {
+  // Display segmen data as one quad per pad.
+  // Tag the rows and pads for selection.
+
   Float_t y_d, y_u;
   Float_t x_off, x;
   Float_t padW = seg.GetPadWidth();
@@ -338,6 +359,8 @@ void AliEveTPCSector2DGL::DisplayNamedQuads(const AliEveTPCSectorData::SegmentIn
 
 void AliEveTPCSector2DGL::TraceStepsUp(const AliEveTPCSectorData::SegmentInfo& s)
 {
+  // Trace border of segment upwards.
+
   Float_t x = -(s.GetNMaxPads()*1.0/2 - s.GetNYSteps())*s.GetPadWidth();
   Float_t y  = s.GetRLow();
   glVertex2f(x, y);
@@ -353,6 +376,8 @@ void AliEveTPCSector2DGL::TraceStepsUp(const AliEveTPCSectorData::SegmentInfo& s
 
 void AliEveTPCSector2DGL::TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s)
 {
+  // Trace border of segment downwards.
+
   Float_t x = s.GetNMaxPads()*s.GetPadWidth()/2;
   Float_t y = s.GetRLow() + s.GetNRows()*s.GetPadHeight();
   glVertex2f(x, y);
@@ -368,6 +393,9 @@ void AliEveTPCSector2DGL::TraceStepsDown(const AliEveTPCSectorData::SegmentInfo&
 
 void AliEveTPCSector2DGL::DisplayFrame() const
 {
+  // Display frame of the sector.
+  // Each segment's frame is drawn only if its data is drawn, too.
+
   UChar_t col[4];
   TEveUtil::TEveUtil::ColorFromIdx(fSector->fFrameColor, col);
   glColor4ubv(col);
index b8cf4970971a8f55833efb242a8bd87227f744e9..aac4387669f23464992bd938072369a31712b1d7 100644 (file)
@@ -40,12 +40,12 @@ protected:
 
   UChar_t* GetRowCol(Int_t row, Int_t col) const;
 
-  AliEveTPCSector2D*                 fSector;
-  mutable AliEveTPCSectorData*       fSectorData;
+  AliEveTPCSector2D              *fSector;     // Model object.
+  mutable AliEveTPCSectorData    *fSectorData; // Data of displayed sector.
 
-  mutable UChar_t*             fImage;
-  mutable UInt_t               fTexture;
-  mutable UInt_t               fRTS;
+  mutable UChar_t                *fImage;      // Texture data.
+  mutable UInt_t                  fTexture;    // Texture id.
+  mutable UInt_t                  fRTS;        // Render time-stamp.
 
 public:
   AliEveTPCSector2DGL();
@@ -60,11 +60,12 @@ public:
   static void TraceStepsUp  (const AliEveTPCSectorData::SegmentInfo& s);
   static void TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s);
 
-  static const Int_t fgkTextureWidth;
-  static const Int_t fgkTextureHeight;
-  static const Int_t fgkTextureByteSize;
+  static const Int_t fgkTextureWidth;     // Width of the texture.
+  static const Int_t fgkTextureHeight;    // Height of the texture.
+  static const Int_t fgkTextureByteSize;  // Size of the texture in bytes.
 
-}; // endclass TPCSector2D_GL_Rnr
+  ClassDef(AliEveTPCSector2DGL, 0); // GL renderer for TPCSector2D.
+};
 
 
 inline UChar_t* AliEveTPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
index 5194eb5e70a4438dc64befe58840bf3b81c8d330..dfb94e162e1999c57a9138e3b3a634df6f8f41b2 100644 (file)
@@ -20,8 +20,8 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCSector3D
 //
+// Visualization of TPC raw-data in 3D.
 
 ClassImp(AliEveTPCSector3D)
 
@@ -39,17 +39,18 @@ AliEveTPCSector3D::AliEveTPCSector3D(const Text_t* n, const Text_t* t) :
   fDriftVel  (1),
   fZStep     (250.0/450)
 {
+  // Constructor.
+
   fRnrFrame = kFALSE;
   ComputeBBox();
 }
 
-AliEveTPCSector3D::~AliEveTPCSector3D()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCSector3D::SetRnrFrame(Bool_t rf)
 {
+  // Setter for fRnrFrame.
+
   if(fRnrFrame != rf) {
     fRnrFrame = rf;
     IncRTS();
@@ -60,6 +61,8 @@ void AliEveTPCSector3D::SetRnrFrame(Bool_t rf)
 
 void AliEveTPCSector3D::ComputeBBox()
 {
+  // Compute bounding box containing whole sector.
+
   const AliEveTPCSectorData::SegmentInfo&  iSeg = AliEveTPCSectorData::GetInnSeg();
   const AliEveTPCSectorData::SegmentInfo& o2Seg = AliEveTPCSectorData::GetOut2Seg();
 
@@ -79,6 +82,8 @@ void AliEveTPCSector3D::ComputeBBox()
 
 void AliEveTPCSector3D::Paint(Option_t* /*option*/)
 {
+  // Paint object.
+
   if(fRnrSelf == kFALSE)
     return;
 
@@ -105,6 +110,8 @@ void AliEveTPCSector3D::Paint(Option_t* /*option*/)
 void AliEveTPCSector3D::LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
                              Float_t xs, Float_t ys, Float_t pw, Float_t ph)
 {
+  // Load data of one padrow. Fill internal boxset and pointset objects.
+
   Short_t pad, time, val;
   Float_t x0, z0;
   Float_t ym = ys + 0.5*ph;
@@ -136,9 +143,9 @@ void AliEveTPCSector3D::LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
   }
 }
 
-void AliEveTPCSector3D::UpdateBoxes()
+void AliEveTPCSector3D::UpdateBoxesAndPoints()
 {
-  // Populate parent class TEveBoxSet with digit information.
+  // Populate BoxSet and PointSet with digit information.
 
   // printf("AliEveTPCSector3D update boxes\n");
 
@@ -170,20 +177,22 @@ void AliEveTPCSector3D::UpdateBoxes()
     }
 
     fBoxSet.RefitPlex();
-    if(fPointSetOn)
+    if (fPointSetOn)
       fPointSetArray.CloseBins();
   }
 }
 
 void AliEveTPCSector3D::SetupPointSetArray()
 {
-  Int_t   nBins = (Int_t) TMath::Nint(fPointFrac*gStyle->GetNumberOfColors());
-  if(nBins > 0) {
+  // Setup fPointSetArray for current settings.
+
+  Int_t nBins = (Int_t) TMath::Nint(fPointFrac*gStyle->GetNumberOfColors());
+  if (nBins > 0) {
     fPointSetOn = kTRUE;
     fPointSetMaxVal = fThreshold + (Int_t) TMath::Nint(fPointFrac*(fMaxVal - fThreshold));
     // printf("SetupPointSetArray frac=%f nbins=%d psmv=%d (%d,%d)\n", fPointFrac, nBins, fPointSetMaxVal, fThreshold, fMaxVal);
     fPointSetArray.InitBins("", nBins, fThreshold, fPointSetMaxVal, kFALSE);
-    for(Int_t b=0; b<nBins; ++b) {
+    for (Int_t b=0; b<nBins; ++b) {
       fPointSetArray.GetBin(b)->SetMarkerColor(gStyle->GetColorPalette(b));
     }
   } else {
index 9cf80360c22059f8d70d678cd097f0ae6e3611a8..a46f5a7a8e978567b2b617d1d9b8bb775eff8061 100644 (file)
@@ -25,22 +25,22 @@ class AliEveTPCSector3D : public AliEveTPCSectorViz
 protected:
   void LoadPadrow(AliEveTPCSectorData::RowIterator& iter,
                   Float_t sx, Float_t sy, Float_t pw, Float_t ph);
-  void UpdateBoxes();
+  void UpdateBoxesAndPoints();
   void SetupPointSetArray();
 
-  TEveBoxSet        fBoxSet;
-  TEvePointSetArray fPointSetArray;
-  Float_t             fPointFrac;
-  Float_t             fPointSize;
-  Bool_t              fPointSetOn;
-  Int_t               fPointSetMaxVal;
+  TEveBoxSet          fBoxSet;          // BoxSet used to display digits as boxes.
+  TEvePointSetArray   fPointSetArray;   // PointSet used to display digits as points.
+  Float_t             fPointFrac;       // Fraction of signal range shown as points.
+  Float_t             fPointSize;       // Point size.
+  Bool_t              fPointSetOn;      // PointSet initialized.
+  Int_t               fPointSetMaxVal;  // Maximum signal value for data in pointset.
 
-  Float_t             fDriftVel;
-  Float_t             fZStep;
+  Float_t             fDriftVel;        // Drift velocity for 'z' coordinate.
+  Float_t             fZStep;           // Z width of a time-bin.
 
 public:
   AliEveTPCSector3D(const Text_t* n="AliEveTPCSector3D", const Text_t* t=0);
-  virtual ~AliEveTPCSector3D();
+  virtual ~AliEveTPCSector3D() {}
 
   void SetPointFrac(Float_t f) { fPointFrac = f; IncRTS(); }
   void SetPointSize(Float_t s) { fPointSize = s; }
@@ -53,7 +53,7 @@ public:
   virtual void ComputeBBox();
   virtual void Paint(Option_t* option="");
 
-  ClassDef(AliEveTPCSector3D, 1);
-}; // endclass AliEveTPCSector3D
+  ClassDef(AliEveTPCSector3D, 1); // Visualization of TPC raw-data in 3D.
+};
 
 #endif
index 438af3d2d8071aa86e8c989b34f3a86090a4c01f..5f83c8c6a535e31b4f483d5555fe0693789a056f 100644 (file)
 
 
 //______________________________________________________________________________
-// AliEveTPCSector3DEditor
 //
+// Editor for AliEveTPCSector3D.
 
 ClassImp(AliEveTPCSector3DEditor)
 
 AliEveTPCSector3DEditor::AliEveTPCSector3DEditor(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),
   fRnrFrame(0), fDriftVel(0), fPointFrac(0), fPointSize(0)
 {
+  // Constructor.
+
   MakeTitle("AliEveTPCSector3D");
 
   Int_t labelW = 60;
@@ -80,13 +82,12 @@ AliEveTPCSector3DEditor::AliEveTPCSector3DEditor(const TGWindow *p,
   AddFrame(fPointSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
 }
 
-AliEveTPCSector3DEditor::~AliEveTPCSector3DEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCSector3DEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<AliEveTPCSector3D*>(obj);
 
   fRnrFrame->SetState(fM->fRnrFrame ? kButtonDown : kButtonUp);
@@ -100,24 +101,32 @@ void AliEveTPCSector3DEditor::SetModel(TObject* obj)
 
 void AliEveTPCSector3DEditor::DoRnrFrame()
 {
+  // Slot for RnrFrame.
+
   fM->SetRnrFrame(fRnrFrame->IsOn());
   Update();
 }
 
 void AliEveTPCSector3DEditor::DoDriftVel()
 {
+  // Slot for DriftVel.
+
   fM->SetDriftVel(fDriftVel->GetValue());
   Update();
 }
 
 void AliEveTPCSector3DEditor::DoPointFrac()
 {
+  // Slot for PointFrac.
+
   fM->SetPointFrac(fPointFrac->GetValue());
   Update();
 }
 
 void AliEveTPCSector3DEditor::DoPointSize()
 {
+  // Slot for PointSize.
+
   fM->SetPointSize(fPointSize->GetValue());
   Update();
 }
index dd989a921d7f1ba2bbcda9d43c6c3fb612507449..e33d4c380fc70e34df1c7ea6e6cea9d0dc58c52e 100644 (file)
@@ -28,18 +28,18 @@ class AliEveTPCSector3DEditor : public TGedFrame
   AliEveTPCSector3DEditor& operator=(const AliEveTPCSector3DEditor&); // Not implemented
 
 protected:
-  AliEveTPCSector3D*      fM; // fModel dynamic-casted to AliEveTPCSector3DEditor
+  AliEveTPCSector3D   *fM;         // Model object.
 
-  TGCheckButton*    fRnrFrame;
-  TEveGValuator* fDriftVel;
+  TGCheckButton       *fRnrFrame;  // Check-box for frame rendering.
+  TEveGValuator       *fDriftVel;  // Valuator for drift velocity.
 
-  TEveGValuator* fPointFrac;
-  TEveGValuator* fPointSize;
+  TEveGValuator       *fPointFrac; // Valuator for signal fraction displayed as points.
+  TEveGValuator       *fPointSize; // Size of point in GL.
 
 public:
   AliEveTPCSector3DEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
                    UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  virtual ~AliEveTPCSector3DEditor();
+  virtual ~AliEveTPCSector3DEditor() {}
 
   virtual void SetModel(TObject* obj);
 
@@ -49,7 +49,7 @@ public:
   void DoPointFrac();
   void DoPointSize();
 
-  ClassDef(AliEveTPCSector3DEditor, 0); // Editor for AliEveTPCSector3D
+  ClassDef(AliEveTPCSector3DEditor, 0); // Editor for AliEveTPCSector3D.
 }; // endclass AliEveTPCSector3DEditor
 
 #endif
index 487073543f0a079d252dbbd239185366f2cbe2f0..f49e8eb54fa19c9f296b0fd1d6c75c4a3a9fe61a 100644 (file)
@@ -18,8 +18,8 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCSector3DGL
 //
+// GL renderer for AliEveTPCSector3D.
 
 ClassImp(AliEveTPCSector3DGL)
 
@@ -28,11 +28,15 @@ AliEveTPCSector3DGL::AliEveTPCSector3DGL() :
   fSector(0), fBoxRnr(0),
   fRTS(0)
 {
+  // Constructor.
+
   // fDLCache = false; // Disable display list.
 }
 
 AliEveTPCSector3DGL::~AliEveTPCSector3DGL()
 {
+  // Destructor.
+
   delete fBoxRnr;
 }
 
@@ -55,6 +59,8 @@ Short_t AliEveTPCSector3DGL::QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD
 
 Bool_t AliEveTPCSector3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 {
+  // Set model object.
+
   if(SetModelCheckClass(obj, AliEveTPCSector3D::Class())) {
     fSector = (AliEveTPCSector3D*) fExternalObj;
     if(fBoxRnr == 0) {
@@ -68,6 +74,8 @@ Bool_t AliEveTPCSector3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 
 void AliEveTPCSector3DGL::SetBBox()
 {
+  // Set bounding-box.
+
   SetAxisAlignedBBox(((AliEveTPCSector3D*)fExternalObj)->AssertBBox());
 }
 
@@ -75,10 +83,12 @@ void AliEveTPCSector3DGL::SetBBox()
 
 void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 {
+  // Render object.
+
   // printf("AliEveTPCSector3DGL::DirectDraw Style %d, LOD %d\n", rnrCtx.Style(), rnrCtx.LOD());
 
   if(fRTS < fSector->fRTS) {
-    fSector->UpdateBoxes();
+    fSector->UpdateBoxesAndPoints();
     fRTS = fSector->fRTS;
   }
 
@@ -140,8 +150,10 @@ void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 }
 
 void AliEveTPCSector3DGL::DrawSegmentFrame(const AliEveTPCSectorData::SegmentInfo& s,
-                                     Int_t botExtraPads, Int_t topExtraPads) const
+                                           Int_t botExtraPads, Int_t topExtraPads) const
 {
+  // Draw frame of given segment.
+
   Float_t xl, xh, yl, yh, zl, zh;
   xl = 0.5*s.GetPadWidth()*(AliEveTPCSectorData::GetNPadsInRow(s.GetFirstRow()) + botExtraPads);
   xh = 0.5*s.GetPadWidth()*(AliEveTPCSectorData::GetNPadsInRow(s.GetLastRow())  + topExtraPads);
index 453f57cca44dca27f155ed231f0863cb58165595..007ee4ef4e2aa2ed4047cb9bf0328f1e1324e05c 100644 (file)
@@ -25,10 +25,10 @@ class AliEveTPCSector3DGL : public TGLObject
   AliEveTPCSector3DGL& operator=(const AliEveTPCSector3DGL&); // Not implemented
 
 protected:
-  AliEveTPCSector3D*    fSector; // fModel dynamic-casted to AliEveTPCSector3DGL
-  TEveBoxSetGL* fBoxRnr;
+  AliEveTPCSector3D  *fSector; // Model object.
+  TEveBoxSetGL       *fBoxRnr; // Box-set GL renderer.
 
-  mutable UInt_t  fRTS;
+  mutable UInt_t      fRTS;    // Rendering time-stamp.
 
   virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
 
@@ -49,7 +49,7 @@ public:
   virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
   virtual void   ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
 
-  ClassDef(AliEveTPCSector3DGL, 0);
+  ClassDef(AliEveTPCSector3DGL, 0); // GL renderer for AliEveTPCSector3D.
 }; // endclass AliEveTPCSector3DGL
 
 #endif
index b771b602a125ae57280af0baf136a8d208c4f947..58c4ec44536e2dacd518c9848ff8ef485c27d716 100644 (file)
@@ -13,7 +13,6 @@
 #include <string.h>
 
 //______________________________________________________________________________
-// AliEveTPCSectorData
 //
 // Stores data from a fiven TPC sector.
 //
 // inner/outer segments. The SegmentInfo objects can be used to get
 // information about low-level segments.
 //
-// A lot of TPC-sector information is stored as static data.
+// A lot of TPC-sector geometry information is stored as static data.
 //
 // For accessing data, see for example AliEveTPCSector2DGL::CreateTexture()
 // and LoadPadrow().
 //
 
-
 ClassImp(AliEveTPCSectorData)
 
 AliTPCParam* AliEveTPCSectorData::fgParam    = 0;
@@ -46,20 +44,22 @@ AliEveTPCSectorData::SegmentInfo* AliEveTPCSectorData::fgSegInfoPtrs[3] = {0};
 
 void AliEveTPCSectorData::InitStatics()
 {
-  if(fgParam != 0) return;
+  // Initialize static variables.
+
+  if (fgParam != 0) return;
 
   fgParam    = new AliTPCParamSR;
-  fgZLength  = fgParam->GetZLength(0)+0.275;
-  fgNAllRows = fgParam->GetNRowLow() + fgParam->GetNRowUp();
+  fgZLength  = fgParam->GetZLength(0) + 0.275;
+  fgNAllRows = fgParam->GetNRowLow()  + fgParam->GetNRowUp();
   fgNAllPads = 0;
   fgRowBegs  = new Int_t[fgNAllRows + 1];
 
   Int_t row = 0;
-  for(Int_t i=0; i<fgParam->GetNRowLow(); ++i, ++row) {
+  for (Int_t i=0; i<fgParam->GetNRowLow(); ++i, ++row) {
     fgRowBegs[row] = fgNAllPads;
     fgNAllPads += fgParam->GetNPadsLow(i);
   }
-  for(Int_t i=0; i<fgParam->GetNRowUp(); ++i, ++row) {
+  for (Int_t i=0; i<fgParam->GetNRowUp(); ++i, ++row) {
     fgRowBegs[row] = fgNAllPads;
     fgNAllPads += fgParam->GetNPadsUp(i);
   }
@@ -132,12 +132,17 @@ void AliEveTPCSectorData::InitStatics()
 
 Int_t AliEveTPCSectorData::GetNPadsInRow(Int_t row)
 {
+  // Return number of pads in given row.
+
   if(row < 0 || row >= fgNAllRows) return 0;
   return fgRowBegs[row + 1] - fgRowBegs[row];
 }
 
 const AliEveTPCSectorData::SegmentInfo& AliEveTPCSectorData::GetSeg(Int_t seg)
 {
+  // Return reference to segment geometry information.
+  // 0 ~ inner, 1 ~ middle, 2 ~ outer.
+
   static const SegmentInfo null;
 
   if(seg < 0 || seg > 2)
@@ -152,6 +157,8 @@ const AliEveTPCSectorData::SegmentInfo& AliEveTPCSectorData::GetSeg(Int_t seg)
 
 void AliEveTPCSectorData::NewBlock()
 {
+  // Create new data-block. Position is set to the beginning.
+
   fBlocks.push_back(new Short_t[fBlockSize]);
   fBlockPos = 0;
 }
@@ -164,6 +171,8 @@ AliEveTPCSectorData::AliEveTPCSectorData(Int_t sector, Int_t bsize) :
   fCurrentRow(0), fCurrentPad(0), fCurrentPos(0), fCurrentStep(0),
   fPadRowHackSet(0)
 {
+  // Constructor.
+
   if(fgParam == 0) InitStatics();
 
   fPads.assign(fgNAllPads, PadData());
@@ -174,6 +183,8 @@ AliEveTPCSectorData::AliEveTPCSectorData(Int_t sector, Int_t bsize) :
 
 AliEveTPCSectorData::~AliEveTPCSectorData()
 {
+  // Destructor.
+
   for(std::vector<Short_t*>::iterator b=fBlocks.begin(); b!=fBlocks.end(); ++b)
     delete [] *b;
   DeletePadRowHack();
@@ -181,6 +192,8 @@ AliEveTPCSectorData::~AliEveTPCSectorData()
 
 void AliEveTPCSectorData::DropData()
 {
+  // Drop data, deallocate data-blocks.
+
   fPads.assign(fgNAllPads, PadData());
   for(std::vector<Short_t*>::iterator b=fBlocks.begin(); b!=fBlocks.end(); ++b)
     delete [] *b;
@@ -192,6 +205,8 @@ void AliEveTPCSectorData::DropData()
 
 void AliEveTPCSectorData::Print(Option_t* /*opt*/) const
 {
+  // Print summary information.
+
   printf("AliEveTPCSectorData sector=%d, NPadsFilled=%d, NBlocks=%d, BlockPos=%d\n",
         fSectorID, fNPadsFilled, fBlocks.size(), fBlockPos);
 }
@@ -200,6 +215,8 @@ void AliEveTPCSectorData::Print(Option_t* /*opt*/) const
 
 void AliEveTPCSectorData::BeginPad(Int_t row, Int_t pad, Bool_t reverseTime)
 {
+  // Begin filling of pad-data as specified with arguments.
+
   fCurrentRow = row;
   fCurrentPad = pad;
   if(reverseTime) {
@@ -216,8 +233,11 @@ void AliEveTPCSectorData::BeginPad(Int_t row, Int_t pad, Bool_t reverseTime)
 
 void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
 {
+  // End filling of pad-data. At this point data is compressed and moved
+  // into the cuurent position in memory block.
+
   Short_t *beg, *end;
-  if(fCurrentStep > 0) {
+  if (fCurrentStep > 0) {
     beg = fPadBuffer;
     end = fPadBuffer + fCurrentPos;
   } else {
@@ -228,10 +248,10 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
   //printf("endpad for row=%d pad=%d\n  buf=%p beg=%p end=%p pos=%d step=%d\n",
   //     fCurrentRow, fCurrentPad,
   //     fPadBuffer, beg, end, fCurrentPos, fCurrentStep);
-  if(beg >= end)
+  if (beg >= end)
     return;
 
-  if(autoPedestal) {
+  if (autoPedestal) {
     Short_t array[1024];
     Short_t* val;
     val = beg + 1;
@@ -241,14 +261,14 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
     }
     Short_t pedestal = TMath::Nint(TMath::Median((end-beg)/2, array));
     val = beg + 1;
-    while(val <= end) {
+    while (val <= end) {
       *val -= pedestal;
       val += 2;
     }
     Short_t* wpos = beg;
     Short_t* rpos = beg;
-    while(rpos < end) {
-      if(rpos[1] >= threshold) {
+    while (rpos < end) {
+      if (rpos[1] >= threshold) {
        wpos[0] = rpos[0];
        wpos[1] = rpos[1];
        wpos += 2;
@@ -262,17 +282,17 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
   Short_t* rpos = beg;
 
   // Compress pad buffer
-  while(rpos < end) {
+  while (rpos < end) {
     Short_t* spos = rpos;
     Short_t  t    = spos[0];
-    while(true) {
+    while (true) {
       rpos += 2;
       if(rpos >= end || *rpos > t + 1 || t == 0)
        break;
       ++t;
     }
     Short_t n = t - spos[0] + 1;
-    if(n == 1) {
+    if (n == 1) {
       wpos[0] = -spos[0];
       wpos[1] =  spos[1];
       wpos += 2;
@@ -281,7 +301,7 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
       wpos[2] = spos[1];
       wpos[1] = n;
       wpos += 3; spos += 3;
-      while(--n) {
+      while (--n) {
        *wpos = *spos;
        ++wpos; spos += 2;
       }
@@ -289,9 +309,9 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
   }
 
   // Copy buffer to storage, set PadData
-  if(wpos > beg) {
+  if (wpos > beg) {
     Short_t len = wpos - beg;
-    if(len > fBlockSize - fBlockPos)
+    if (len > fBlockSize - fBlockPos)
       NewBlock();
     Short_t *dest = fBlocks.back() + fBlockPos;
     memcpy(dest, beg, len*sizeof(Short_t));
@@ -308,6 +328,8 @@ void AliEveTPCSectorData::EndPad(Bool_t autoPedestal, Short_t threshold)
 
 const AliEveTPCSectorData::PadData& AliEveTPCSectorData::GetPadData(Int_t padAddr)
 {
+  // Get pad-data reference by absolute index.
+
   static const PadData null;
 
   if(padAddr < 0 || padAddr >= fgNAllPads) return null;
@@ -316,6 +338,8 @@ const AliEveTPCSectorData::PadData& AliEveTPCSectorData::GetPadData(Int_t padAdd
 
 const AliEveTPCSectorData::PadData& AliEveTPCSectorData::GetPadData(Int_t row, Int_t pad)
 {
+  // Get pad-data reference by row and pad number.
+
   static const PadData null;
 
   Int_t np = GetNPadsInRow(row);
@@ -325,16 +349,22 @@ const AliEveTPCSectorData::PadData& AliEveTPCSectorData::GetPadData(Int_t row, I
 
 AliEveTPCSectorData::PadIterator AliEveTPCSectorData::MakePadIterator(Int_t padAddr, Short_t thr)
 {
+  // Get pad-data iterator by absolute index.
+
   return PadIterator(GetPadData(padAddr), thr);
 }
 
 AliEveTPCSectorData::PadIterator AliEveTPCSectorData::MakePadIterator(Int_t row, Int_t pad, Short_t thr)
 {
+  // Get pad-data iterator by row and pad number.
+
   return PadIterator(GetPadData(row, pad), thr);
 }
 
 AliEveTPCSectorData::RowIterator AliEveTPCSectorData::MakeRowIterator(Int_t row, Short_t thr)
 {
+  // Get row iterator.
+
   Short_t npads = GetNPadsInRow(row);
   if(npads > 0)
     return RowIterator(&fPads[fgRowBegs[row]], npads, thr);
@@ -348,6 +378,8 @@ AliEveTPCSectorData::RowIterator AliEveTPCSectorData::MakeRowIterator(Int_t row,
 
 void AliEveTPCSectorData::PadData::Print(Option_t* /*opt*/)
 {
+  // Print summary information.
+
   printf("addr=%p, len=%hd>\n", (void*)fData, fLength);
   for(Int_t i=0; i<fLength; ++i)
     printf("  %3d %hd\n", i, fData[i]);
@@ -359,14 +391,17 @@ void AliEveTPCSectorData::PadData::Print(Option_t* /*opt*/)
 
 Bool_t AliEveTPCSectorData::PadIterator::Next()
 {
-  if(fPos >= fEnd) return kFALSE;
-  if(fNChunk > 0) {
+  // Move iterator to next signal above the iteration threshold.
+  // Returns false when the end of data is reached.
+
+  if (fPos >= fEnd) return kFALSE;
+  if (fNChunk > 0) {
     ++fTime;
     --fNChunk;
     fSignal = *fPos; ++fPos;
   } else {
     fTime = fPos[0];
-    if(fTime <= 0) {
+    if (fTime <= 0) {
       fTime   = -fTime;
       fSignal = fPos[1];
       fPos += 2;
@@ -413,6 +448,8 @@ void AliEveTPCSectorData::PadIterator::Test()
 
 Bool_t AliEveTPCSectorData::RowIterator::NextPad()
 {
+  // Move iterator to next pad.
+
   ++fPad;
   if(fPad >= fNPads) return kFALSE;
   Reset(fPadArray[fPad]);
@@ -437,18 +474,15 @@ void AliEveTPCSectorData::RowIterator::ResetRow(const PadData* first, Short_t np
   fPad      = -1;
 }
 
-void AliEveTPCSectorData::RowIterator::Test()
-{
-  while(NextPad()) {
-    printf("TEvePad %d\n", fPad);
-    PadIterator::Test();
-  }
-}
-
 /******************************************************************************/
 // AliEveTPCSectorData::SegmentInfo
 /******************************************************************************/
 
+//______________________________________________________________________________
+//
+// Stores geometry data about a segment needed for fast data-access
+// and rendering
+
 ClassImp(AliEveTPCSectorData::SegmentInfo)
 
 AliEveTPCSectorData::SegmentInfo::SegmentInfo() :
@@ -459,6 +493,8 @@ AliEveTPCSectorData::SegmentInfo::SegmentInfo() :
   fNMaxPads(0),
   fNYSteps(0)
 {
+  // Constructor.
+
   memset(fYStep, sizeof(fYStep), 0);
 }
 
@@ -468,7 +504,9 @@ AliEveTPCSectorData::SegmentInfo::SegmentInfo() :
 
 AliEveTPCSectorData::PadRowHack* AliEveTPCSectorData::GetPadRowHack(Int_t r, Int_t p)
 {
-  if(fPadRowHackSet == 0) return 0;
+  // Get PadRowHack applicable to given row and pad.
+
+  if (fPadRowHackSet == 0) return 0;
   std::set<PadRowHack>* hs = static_cast<std::set<PadRowHack>*>(fPadRowHackSet);
   std::set<PadRowHack>::iterator i = hs->find(PadRowHack(r,p));
   return (i == hs->end()) ? 0 : const_cast<PadRowHack*>(&*i);
@@ -476,10 +514,12 @@ AliEveTPCSectorData::PadRowHack* AliEveTPCSectorData::GetPadRowHack(Int_t r, Int
 
 void AliEveTPCSectorData::AddPadRowHack(Int_t r, Int_t p, Int_t te, Float_t tf)
 {
-  if(fPadRowHackSet == 0) fPadRowHackSet = new std::set<PadRowHack>;
+  // Register PadRowHack for given row and pad.
+
+  if (fPadRowHackSet == 0) fPadRowHackSet = new std::set<PadRowHack>;
 
   PadRowHack* prh = GetPadRowHack(r, p);
-  if(prh == 0) {
+  if (prh == 0) {
     std::set<PadRowHack>* hs = static_cast<std::set<PadRowHack>*>(fPadRowHackSet);
     hs->insert(PadRowHack(r, p, te, tf));
   } else {
@@ -490,7 +530,9 @@ void AliEveTPCSectorData::AddPadRowHack(Int_t r, Int_t p, Int_t te, Float_t tf)
 
 void AliEveTPCSectorData::RemovePadRowHack(Int_t r, Int_t p)
 {
-  if(fPadRowHackSet == 0) return;
+  // Remove PadRowHack for given row and pad.
+
+  if (fPadRowHackSet == 0) return;
   std::set<PadRowHack>*hs = static_cast<std::set<PadRowHack>*>(fPadRowHackSet);
   std::set<PadRowHack>::iterator i = hs->find(PadRowHack(r,p));
   if(i != hs->end()) hs->erase(i);
@@ -498,7 +540,9 @@ void AliEveTPCSectorData::RemovePadRowHack(Int_t r, Int_t p)
 
 void AliEveTPCSectorData::DeletePadRowHack()
 {
-  if(fPadRowHackSet != 0) {
+  // Delete all PadRowHacks and their container.
+
+  if (fPadRowHackSet != 0) {
     std::set<PadRowHack>*hs = static_cast<std::set<PadRowHack>*>(fPadRowHackSet);
     delete hs;
     fPadRowHackSet = 0;
index c83ba7a9e62a7efff1fff056eda828971334bf5a..696cf977e7affe17a35223ee95a748c543072dc7 100644 (file)
@@ -29,8 +29,8 @@ public:
   class PadData
   {
   protected:
-    Short_t* fData;
-    Short_t  fLength;
+    Short_t* fData;   // Data for given pad.
+    Short_t  fLength; // Length of pad-data.
 
   public:
     PadData(Short_t* d=0, Short_t l=0) : fData(d), fLength(l) {}
@@ -50,10 +50,11 @@ public:
   class PadIterator
   {
   protected:
-    Short_t *fBeg, *fEnd, *fPos;
-    Short_t  fTime, fSignal;
-    Short_t  fThreshold;
-    Short_t  fNChunk;
+    Short_t *fBeg, *fEnd;    // Begin and end of data.
+    Short_t *fPos;           // Current position.
+    Short_t  fTime, fSignal; // Current time and signal.
+    Short_t  fThreshold;     // Threshold for data iteration. 
+    Short_t  fNChunk;        // Number of contiguous signals still to read.
 
   public:
     PadIterator(const PadData& pd, Short_t thr=0) :
@@ -88,9 +89,9 @@ public:
   class RowIterator : public PadIterator
   {
   protected:
-    const PadData* fPadArray;
-    Short_t fNPads;
-    Short_t fPad;
+    const PadData *fPadArray; // Pointer to array of pad-data.
+    Short_t        fNPads;    // Number of pads in row.
+    Short_t        fPad;      // Current pad.
 
   public:
     RowIterator(const PadData* first, Short_t npads, Short_t thr=0) :
@@ -113,8 +114,6 @@ public:
     void   ResetRow(const PadData* first, Short_t npads);
 
     Short_t TEvePad() const { return fPad; }
-
-    void Test();
   };
 
   class SegmentInfo : public TObject
@@ -122,15 +121,15 @@ public:
     friend class AliEveTPCSectorData;
 
   private:
-    Float_t   fPadWidth;
-    Float_t   fPadHeight;
-    Float_t   fRLow;      // Radius at the bottom of first row
-    Int_t     fNRows;     // Number of rows in this segment
-    Int_t     fFirstRow;  // First row index within sector
-    Int_t     fLastRow;   // Last row index within sector
-    Int_t     fNMaxPads;  // Maximum number of pads in a row
-    Int_t     fNYSteps;   // Number of steps in pad-count
-    Float_t   fYStep[64]; // Y coords where pad-count changes
+    Float_t   fPadWidth;  // Width of pad in this segment.
+    Float_t   fPadHeight; // Height of pad in this segment.
+    Float_t   fRLow;      // Radius at the bottom of first row.
+    Int_t     fNRows;     // Number of rows in this segment.
+    Int_t     fFirstRow;  // First row index within sector.
+    Int_t     fLastRow;   // Last row index within sector.
+    Int_t     fNMaxPads;  // Maximum number of pads in a row.
+    Int_t     fNYSteps;   // Number of steps in pad-count.
+    Float_t   fYStep[64]; // Y coords where pad-count changes.
 
   public:
     SegmentInfo();
@@ -149,33 +148,37 @@ public:
   };
 
 private:
-  static AliTPCParam *fgParam;
-  static Float_t      fgZLength;
-  static Int_t        fgNAllRows;
-  static Int_t        fgNAllPads;
-  static Int_t       *fgRowBegs;
+  static AliTPCParam *fgParam;     // Global TPC parameters.
+  static Float_t      fgZLength;   // Z-length of a sector.
+  static Int_t        fgNAllRows;  // Number of rows in all segments.
+  static Int_t        fgNAllPads;  // Number of pads in all segments.
+  static Int_t       *fgRowBegs;   // Ids of pads at row-beginnings.
 
-  static SegmentInfo  fgInnSeg;
-  static SegmentInfo  fgOut1Seg;
-  static SegmentInfo  fgOut2Seg;
+  static SegmentInfo  fgInnSeg;    // Geometry information for inner segment.
+  static SegmentInfo  fgOut1Seg;   // Geometry information for middle segment.
+  static SegmentInfo  fgOut2Seg;   // Geometry information for outer segment.
 
-  static SegmentInfo* fgSegInfoPtrs[3];
+  static SegmentInfo* fgSegInfoPtrs[3]; // Array of geometry information objects, for access by segment id.
 
 protected:
-  Int_t                 fSectorID;
-  Int_t                 fNPadsFilled;
-  std::vector<PadData>  fPads;
+  Int_t                 fSectorID;      // Sector id.
+  Int_t                 fNPadsFilled;   // Number of filled pads.
+  std::vector<PadData>  fPads;          // Vector of pad-data.
 
   // Blocks of pad-data.
-  const Int_t           fBlockSize;
-  Int_t                 fBlockPos;
-  std::vector<Short_t*> fBlocks;
+  const Int_t           fBlockSize;     // Size of pad-data block.
+  Int_t                 fBlockPos;      // Position in current block.
+  std::vector<Short_t*> fBlocks;        // Vector of blocks.
 
   void NewBlock();
 
-  // Intermediate buffer/vars for pad-data.
-  Short_t fPadBuffer[2048];
-  Int_t   fCurrentRow, fCurrentPad, fCurrentPos, fCurrentStep;
+
+  // Intermediate buffer/vars used during filling of pad-data.
+  Short_t fPadBuffer[2048];     // Buffer for current pad.
+  Int_t   fCurrentRow;          // Current row.
+  Int_t   fCurrentPad;          // Current pad.
+  Int_t   fCurrentPos;          // Current position in pad-buffer.
+  Int_t   fCurrentStep;         // Step, can be -2 or +2, depending on fill direction.
 
   Int_t PadIndex(Int_t row, Int_t pad) { return fgRowBegs[row] + pad; }
 
@@ -224,9 +227,10 @@ public:
   class PadRowHack
   {
   public:
-    Int_t   fRow, fPad;
-    Int_t   fThrExt;
-    Float_t fThrFac; // Actual threshold = fThrExt + fThrFac*thr
+    Int_t   fRow, fPad; // For which row, pad we hack.
+    Int_t   fThrExt;    // Additional treshold
+    Float_t fThrFac;    // Additional threshold factor.
+    // Actual threshold = fThrExt + fThrFac*thr
 
     PadRowHack(Int_t r, Int_t p, Int_t te=0, Float_t tf=1) :
       fRow(r), fPad(p), fThrExt(te), fThrFac(tf) {}
@@ -240,15 +244,17 @@ public:
   void DeletePadRowHack();
 
 protected:
-  void* fPadRowHackSet;
+  void* fPadRowHackSet; // Pointer to set of PadRowHacks. 
 
 
-  ClassDef(AliEveTPCSectorData, 0);
-}; // endclass AliEveTPCSectorData
+  ClassDef(AliEveTPCSectorData, 0); // Holds pad-data of a single TPC sector. Also stores geometry information in static data-members.
+};
 
 
 inline void AliEveTPCSectorData::RegisterData(Short_t time, Short_t signal)
 {
+  // Register data for given time.
+
   fPadBuffer[fCurrentPos]   = time;
   fPadBuffer[fCurrentPos+1] = signal;
   fCurrentPos += fCurrentStep;
index 1d9cd6636b06729396f16c21725a16b1a469a6e9..d085a8302e4e85341068e4b48db48c07161b18cc 100644 (file)
@@ -18,7 +18,6 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCSectorViz
 //
 // Base class for TPC raw-data visualization.
 // See AliEveTPCSector2D and AliEveTPCSector3D for concrete implementations.
@@ -50,16 +49,22 @@ AliEveTPCSectorViz::AliEveTPCSectorViz(const Text_t* n, const Text_t* t) :
   fRTS        (1),
 
   fColorArray (0)
-{}
+{
+  // Constructor.
+}
 
 AliEveTPCSectorViz::~AliEveTPCSectorViz()
 {
-  if(fTPCData) fTPCData->DecRefCount();
+  // Destructor.
+
+  if (fTPCData) fTPCData->DecRefCount();
   delete [] fColorArray;
 }
 
 void AliEveTPCSectorViz::CopyVizParams(const AliEveTPCSectorViz& v)
 {
+  // Copy basic viualization parameters from another TPCSectorViz.
+
   fMinTime   = v.fMinTime;
   fMaxTime   = v.fMaxTime;
   fThreshold = v.fThreshold;
@@ -74,25 +79,31 @@ void AliEveTPCSectorViz::CopyVizParams(const AliEveTPCSectorViz& v)
 
 void AliEveTPCSectorViz::SetDataSource(AliEveTPCData* data)
 {
-  if(data == fTPCData) return;
-  if(fTPCData) fTPCData->DecRefCount();
+  // Set the data source.
+
+  if (data == fTPCData) return;
+  if (fTPCData) fTPCData->DecRefCount();
   fTPCData = data;
-  if(fTPCData) fTPCData->IncRefCount();
+  if (fTPCData) fTPCData->IncRefCount();
   IncRTS();
 }
 
 void AliEveTPCSectorViz::SetSectorID(Int_t id)
 {
-  if(id < 0)  id = 0;
-  if(id > 35) id = 35;
+  // Set sector id.
+
+  if (id < 0)  id = 0;
+  if (id > 35) id = 35;
   fSectorID = id;
-  if(fAutoTrans)
+  if (fAutoTrans)
     SetAutoTrans(kTRUE); // Force repositioning.
   IncRTS();
 }
 
 AliEveTPCSectorData* AliEveTPCSectorViz::GetSectorData() const
 {
+  // Get sector-data.
+
   return fTPCData ? fTPCData->GetSectorData(fSectorID) : 0;
 }
 
@@ -100,6 +111,8 @@ AliEveTPCSectorData* AliEveTPCSectorViz::GetSectorData() const
 
 void AliEveTPCSectorViz::SetThreshold(Short_t t)
 {
+  // Set visualization threshold.
+
   fThreshold = TMath::Min(t, (Short_t)(fMaxVal - 1));
   ClearColorArray();
   IncRTS();
@@ -107,6 +120,9 @@ void AliEveTPCSectorViz::SetThreshold(Short_t t)
 
 void AliEveTPCSectorViz::SetMaxVal(Int_t mv)
 {
+  // Set visualization max signal value.
+  // Signals above this will have the same color.
+
   fMaxVal = TMath::Max(mv, (Int_t)(fThreshold + 1));
   ClearColorArray();
   IncRTS();
@@ -116,8 +132,11 @@ void AliEveTPCSectorViz::SetMaxVal(Int_t mv)
 
 void AliEveTPCSectorViz::SetAutoTrans(Bool_t trans)
 {
+  // Set automatic update of transformation matrix.
+  // The position is calculated immediately.
+
   fAutoTrans = trans;
-  if(fAutoTrans) {
+  if (fAutoTrans) {
     fHMTrans.UnitTrans();
 
     using namespace TMath;
@@ -125,7 +144,7 @@ void AliEveTPCSectorViz::SetAutoTrans(Bool_t trans)
     Float_t s = Sin((fSectorID + 0.5)*20*Pi()/180 - PiOver2());
     Float_t z = AliEveTPCSectorData::GetZLength();
     Float_t d = -1;
-    if(fSectorID >= 18) {
+    if (fSectorID >= 18) {
       z = -z;
       d = -d;
     }
@@ -145,17 +164,21 @@ void AliEveTPCSectorViz::SetAutoTrans(Bool_t trans)
 
 void AliEveTPCSectorViz::SetupColor(Int_t val, UChar_t* pixel) const
 {
+  // Set pixel color to represent signal val from the current palette.
+
   using namespace TMath;
   Float_t div  = Max(1, fMaxVal - fThreshold);
   Int_t   nCol = gStyle->GetNumberOfColors();
   Int_t   cBin = (Int_t) Nint(nCol*(val - fThreshold)/div);
 
-  TEveUtil::TEveUtil::ColorFromIdx(gStyle->GetColorPalette(Min(nCol - 1, cBin)), pixel);
+  TEveUtil::ColorFromIdx(gStyle->GetColorPalette(Min(nCol - 1, cBin)), pixel);
 }
 
 void AliEveTPCSectorViz::ClearColorArray()
 {
-  if(fColorArray) {
+  // Clear cached color array.
+
+  if (fColorArray) {
     delete [] fColorArray;
     fColorArray = 0;
   }
@@ -163,11 +186,13 @@ void AliEveTPCSectorViz::ClearColorArray()
 
 void AliEveTPCSectorViz::SetupColorArray() const
 {
-  if(fColorArray)
+  // Initialize cached color array.
+
+  if (fColorArray)
     return;
 
   fColorArray = new UChar_t [4 * (fMaxVal - fThreshold + 1)];
   UChar_t* p = fColorArray;
-  for(Int_t v=fThreshold; v<=fMaxVal; ++v, p+=4)
+  for (Int_t v=fThreshold; v<=fMaxVal; ++v, p+=4)
     SetupColor(v, p);
 }
index 9423373b3a219fb8700ba8bae12a5445f848be47..f3824ab5f97d1cb2dc8618d9f1673ac9c23a6857 100644 (file)
@@ -41,25 +41,25 @@ class AliEveTPCSectorViz : public TEveElement,
   AliEveTPCSectorViz& operator=(const AliEveTPCSectorViz&); // Not implemented
 
 protected:
-  AliEveTPCData    *fTPCData;
-  Int_t             fSectorID;
+  AliEveTPCData    *fTPCData;    //  Source of data.
+  Int_t             fSectorID;   //  Id of the displayed sector.
 
-  Int_t             fMinTime;
-  Int_t             fMaxTime;
-  Short_t           fThreshold;
-  Int_t             fMaxVal;
+  Int_t             fMinTime;    //  Min time-bin to display.
+  Int_t             fMaxTime;    //  Max time-bin to display.
+  Short_t           fThreshold;  //  Threshold for display/
+  Int_t             fMaxVal;     //  Maximum signal-value, all above is of the same color.
 
-  Bool_t            fRnrInn;
-  Bool_t            fRnrOut1;
-  Bool_t            fRnrOut2;
+  Bool_t            fRnrInn;     //  Render inner segment.
+  Bool_t            fRnrOut1;    //  Render middle segment.
+  Bool_t            fRnrOut2;    //  Render outer segment.
 
-  Color_t           fFrameColor;
-  Bool_t            fRnrFrame;
-  TEveTrans         fHMTrans;
-  Bool_t            fAutoTrans;
-  UInt_t            fRTS;       //! Rendering TimeStamp
+  Color_t           fFrameColor; //  Color of the frame, the main color.
+  Bool_t            fRnrFrame;   //  Render frame.
+  TEveTrans         fHMTrans;    //  Transformation matrix.
+  Bool_t            fAutoTrans;  //  Automatically calculate transformation based on sector id.
+  UInt_t            fRTS;        //! Rendering TimeStamp
 
-  mutable UChar_t  *fColorArray;
+  mutable UChar_t  *fColorArray; //  Color array caching signal to color mapping.
 
   void SetupColor(Int_t val, UChar_t* pix) const;
   void ClearColorArray();
@@ -101,7 +101,7 @@ public:
   TEveTrans& RefHMTrans() { return fHMTrans; }
   void SetUseTrans(Bool_t t) { fHMTrans.SetUseTrans(t); }
 
-  ClassDef(AliEveTPCSectorViz, 1); // Base-class for TPC raw-data visualization
+  ClassDef(AliEveTPCSectorViz, 1); // Base-class for visualization of data for one TPC sector.
 }; // endclass AliEveTPCSectorViz
 
 
index 68f856e04df4e90f325a1b7841ddb8c6025e96e3..e131e9b7755884e6ccdeec30c1b6276021f04ba4 100644 (file)
@@ -25,8 +25,8 @@
 
 
 //______________________________________________________________________________
-// AliEveTPCSectorVizEditor
 //
+// Editor for AliEveTPCSectorViz.
 
 ClassImp(AliEveTPCSectorVizEditor)
 
@@ -41,6 +41,8 @@ AliEveTPCSectorVizEditor::AliEveTPCSectorVizEditor(const TGWindow *p,
   fThreshold (0), fMaxVal    (0),
   fTime      (0)
 {
+  // Constructor.
+
   fPriority = 40;
 
   Int_t labelW = 60;
@@ -119,13 +121,12 @@ AliEveTPCSectorVizEditor::AliEveTPCSectorVizEditor(const TGWindow *p,
   AddFrame(fTime, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
 }
 
-AliEveTPCSectorVizEditor::~AliEveTPCSectorVizEditor()
-{}
-
 /******************************************************************************/
 
 void AliEveTPCSectorVizEditor::SetModel(TObject* obj)
 {
+  // Set model object.
+
   fM = dynamic_cast<AliEveTPCSectorViz*>(obj);
 
   fHMTrans->SetModel(&fM->fHMTrans);
@@ -147,12 +148,16 @@ void AliEveTPCSectorVizEditor::SetModel(TObject* obj)
 
 void AliEveTPCSectorVizEditor::DoSectorID()
 {
+  // Slot for SectorID.
+
   fM->SetSectorID((Int_t) fSectorID->GetValue());
   Update();
 }
 
 void AliEveTPCSectorVizEditor::DoAutoTrans()
 {
+  // Slot for AutoTrans.
+
   fM->SetAutoTrans(fAutoTrans->IsOn());
   Update();
 }
@@ -161,18 +166,24 @@ void AliEveTPCSectorVizEditor::DoAutoTrans()
 
 void AliEveTPCSectorVizEditor::DoRnrInn()
 {
+  // Slot for RnrInn.
+
   fM->SetRnrInn(fRnrInn->IsOn());
   Update();
 }
 
 void AliEveTPCSectorVizEditor::DoRnrOut1()
 {
+  // Slot for RnrOut1.
+
   fM->SetRnrOut1(fRnrOut1->IsOn());
   Update();
 }
 
 void AliEveTPCSectorVizEditor::DoRnrOut2()
 {
+  // Slot for RnrOut2.
+
   fM->SetRnrOut2(fRnrOut2->IsOn());
   Update();
 }
@@ -181,6 +192,8 @@ void AliEveTPCSectorVizEditor::DoRnrOut2()
 
 void AliEveTPCSectorVizEditor::DoThreshold()
 {
+  // Slot for Threshold.
+
   fM->SetThreshold((Short_t) fThreshold->GetValue());
   fThreshold->SetValue(fM->fThreshold);
   Update();
@@ -188,6 +201,8 @@ void AliEveTPCSectorVizEditor::DoThreshold()
 
 void AliEveTPCSectorVizEditor::DoMaxVal()
 {
+  // Slot for MaxVal.
+
   fM->SetMaxVal((Int_t) fMaxVal->GetValue());
   fMaxVal->SetValue(fM->fMaxVal);
   Update();
@@ -197,6 +212,8 @@ void AliEveTPCSectorVizEditor::DoMaxVal()
 
 void AliEveTPCSectorVizEditor::DoTime()
 {
+  // Slot for time-range.
+
   fM->SetMinTime((Int_t) fTime->GetMin());
   fM->SetMaxTime((Int_t) fTime->GetMax());
   Update();
index b06e457849975cf45aee9785f6813a82201994ce..2b50f96626a82e98863c09d56d26cf714444ec52 100644 (file)
@@ -31,26 +31,26 @@ class AliEveTPCSectorVizEditor : public TGedFrame
   AliEveTPCSectorVizEditor& operator=(const AliEveTPCSectorVizEditor&); // Not implemented
 
 protected:
-  AliEveTPCSectorViz* fM; // fModel dynamic-casted to AliEveTPCSectorVizEditor
+  AliEveTPCSectorViz   *fM;          // Model dynamic-casted to AliEveTPCSectorVizEditor
 
-  TEveTransSubEditor* fHMTrans;
+  TEveTransSubEditor   *fHMTrans;    // Widget for transormation.
 
-  TEveGValuator* fSectorID;
-  TGCheckButton*    fAutoTrans;
+  TEveGValuator        *fSectorID;   // Widget for SectorID.
+  TGCheckButton        *fAutoTrans;  // Widget for AutoTrans.
 
-  TGCheckButton*    fRnrInn;
-  TGCheckButton*    fRnrOut1;
-  TGCheckButton*    fRnrOut2;
+  TGCheckButton        *fRnrInn;     // Widget for RnrInn.
+  TGCheckButton        *fRnrOut1;    // Widget for RnrOut1.
+  TGCheckButton        *fRnrOut2;    // Widget for RnrOut2.
 
-  TEveGValuator* fThreshold;
-  TEveGValuator* fMaxVal;
+  TEveGValuator        *fThreshold;  // Widget for Threshold.
+  TEveGValuator        *fMaxVal;     // Widget for MaxVal.
 
-  TEveGDoubleValuator* fTime;
+  TEveGDoubleValuator  *fTime;       // Widget for time-range.
 
 public:
   AliEveTPCSectorVizEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
                     UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  ~AliEveTPCSectorVizEditor();
+  ~AliEveTPCSectorVizEditor() {}
 
   virtual void SetModel(TObject* obj);
 
@@ -66,7 +66,7 @@ public:
 
   void DoTime();
 
-  ClassDef(AliEveTPCSectorVizEditor, 0); // Editor for AliEveTPCSectorViz
+  ClassDef(AliEveTPCSectorVizEditor, 0); // Editor for AliEveTPCSectorViz.
 }; // endclass AliEveTPCSectorVizEditor
 
 #endif