AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpArea.h
Go to the documentation of this file.
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: AliMpArea.h,v 1.9 2006/05/24 13:58:07 ivana Exp $
6 
12 
13 #ifndef ALI_MP_AREA_H
14 #define ALI_MP_AREA_H
15 
16 #include <TObject.h>
17 
18 using std::ostream;
19 
20 class AliMpArea : public TObject
21 {
22  public:
23  AliMpArea(Double_t x, Double_t y,
24  Double_t dx, Double_t dy);
25  AliMpArea(const AliMpArea& rhs);
26  AliMpArea();
27  virtual ~AliMpArea();
28 
29  // operators
30  AliMpArea& operator = (const AliMpArea& right);
31 
32  // methods
33  Double_t LeftBorder() const;
34  Double_t RightBorder() const;
35  Double_t UpBorder() const;
36  Double_t DownBorder() const;
37 
38  void LeftDownCorner(Double_t& x, Double_t& y) const;
39  void LeftUpCorner(Double_t& x, Double_t& y) const;
40  void RightDownCorner(Double_t& x, Double_t& y) const;
41  void RightUpCorner(Double_t& x, Double_t& y) const;
42 
43  AliMpArea Intersect(const AliMpArea& area) const;
44  Bool_t Overlap(const AliMpArea& area) const;
45  Bool_t Contains(const AliMpArea& area) const;
46 
47  void Print(Option_t* opt="") const;
48 
49  // get methods
50  void GetParameters(Double_t& x, Double_t& y,
51  Double_t& dx, Double_t& dy) const;
52  Double_t GetPositionX() const;
53  Double_t GetPositionY() const;
54  Double_t GetDimensionX() const;
55  Double_t GetDimensionY() const;
56  Bool_t IsValid() const;
57 
58 
59  private:
60  // data members
61  Double_t fPositionX;
62  Double_t fPositionY;
63  Double_t fDimensionX;
64  Double_t fDimensionY;
65  Bool_t fValidity;
66 
67  ClassDef(AliMpArea,2) //utility class for area iterators
68 };
69 
70 ostream& operator << (ostream &stream,const AliMpArea& area);
71 
72 // inline functions
73 
75 inline Double_t AliMpArea::GetPositionX() const { return fPositionX; }
77 inline Double_t AliMpArea::GetPositionY() const { return fPositionY; }
79 inline Double_t AliMpArea::GetDimensionX() const { return fDimensionX; }
81 inline Double_t AliMpArea::GetDimensionY() const { return fDimensionY; }
83 inline Bool_t AliMpArea::IsValid() const { return fValidity; }
84 
85 #endif //ALI_MP_AREA_H
Double_t GetDimensionY() const
Return y dimensions.
Definition: AliMpArea.h:81
Double_t GetPositionY() const
Return y position.
Definition: AliMpArea.h:77
Double_t LeftBorder() const
Definition: AliMpArea.cxx:124
ostream & operator<<(ostream &stream, const AliMpArea &area)
Definition: AliMpArea.cxx:286
Double_t fPositionY
y position
Definition: AliMpArea.h:62
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
virtual ~AliMpArea()
Definition: AliMpArea.cxx:90
void LeftUpCorner(Double_t &x, Double_t &y) const
Definition: AliMpArea.cxx:165
Double_t fDimensionY
y dimension (half lengths)
Definition: AliMpArea.h:64
Double_t fPositionX
x position
Definition: AliMpArea.h:61
void Print(Option_t *opt="") const
Definition: AliMpArea.cxx:252
Double_t GetDimensionX() const
Return x dimensions.
Definition: AliMpArea.h:79
void LeftDownCorner(Double_t &x, Double_t &y) const
Definition: AliMpArea.cxx:156
AliMpArea Intersect(const AliMpArea &area) const
Definition: AliMpArea.cxx:217
AliMpArea & operator=(const AliMpArea &right)
Definition: AliMpArea.cxx:100
Double_t UpBorder() const
Definition: AliMpArea.cxx:140
Bool_t fValidity
validity
Definition: AliMpArea.h:65
Double_t GetPositionX() const
Return x position.
Definition: AliMpArea.h:75
void RightDownCorner(Double_t &x, Double_t &y) const
Definition: AliMpArea.cxx:174
Double_t fDimensionX
x dimension (half lengths)
Definition: AliMpArea.h:63
Double_t DownBorder() const
Definition: AliMpArea.cxx:148
void RightUpCorner(Double_t &x, Double_t &y) const
Definition: AliMpArea.cxx:184
Bool_t IsValid() const
Return validity.
Definition: AliMpArea.h:83
void GetParameters(Double_t &x, Double_t &y, Double_t &dx, Double_t &dy) const
Definition: AliMpArea.cxx:274
Bool_t Overlap(const AliMpArea &area) const
Definition: AliMpArea.cxx:231
Bool_t Contains(const AliMpArea &area) const
Definition: AliMpArea.cxx:193
Double_t RightBorder() const
Definition: AliMpArea.cxx:132