]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpZone.h
Fixing part of the Coding violation
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpZone.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: AliMpZone.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
6
7 /// \ingroup sector
8 /// \class AliMpZone
9 /// \brief A region of pads of the same dimensions composed of subzones.
10 ///
11 /// The zone contains pads of the same dimensions,
12 /// it is composed of the subzones.
13 ///
14 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
15
16 #ifndef ALI_MP_ZONE_H
17 #define ALI_MP_ZONE_H
18
19 #include <TObject.h>
20
21 #include "AliMpContainers.h"
22
23 #include <TVector2.h>
24 #ifdef WITH_ROOT
25 #include <TObjArray.h>
26 #endif
27
28 #ifdef WITH_STL
29 #include <vector>
30 #endif
31
32 class AliMpSubZone;
33 class AliMpVMotif;
34
35 class AliMpZone : public TObject
36 {
37   public:
38 #ifdef WITH_STL
39     /// Sub zone vector type
40     typedef std::vector<AliMpSubZone*>  SubZoneVector;
41 #endif
42 #ifdef WITH_ROOT
43     /// Sub zone vector type
44     typedef TObjArray  SubZoneVector;
45 #endif
46
47   public:
48     AliMpZone(Int_t id);
49     AliMpZone();
50     virtual ~AliMpZone();
51   
52     // methods
53     void AddSubZone(AliMpSubZone* subZone);
54
55     // find methods
56     AliMpSubZone* FindSubZone(AliMpVMotif* motif) const;
57     
58     // set methods
59     void SetPadDimensions(const TVector2& padDimensions);
60     
61     // access methods
62     UInt_t    GetID() const;
63     Int_t     GetNofSubZones() const;
64     AliMpSubZone*  GetSubZone(Int_t i) const;
65     TVector2  GetPadDimensions() const;
66
67   private:
68     // data members
69     UInt_t        fID;           ///< ID
70     SubZoneVector fSubZones;     ///< subzones
71     TVector2      fPadDimensions;///< pad dimensions
72
73   ClassDef(AliMpZone,1)  // Zone
74 };
75
76 // inline functions
77
78 /// Set pad dimensions
79 inline  void AliMpZone::SetPadDimensions(const TVector2& padDimensions)
80 { fPadDimensions = padDimensions; }
81
82 /// Return ID
83 inline  UInt_t  AliMpZone::GetID() const 
84 { return fID; }
85
86 /// Return pad dimensions
87 inline  TVector2  AliMpZone::GetPadDimensions() const 
88 { return fPadDimensions;}
89
90 #endif //ALI_MP_ZONE_H