]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpZone.cxx
In mapping:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpZone.cxx
index 2642d04a1005958375b8e22e8f7431f97dd06fd2..d7e3009cc9c2c129407ebb0e650ee96fa4840e50 100755 (executable)
@@ -1,39 +1,62 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
 // $Id$
+// $MpId: AliMpZone.cxx,v 1.7 2006/05/24 13:58:46 ivana Exp $
 // Category: sector
-//
+
+//-----------------------------------------------------------------------------
 // Class AliMpZone
 // ---------------
 // Class describing a zone composed of the zone segments.
 // The zone contains pads of the same dimensions.
-//
+// Included in AliRoot: 2003/05/02
 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
 
 #include "AliMpZone.h"
 #include "AliMpSubZone.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMpZone)
+/// \endcond
 
 //_____________________________________________________________________________
 AliMpZone::AliMpZone(Int_t id) 
   : TObject(),
     fID(id),
+    fSubZones(),
     fPadDimensions(TVector2())
 {
-//
+/// Standard constructor
 }
 
 //_____________________________________________________________________________
 AliMpZone::AliMpZone() 
   : TObject(),
     fID(0),
+    fSubZones(),
     fPadDimensions(TVector2())
 {
-//
+/// Default constructor
 }
 
 //_____________________________________________________________________________
-AliMpZone::~AliMpZone() {
-//
+AliMpZone::~AliMpZone() 
+{
+/// Destructor
 
   for (Int_t i=0; i<GetNofSubZones(); i++)
     delete fSubZones[i];  
@@ -46,18 +69,16 @@ AliMpZone::~AliMpZone() {
 //_____________________________________________________________________________
 void AliMpZone::AddSubZone(AliMpSubZone* subZone)
 {
-// Adds row segment.
-// ---
+/// Add row segment.
 
-  fSubZones.push_back(subZone);
+  fSubZones.Add(subZone);
 }  
   
 //_____________________________________________________________________________
 AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
 {
-// Finds a subzone with a specified motif;
-// returns 0 if not found.
-// ---
+/// Find a subzone with a specified motif;
+/// return 0 if not found.
 
   for (Int_t i=0; i<GetNofSubZones(); i++) {
     AliMpSubZone* subZone = GetSubZone(i);
@@ -70,18 +91,20 @@ AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
 //_____________________________________________________________________________
 Int_t AliMpZone::GetNofSubZones() const 
 {
-// Returns number of row segments.
+/// Return number of row segments.
 
-  return fSubZones.size();
+  return fSubZones.GetEntriesFast();
 }  
 
 //_____________________________________________________________________________
 AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const 
 {
+/// Return i-th sub zone.
+
   if (i<0 || i>=GetNofSubZones()) {
     Warning("GetSubZone", "Index outside range");
     return 0;
   }
   
-  return fSubZones[i];  
+  return (AliMpSubZone*)fSubZones[i];  
 }