]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDEIterator.h
Adding local CVS Id (MpId) and/or category
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEIterator.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$ 
5 // $MpId: AliMpDEIterator.h,v 1.2 2006/03/13 12:22:08 ivana Exp $ 
6
7 /// \ingroup management
8 /// \class AliMpDEIterator
9 /// \brief The iterator over valid detection element IDs
10 ///
11 /// The valid detection element Ids are defined in the files denames*.dat.    \n
12 /// It can iterate 
13 /// - over all valid detection elements, if started with First() function; 
14 /// - or over detection elements in a selected module, if started with
15 ///   First(Int_t moduleId) function                                          \n 
16 /// 
17 /// Author: Ivana Hrivnacova, IPN Orsay
18
19 #ifndef ALI_MP_DE_ITERATOR_H
20 #define ALI_MP_DE_ITERATOR_H
21
22 #include "AliMpStationType.h"
23
24 #include <TObject.h>
25 #include <TArrayI.h>
26
27 class TString;
28
29 class AliMpDEIterator : public  TObject {
30
31   public:
32     AliMpDEIterator();
33     AliMpDEIterator(const AliMpDEIterator& rhs);
34     virtual ~AliMpDEIterator();
35
36     // Operators
37     AliMpDEIterator& operator=(const AliMpDEIterator& rhs);
38     
39     // Methods for iterating over DE elements
40     // 
41     void First();
42     void First(Int_t moduleId);
43     void Next();
44     Bool_t IsDone() const;
45     Int_t CurrentDE() const;
46
47   private:
48     // static methods
49     static Bool_t ReadDEIds(AliMpStationType station);
50     static void   ReadData();
51
52     // static data members      
53     static const Int_t  fgkMaxNofDetElements; // Maximum number of DEs
54     static TArrayI      fgDetElemIds;         // DE Ids 
55     static Int_t        fgNofDetElemIds;      // Number of DE Ids       
56
57     // data members     
58     Int_t  fIndex;    // Current DE index
59     Int_t  fModuleId; // The iterated module 
60
61   ClassDef(AliMpDEIterator,0)  // MUON Factory for Chambers and Segmentation
62 };
63
64 #endif //ALI_MP_DE_ITERATOR_H
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79