AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpPCBPadIterator Class Reference

Iterates over slat pads within a region of constant pad size. More...

#include <AliMpPCBPadIterator.h>

Inheritance diagram for AliMpPCBPadIterator:

Public Member Functions

 AliMpPCBPadIterator (const AliMpSlat *slat, const AliMpArea &area)
 
virtual ~AliMpPCBPadIterator ()
 
void First ()
 Set iterator to the first pad. More...
 
void Next ()
 Set iterator to the next pad. More...
 
Bool_t IsDone () const
 Is iterator done. More...
 
AliMpPad CurrentItem () const
 Return current pad. More...
 
void Invalidate ()
 Invalidate iterator (. More...
 
void Print (Option_t *opt="") const
 
- Public Member Functions inherited from AliMpVPadIterator
 AliMpVPadIterator ()
 
 AliMpVPadIterator (const AliMpVPadIterator &right)
 
virtual ~AliMpVPadIterator ()
 
AliMpVPadIteratoroperator= (const AliMpVPadIterator &right)
 

Private Member Functions

 AliMpPCBPadIterator (const AliMpPCBPadIterator &right)
 Not implemented. More...
 
AliMpPCBPadIteratoroperator= (const AliMpPCBPadIterator &right)
 Not implemented. More...
 
Bool_t GetNextPosition (Int_t &ix, Int_t &iy) const
 
Bool_t CropArea (const AliMpArea &area)
 
void SetPad (AliMpPad &pad, Int_t ix, Int_t iy)
 

Private Attributes

const AliMpSlatfkSlat
 ! the slat we're iterating over More...
 
AliMpSlatSegmentationfSlatSegmentation
 ! segmentation pointer More...
 
MpPair_t fMinIndices
 ! indices of bottom left of region to iterate over More...
 
MpPair_t fMaxIndices
 ! indices of top right of region to iterate over More...
 
MpPair_t fOffset
 ! current position More...
 
AliMpPad fCurrentPad
 ! current pad More...
 
Bool_t fIsDone
 ! whether we've finished or not More...
 

Detailed Description

Iterates over slat pads within a region of constant pad size.

Iterates over slat pads within a region of constant pad size.

Author
Laurent Aphecetche

Definition at line 22 of file AliMpPCBPadIterator.h.

Constructor & Destructor Documentation

AliMpPCBPadIterator::AliMpPCBPadIterator ( const AliMpSlat slat,
const AliMpArea area 
)

Normal ctor. Iteration will be done on the slat, over the crop of (area,slat_area)

Definition at line 48 of file AliMpPCBPadIterator.cxx.

AliMpPCBPadIterator::~AliMpPCBPadIterator ( )
virtual

Dtor.

Definition at line 73 of file AliMpPCBPadIterator.cxx.

AliMpPCBPadIterator::AliMpPCBPadIterator ( const AliMpPCBPadIterator right)
private

Not implemented.

Member Function Documentation

Bool_t AliMpPCBPadIterator::CropArea ( const AliMpArea area)
private

Checks the area is correct, and truncate it if it goes outside the slat.

Definition at line 83 of file AliMpPCBPadIterator.cxx.

AliMpPad AliMpPCBPadIterator::CurrentItem ( ) const
virtual

Return current pad.

Returns the current iteration position (i.e. a pad)

Implements AliMpVPadIterator.

Definition at line 150 of file AliMpPCBPadIterator.cxx.

void AliMpPCBPadIterator::First ( )
virtual

Set iterator to the first pad.

(re)Starts the iteration.

Implements AliMpVPadIterator.

Definition at line 160 of file AliMpPCBPadIterator.cxx.

Bool_t AliMpPCBPadIterator::GetNextPosition ( Int_t &  ix,
Int_t &  iy 
) const
private

Get the next iteration position. On input, fOffset must be a valid position (i.e. within iteration area already).

Definition at line 188 of file AliMpPCBPadIterator.cxx.

Referenced by Next().

void AliMpPCBPadIterator::Invalidate ( )
virtual

Invalidate iterator (.

Invalidate the iterator.

Implements AliMpVPadIterator.

Definition at line 213 of file AliMpPCBPadIterator.cxx.

Referenced by Next().

Bool_t AliMpPCBPadIterator::IsDone ( ) const
virtual

Is iterator done.

Whether the iteration is finished or not.

Implements AliMpVPadIterator.

Definition at line 225 of file AliMpPCBPadIterator.cxx.

Referenced by Next().

void AliMpPCBPadIterator::Next ( )
virtual

Set iterator to the next pad.

This one is the meat of the class. We're iterating in x-direction mainly, starting from lower-left of the iteration area, and proceeding right, until we reach right border, in which case we increment y and go back to leftmost position. End of iteration occurs when both x and y are outside the iteration window.

Implements AliMpVPadIterator.

Definition at line 235 of file AliMpPCBPadIterator.cxx.

Referenced by First().

AliMpPCBPadIterator& AliMpPCBPadIterator::operator= ( const AliMpPCBPadIterator right)
private

Not implemented.

void AliMpPCBPadIterator::Print ( Option_t *  opt = "") const

printout

Definition at line 271 of file AliMpPCBPadIterator.cxx.

void AliMpPCBPadIterator::SetPad ( AliMpPad pad,
Int_t  ix,
Int_t  iy 
)
private

Sets the current pad.

Definition at line 286 of file AliMpPCBPadIterator.cxx.

Referenced by First(), and Next().

Member Data Documentation

AliMpPad AliMpPCBPadIterator::fCurrentPad
private

! current pad

Definition at line 52 of file AliMpPCBPadIterator.h.

Referenced by CurrentItem(), First(), Invalidate(), Next(), and Print().

Bool_t AliMpPCBPadIterator::fIsDone
private

! whether we've finished or not

Definition at line 53 of file AliMpPCBPadIterator.h.

Referenced by First(), Invalidate(), IsDone(), and Print().

const AliMpSlat* AliMpPCBPadIterator::fkSlat
private

! the slat we're iterating over

Definition at line 47 of file AliMpPCBPadIterator.h.

Referenced by CropArea(), First(), and Print().

MpPair_t AliMpPCBPadIterator::fMaxIndices
private

! indices of top right of region to iterate over

Definition at line 50 of file AliMpPCBPadIterator.h.

Referenced by CropArea(), First(), GetNextPosition(), and Print().

MpPair_t AliMpPCBPadIterator::fMinIndices
private

! indices of bottom left of region to iterate over

Definition at line 49 of file AliMpPCBPadIterator.h.

Referenced by CropArea(), First(), GetNextPosition(), and Print().

MpPair_t AliMpPCBPadIterator::fOffset
private

! current position

Definition at line 51 of file AliMpPCBPadIterator.h.

Referenced by First(), Invalidate(), Next(), Print(), and SetPad().

AliMpSlatSegmentation* AliMpPCBPadIterator::fSlatSegmentation
private

! segmentation pointer

Definition at line 48 of file AliMpPCBPadIterator.h.

Referenced by Print(), SetPad(), and ~AliMpPCBPadIterator().


The documentation for this class was generated from the following files: