**************************************************************************/
// $Id$
-// $MpId: AliMpSectorAreaHPadIterator.cxx,v 1.6 2006/03/17 11:38:43 ivana Exp $
+// $MpId: AliMpSectorAreaHPadIterator.cxx,v 1.7 2006/05/24 13:58:46 ivana Exp $
// Category: sector
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpSectorAreaHPadIterator
// ---------------------------------
// Class, which defines an iterator over the pads
// inside a given area in a sector in horizontal direction.
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMpSectorAreaHPadIterator.h"
#include "AliMpSectorSegmentation.h"
#include <Riostream.h>
+/// \cond CLASSIMP
ClassImp(AliMpSectorAreaHPadIterator)
+/// \endcond
//______________________________________________________________________________
AliMpSectorAreaHPadIterator::AliMpSectorAreaHPadIterator(
//______________________________________________________________________________
AliMpSectorAreaHPadIterator::AliMpSectorAreaHPadIterator(
const AliMpSectorAreaHPadIterator& right)
- : AliMpVPadIterator(right)
+ : AliMpVPadIterator(right),
+ fkSegmentation(0),
+ fkArea(AliMpArea()),
+ fCurrentPad(AliMpPad::Invalid()),
+ fCurrentRowPosition(0.)
{
-/// Protected copy constructor (not provided)
+/// Copy constructor
- Fatal("Copy constructor", "Not implemented");
+ *this = right;
}
//______________________________________________________________________________
{
/// Increase the current row position and searches the first valid pad.
- Double_t step = 2.* fkSegmentation->GetMinPadDimensions().Y();
+ Double_t dy = fkSegmentation->GetMinPadDimensions().Y();
while ( !fCurrentPad.IsValid() &&
- fCurrentRowPosition + step < fkArea.UpBorder())
+ fCurrentRowPosition + dy < fkArea.UpBorder())
{
- fCurrentRowPosition += step;
+ fCurrentRowPosition += 2.*dy;
TVector2 position = TVector2(fkArea.LeftBorder(), fCurrentRowPosition);
fCurrentPad = fkSegmentation->PadByDirection(position, fkArea.RightBorder());
//
fCurrentRowPosition = fkArea.DownBorder();
TVector2 position(fkArea.LeftDownCorner());
-
+
fCurrentPad = fkSegmentation->PadByDirection(position, fkArea.RightBorder());
MoveUp();