]>
Commit | Line | Data |
---|---|---|
618ea77a | 1 | #ifndef ALI_MP_PCB_PAD_ITERATOR_H |
2 | #define ALI_MP_PCB_PAD_ITERATOR_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | // $MpId$ | |
9 | ||
10 | /// \ingroup slat | |
11 | /// \class AliMpPCBPadIterator | |
12 | /// \brief Iterates over slat pads within a region of constant pad size. | |
13 | /// | |
14 | // Author: Laurent Aphecetche | |
15 | ||
16 | #include "AliMpVPadIterator.h" | |
17 | ||
18 | class AliMpArea; | |
19 | class AliMpSlat; | |
20 | class AliMpSlatSegmentation; | |
21 | ||
22 | class AliMpPCBPadIterator : public AliMpVPadIterator | |
23 | { | |
24 | public: | |
25 | AliMpPCBPadIterator(const AliMpSlat* slat, const AliMpArea& area); | |
26 | virtual ~AliMpPCBPadIterator(); | |
27 | ||
28 | void First(); | |
29 | void Next(); | |
30 | Bool_t IsDone() const; | |
31 | AliMpPad CurrentItem() const; | |
32 | void Invalidate(); | |
33 | ||
34 | void Print(Option_t* opt="") const; | |
35 | ||
36 | private: | |
37 | AliMpPCBPadIterator(const AliMpPCBPadIterator& right); | |
38 | AliMpPCBPadIterator& operator = (const AliMpPCBPadIterator& right); | |
39 | ||
40 | Bool_t GetNextPosition(Int_t& ix, Int_t& iy); | |
41 | Bool_t CropArea(const AliMpArea& area); | |
42 | void SetPad(AliMpPad& pad, const AliMpIntPair& indices); | |
43 | ||
44 | private: | |
45 | const AliMpSlat* fkSlat; //!< the slat we're iterating over | |
46 | AliMpSlatSegmentation* fSlatSegmentation; //!< segmentation pointer | |
47 | AliMpIntPair fMinIndices; //!< indices of bottom left of region to iterate over | |
48 | AliMpIntPair fMaxIndices; //!< indices of top right of region to iterate over | |
49 | AliMpIntPair fOffset; //!< current position | |
50 | AliMpPad fCurrentPad; //!< current pad | |
51 | Bool_t fIsDone; //!< whether we've finished or not | |
52 | ||
53 | ClassDef(AliMpPCBPadIterator,2) // Pad iterator for a zone of constant density, for St345. | |
54 | }; | |
55 | ||
56 | #endif |